From 571a03043ecd8e202e30b556315071c3823a8ab9 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Tue, 23 Feb 2021 13:43:41 +1100 Subject: [PATCH] Show recently updated stock items on the index page --- InvenTree/templates/InvenTree/index.html | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/InvenTree/templates/InvenTree/index.html b/InvenTree/templates/InvenTree/index.html index 687ceaf0ee..fc7d5344b1 100644 --- a/InvenTree/templates/InvenTree/index.html +++ b/InvenTree/templates/InvenTree/index.html @@ -125,8 +125,19 @@ loadSimplePartTable("#table-bom-validation", "{% url 'api-part-list' %}", { {% if roles.stock.view %} addHeaderTitle('{% trans "Stock" %}'); +addHeaderAction('recently-updated-stock', '{% trans "Recently Updated" %}', 'fa-clock'); addHeaderAction('low-stock', '{% trans "Low Stock" %}', 'fa-shopping-cart'); addHeaderAction('stock-to-build', '{% trans "Required for Build Orders" %}', 'fa-bullhorn'); + +loadStockTable($('#table-recently-updated-stock'), { + params: { + ordering: "-updated", + limit: 10, + }, + name: 'recently-updated-stock', + grouping: false, +}); + {% settings_value "STOCK_ENABLE_EXPIRY" as expiry %} {% if expiry %} addHeaderAction('expired-stock', '{% trans "Expired Stock" %}', 'fa-calendar-times');