* Render icon for program and product line row of the data table on product view page within program module.
This commit is contained in:
@@ -17,8 +17,17 @@ window.renderReleaseCountCell = function(result, {col, row})
|
||||
|
||||
if(col.name == 'name' && row.data.type !== 'product')
|
||||
{
|
||||
if(row.data.type == 'productLine') result[3] = row.data.name;
|
||||
if(row.data.type == 'program') result[2] = row.data.name;
|
||||
/* Remove class of checkbox. */
|
||||
result.splice(result.length - 1);
|
||||
|
||||
/* Remove checkbox. */
|
||||
result.forEach(function(ele, idx)
|
||||
{
|
||||
if(!ele.props.class) return;
|
||||
if(ele.props.class.includes('checkbox')) result.splice(idx, 1);
|
||||
});
|
||||
|
||||
result[result.length - 1] = row.data.name;
|
||||
|
||||
return result;
|
||||
}
|
||||
@@ -30,3 +39,11 @@ window.renderReleaseCountCell = function(result, {col, row})
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
window.iconRenderProductView = function(value, row)
|
||||
{
|
||||
if(row.data.type === 'program') return {className: 'icon icon-cards-view text-gray'};
|
||||
if(row.data.type === 'productLine') return {className: 'icon icon-lane text-gray'};
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user