mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Merge pull request #1133 from SchrodingersGat/stock-table-fix
Smallt tweaks for the Stock table
This commit is contained in:
commit
0594ebaef7
@ -182,6 +182,7 @@ class StockStatus(StatusCode):
|
|||||||
ATTENTION: 'yellow',
|
ATTENTION: 'yellow',
|
||||||
DAMAGED: 'red',
|
DAMAGED: 'red',
|
||||||
DESTROYED: 'red',
|
DESTROYED: 'red',
|
||||||
|
LOST: 'grey',
|
||||||
REJECTED: 'red',
|
REJECTED: 'red',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -536,13 +536,17 @@ function loadStockTable(table, options) {
|
|||||||
|
|
||||||
// Special stock status codes
|
// Special stock status codes
|
||||||
|
|
||||||
// 65 = "REJECTED"
|
// REJECTED
|
||||||
if (row.status == 65) {
|
if (row.status == {{ StockStatus.REJECTED }}) {
|
||||||
html += makeIconButton('fa-times-circle icon-red', '{% trans "Stock item has been rejected" %}');
|
console.log("REJECTED - {{ StockStatus.REJECTED }}");
|
||||||
|
html += makeIconBadge('fa-times-circle icon-red', '{% trans "Stock item has been rejected" %}');
|
||||||
}
|
}
|
||||||
// 70 = "LOST"
|
// LOST
|
||||||
else if (row.status == 70) {
|
else if (row.status == {{ StockStatus.LOST }}) {
|
||||||
html += makeIconButton('fa-question-circle','{% trans "Stock item is lost" %}');
|
html += makeIconBadge('fa-question-circle','{% trans "Stock item is lost" %}');
|
||||||
|
}
|
||||||
|
else if (row.status == {{ StockStatus.DESTROYED }}) {
|
||||||
|
html += makeIconBadge('fa-skull-crossbones', '{% trans "Stock item is destroyed" %}');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (row.quantity <= 0) {
|
if (row.quantity <= 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user