mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Display proper build status label
This commit is contained in:
parent
e28fe6df6a
commit
34c097c46a
@ -57,6 +57,31 @@
|
||||
{
|
||||
field: 'status',
|
||||
title: 'Status',
|
||||
formatter: function(value, row, index, field) {
|
||||
|
||||
var color = '';
|
||||
|
||||
switch (value) {
|
||||
case 10: // Pending
|
||||
color = 'label-info';
|
||||
break;
|
||||
case 20: // Allocated
|
||||
color = 'label-primary';
|
||||
break;
|
||||
case 30: // Cancelled
|
||||
color = 'label-danger';
|
||||
break;
|
||||
case 40: // Complete
|
||||
color = 'label-success';
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
var html = "<span class='label " + color + " label-large'>" + row.status_text + "</span>";
|
||||
|
||||
return html;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'completion_date',
|
||||
|
Loading…
Reference in New Issue
Block a user