const today = zui.formatDate(new Date(), 'yyyy-MM-dd');
window.onRenderExecutionCell = function(result, info)
{
if(info.col.name === 'name' && (systemMode == 'ALM' || systemMode == 'PLM'))
{
const executionLink = $.createLink('execution', 'task', `executionID=${info.row.id}`);
const executionType = typeList[info.row.data.type];
let executionName = `${executionType} `;
executionName += '
';
executionName += (!info.row.data.isParent && typeof result[0] != 'string') ? `
${info.row.data.name}` : info.row.data.name;
executionName += '
';
executionName += (!['done', 'closed', 'suspended'].includes(info.row.data.status) && today > info.row.data.end) ? '' + delayWarning.replace('%s', info.row.data.delay) + '' : '';
result[0] = {html: executionName, className: 'w-full flex items-center'};
return result;
}
if(['estimate', 'consumed','left'].includes(info.col.name) && result) result[0] = {html: result[0] + ' h'};
return result;
}