mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Add some more visual tags to the stock list
This commit is contained in:
parent
bb6b3b965d
commit
502702b3bc
@ -1,4 +1,5 @@
|
||||
{% load i18n %}
|
||||
{% load status_codes %}
|
||||
|
||||
/* Stock API functions
|
||||
* Requires api.js to be loaded first
|
||||
@ -460,12 +461,26 @@ function loadStockTable(table, options) {
|
||||
var html = renderLink(val, `/stock/item/${row.pk}/`);
|
||||
|
||||
if (row.allocated) {
|
||||
html += `<span class='fas fa-bookmark label-right' title='{% trans "StockItem has been allocated" %}'></span>`;
|
||||
html += `<span class='fas fa-bookmark label-right' title='{% trans "Stock item has been allocated" %}'></span>`;
|
||||
}
|
||||
|
||||
if (row.customer) {
|
||||
html += `<span class='fas fa-user-tie label-right' title='{% trans "Stock item has been assigned to customer" %}'></span>`;
|
||||
} else if (row.build_order) {
|
||||
html += `<span class='fas fa-tools label-right' title='{% trans "Stock item was assigned to a build order" %}'></span>`;
|
||||
} else if (row.sales_order) {
|
||||
html += `<span class='fas fa-dollar-sign label-right' title='{% trans "Stock item was assigned to a sales order" %}'></span>`;
|
||||
}
|
||||
|
||||
// Special stock status codes
|
||||
|
||||
// 65 = "REJECTED"
|
||||
if (row.status == 65) {
|
||||
html += `<span class='fas fa-times-circle label-right' title='{% trans "Stock item has been rejected" %}'></span>`;
|
||||
}
|
||||
// 70 = "LOST"
|
||||
if (row.status == 70) {
|
||||
html += `<span class='fas fa-question-circle label-right' title='{% trans "StockItem is lost" %}'></span>`;
|
||||
else if (row.status == 70) {
|
||||
html += `<span class='fas fa-question-circle label-right' title='{% trans "Stock item is lost" %}'></span>`;
|
||||
}
|
||||
|
||||
if (row.quantity <= 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user