* Render icon for program and product line row of the data table on product view page within program module.

This commit is contained in:
chentao
2023-06-16 15:29:46 +08:00
parent 3aac75c69b
commit 95ac353026
2 changed files with 20 additions and 2 deletions
+19 -2
View File
@@ -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 '';
}