diff --git a/changelog/60_UNRELEASED_2020-xx-xx.md b/changelog/60_UNRELEASED_2020-xx-xx.md index 1d3d241f..938fcfeb 100644 --- a/changelog/60_UNRELEASED_2020-xx-xx.md +++ b/changelog/60_UNRELEASED_2020-xx-xx.md @@ -25,6 +25,7 @@ - Fixed that the "Expiring soon" sum (yellow header-button) on the stock overview page didn't include products which expire today (thanks @fipwmaqzufheoxq92ebc) - Fixed that the shopping cart icon on the stock overview page was also shown if the product was on an already deleted shopping list (if enabled) (thanks @fipwmaqzufheoxq92ebc) - Fixed that when editing a stock entry without a price, the price field was prefilled with `1` +- Fixed that location & product groups filter on the stock overview page did a contains search instead an exact search ### Recipe improvements/fixes - It's now possible to print recipes (button next to the recipe title) (thanks @zsarnett) diff --git a/public/viewjs/stockoverview.js b/public/viewjs/stockoverview.js index 191ec9a7..f3a3da18 100644 --- a/public/viewjs/stockoverview.js +++ b/public/viewjs/stockoverview.js @@ -6,7 +6,8 @@ { 'searchable': false, "targets": 0 }, { 'searchable': false, "targets": 0 }, { 'visible': false, 'targets': 5 }, - { 'visible': false, 'targets': 6 } + { 'visible': false, 'targets': 6 }, + { 'visible': false, 'targets': 7 } ], }); $('#stock-overview-table tbody').removeClass("d-none"); @@ -20,7 +21,7 @@ $("#location-filter").on("change", function() value = ""; } - stockOverviewTable.column(5).search(value).draw(); + stockOverviewTable.column(5).search("xx" + value + "xx", true, false, true).draw(); }); $("#product-group-filter").on("change", function() @@ -30,8 +31,8 @@ $("#product-group-filter").on("change", function() { value = ""; } - - stockOverviewTable.column(2).search(value).draw(); + + stockOverviewTable.column(7).search("xx" + value + "xx").draw(); }); $("#status-filter").on("change", function() diff --git a/views/stockoverview.blade.php b/views/stockoverview.blade.php index 97d90325..82363852 100644 --- a/views/stockoverview.blade.php +++ b/views/stockoverview.blade.php @@ -109,6 +109,7 @@