From 46aeafb5da6d52c6c157033446eee55d1c8987fb Mon Sep 17 00:00:00 2001 From: Oliver Date: Tue, 21 Dec 2021 16:44:49 +1100 Subject: [PATCH] Adds filter for "assigned stock" view on customer page --- InvenTree/company/templates/company/detail.html | 5 +++-- InvenTree/templates/js/translated/stock.js | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/InvenTree/company/templates/company/detail.html b/InvenTree/company/templates/company/detail.html index 4181d81b6f..4464136535 100644 --- a/InvenTree/company/templates/company/detail.html +++ b/InvenTree/company/templates/company/detail.html @@ -169,10 +169,10 @@
- {% include "filter_list.html" with id="stock" %} + {% include "filter_list.html" with id="customerstock" %}
-
+
@@ -225,6 +225,7 @@ }, url: "{% url 'api-stock-list' %}", filterKey: "customerstock", + filterTarget: '#filter-list-customerstock', }); {% if company.is_customer %} diff --git a/InvenTree/templates/js/translated/stock.js b/InvenTree/templates/js/translated/stock.js index 77aed29c11..988b93cad9 100644 --- a/InvenTree/templates/js/translated/stock.js +++ b/InvenTree/templates/js/translated/stock.js @@ -1468,7 +1468,7 @@ function loadStockTable(table, options) { var params = options.params || {}; - var filterListElement = options.filterList || '#filter-list-stock'; + var filterTarget = options.filterTarget || '#filter-list-stock'; var filters = {}; @@ -1484,7 +1484,7 @@ function loadStockTable(table, options) { original[k] = params[k]; } - setupFilterList(filterKey, table, filterListElement); + setupFilterList(filterKey, table, filterTarget); // Override the default values, or add new ones for (var key in params) {