* [refac bug #56979] Add delay label for bug.

This commit is contained in:
wangyidong
2024-11-14 17:23:47 +08:00
committed by 孙广明
parent fb52c8a444
commit c805dacac9
7 changed files with 41 additions and 5 deletions
+6 -3
View File
@@ -50,10 +50,13 @@ window.onRenderCell = function(result, {row, col})
}
}
if(result && col.name == 'deadline')
if(result[0] && col.name == 'deadline')
{
if(row.data.deadline === '0000-00-00') return result;
if(row.data.deadline < today) result[0] = {html: '<span class="text-danger" >' + row.data.deadline + '</span>'};
const bug = row.data;
if(['resolved', 'closed'].includes(bug.status)) return result;
const yesterday = zui.formatDate(zui.createDate() - 24 * 60 * 60 * 1000, 'yyyy-MM-dd');
if(result[0] <= yesterday) result[0] = {html: '<span class="label danger-pale rounded-full size-sm">' + result[0] + '</span>'};
}
return result;