From 2a604c244edf7312d765494b28e4bd31354e7a54 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Tue, 29 Mar 2022 23:29:17 +1100 Subject: [PATCH] Add search results for "company" --- InvenTree/templates/js/translated/search.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/InvenTree/templates/js/translated/search.js b/InvenTree/templates/js/translated/search.js index 5a5fd21eed..29b27e4a3f 100644 --- a/InvenTree/templates/js/translated/search.js +++ b/InvenTree/templates/js/translated/search.js @@ -136,6 +136,20 @@ function updateSearch() { } ); } + + if (user_settings.SEARCH_PREVIEW_SHOW_COMPANIES) { + // Search for matching companies + addSearchQuery( + 'company', + '{% trans "Companies" %}', + '{% url "api-company-list" %}', + {}, + renderCompany, + { + url: '/company', + } + ); + } // Wait until all the pending queries are completed $.when.apply($, searchQueries).done(function() {