Filter builds by "overdue" status

This commit is contained in:
Oliver Walters 2020-12-15 23:31:19 +11:00
parent 51da26d21d
commit c8c50af54b
2 changed files with 17 additions and 2 deletions

View File

@ -650,7 +650,13 @@ function loadBuildTable(table, options) {
value = `${prefix}${value}`;
}
return renderLink(value, '/build/' + row.pk + '/');
var html = renderLink(value, '/build/' + row.pk + '/');
if (row.overdue) {
html += makeIconBadge('fa-calendar-times icon-red', '{% trans "Build order is overdue" %}');
}
return html;
}
},
{
@ -699,6 +705,11 @@ function loadBuildTable(table, options) {
title: '{% trans "Created" %}',
sortable: true,
},
{
field: 'target_date',
title: '{% trans "Target Date" %}',
sortable: true,
},
{
field: 'completion_date',
title: '{% trans "Completed" %}',

View File

@ -184,7 +184,11 @@ function getAvailableTableFilters(tableKey) {
active: {
type: 'bool',
title: '{% trans "Active" %}',
}
},
overdue: {
type: 'bool',
title: '{% trans "Overdue" %}',
},
};
}