diff --git a/public/viewjs/stockentries.js b/public/viewjs/stockentries.js index dd81a17e..0b98686e 100644 --- a/public/viewjs/stockentries.js +++ b/public/viewjs/stockentries.js @@ -22,12 +22,22 @@ $.fn.dataTable.ext.search.push(function(settings, data, dataIndex) return false; }); +$("#clear-filter-button").on("click", function() +{ + Grocy.Components.ProductPicker.Clear(); + stockEntriesTable.draw(); +}); Grocy.Components.ProductPicker.GetPicker().on('change', function(e) { stockEntriesTable.draw(); }); +Grocy.Components.ProductPicker.GetInputElement().on('keyup', function(e) +{ + stockEntriesTable.draw(); +}); + $(document).on('click', '.stock-consume-button', function(e) { e.preventDefault(); diff --git a/views/stockentries.blade.php b/views/stockentries.blade.php index 78823d0a..b0fd1153 100644 --- a/views/stockentries.blade.php +++ b/views/stockentries.blade.php @@ -16,18 +16,37 @@

@yield('title')

+
+ +

-
+
@include('components.productpicker', array( 'products' => $products, - 'disallowAllProductWorkflows' => true + 'disallowAllProductWorkflows' => true, + 'isRequired' => false ))
+