mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-01 11:10:54 +00:00
Add list of pending shipment to home page, with corresponding settings for user (#4775)
This commit is contained in:
@ -836,6 +836,9 @@ function loadSalesOrderShipmentTable(table, options={}) {
|
||||
// Add callbacks for expand / collapse buttons
|
||||
var prefix = options.shipped ? 'completed' : 'pending';
|
||||
|
||||
// Add option to show SO reference also
|
||||
var show_so_reference = options.show_so_reference || false;
|
||||
|
||||
$(`#${prefix}-shipments-expand`).click(function() {
|
||||
$(table).bootstrapTable('expandAllRows');
|
||||
});
|
||||
@ -931,6 +934,21 @@ function loadSalesOrderShipmentTable(table, options={}) {
|
||||
checkbox: true,
|
||||
switchable: false,
|
||||
},
|
||||
{
|
||||
visible: show_so_reference,
|
||||
field: 'order_detail',
|
||||
title: '{% trans "Sales Order" %}',
|
||||
switchable: false,
|
||||
formatter: function(value, row) {
|
||||
var html = renderLink(row.order_detail.reference, `/order/sales-order/${row.order}/`);
|
||||
|
||||
if (row.overdue) {
|
||||
html += makeIconBadge('fa-calendar-times icon-red', '{% trans "Order is overdue" %}');
|
||||
}
|
||||
|
||||
return html;
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'reference',
|
||||
title: '{% trans "Shipment Reference" %}',
|
||||
|
Reference in New Issue
Block a user