Clear displayed quantity unit after purchase/consume/inventory bookings

This commit is contained in:
Bernd Bestel 2019-03-09 12:31:45 +01:00
parent a3d4fd834f
commit 4d215edbd0
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300
3 changed files with 3 additions and 0 deletions

View File

@ -46,6 +46,7 @@
$("#amount").attr("step", "1");
$("#amount").parent().find(".invalid-feedback").text(L('The amount cannot be lower than #1', '1'));
$('#amount').val(1);
$('#amount_qu_unit').text("");
$("#tare-weight-handling-info").addClass("d-none");
Grocy.Components.ProductPicker.Clear();
if (Grocy.FeatureFlags.GROCY_FEATURE_FLAG_RECIPES)

View File

@ -52,6 +52,7 @@
$("#new_amount").attr("step", "1");
$("#new_amount").parent().find(".invalid-feedback").text(L('The amount cannot be lower than #1', '0'));
$('#new_amount').val('');
$('#new_amount_qu_unit').text("");
Grocy.Components.DateTimePicker.Clear();
Grocy.Components.ProductPicker.SetValue('');
Grocy.Components.ProductPicker.GetInputElement().focus();

View File

@ -70,6 +70,7 @@
$("#amount").parent().find(".invalid-feedback").text(L('The amount cannot be lower than #1', '1'));
$('#amount').val(0);
$('#price').val('');
$('#amount_qu_unit').text("");
$("#tare-weight-handling-info").addClass("d-none");
Grocy.Components.LocationPicker.Clear();
Grocy.Components.DateTimePicker.Clear();