mirror of
https://github.com/grocy/grocy.git
synced 2025-08-19 20:11:16 +00:00
Squashed commit
Fixed number input min/max amount handling Only (auto) save valid user inputs More filters on the stock journal pages Save the last price per used barcode and preselect that as a total price on purchase if not empty (closes #1131) Don't apply conversions for only_check_single_unit_in_stock ingredients (fixes #1120) Render shopping list userfields (closes #1052) Fixed Focus when adding included recipes (closes #1019) Order all base objects with NOCASE (closes #1086)
This commit is contained in:
@@ -23,6 +23,42 @@ $("#product-filter").on("change", function()
|
||||
stockJournalTable.column(1).search(text).draw();
|
||||
});
|
||||
|
||||
$("#transaction-type-filter").on("change", function()
|
||||
{
|
||||
var value = $(this).val();
|
||||
var text = $("#transaction-type-filter option:selected").text();
|
||||
if (value === "all")
|
||||
{
|
||||
text = "";
|
||||
}
|
||||
|
||||
stockJournalTable.column(4).search(text).draw();
|
||||
});
|
||||
|
||||
$("#location-filter").on("change", function()
|
||||
{
|
||||
var value = $(this).val();
|
||||
var text = $("#location-filter option:selected").text();
|
||||
if (value === "all")
|
||||
{
|
||||
text = "";
|
||||
}
|
||||
|
||||
stockJournalTable.column(5).search(text).draw();
|
||||
});
|
||||
|
||||
$("#user-filter").on("change", function()
|
||||
{
|
||||
var value = $(this).val();
|
||||
var text = $("#user-filter option:selected").text();
|
||||
if (value === "all")
|
||||
{
|
||||
text = "";
|
||||
}
|
||||
|
||||
stockJournalTable.column(6).search(text).draw();
|
||||
});
|
||||
|
||||
$("#search").on("keyup", Delay(function()
|
||||
{
|
||||
var value = $(this).val();
|
||||
@@ -37,6 +73,12 @@ $("#search").on("keyup", Delay(function()
|
||||
$("#clear-filter-button").on("click", function()
|
||||
{
|
||||
$("#search").val("");
|
||||
$("#transaction-type-filter").val("all");
|
||||
$("#location-filter").val("all");
|
||||
$("#user-filter").val("all");
|
||||
stockJournalTable.column(4).search("").draw();
|
||||
stockJournalTable.column(5).search("").draw();
|
||||
stockJournalTable.column(6).search("").draw();
|
||||
stockJournalTable.search("").draw();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user