From 4d215edbd0bc50b9494e2f81532b81ec2cf0bc50 Mon Sep 17 00:00:00 2001 From: Bernd Bestel Date: Sat, 9 Mar 2019 12:31:45 +0100 Subject: [PATCH] Clear displayed quantity unit after purchase/consume/inventory bookings --- public/viewjs/consume.js | 1 + public/viewjs/inventory.js | 1 + public/viewjs/purchase.js | 1 + 3 files changed, 3 insertions(+) diff --git a/public/viewjs/consume.js b/public/viewjs/consume.js index 01661008..27b0601a 100644 --- a/public/viewjs/consume.js +++ b/public/viewjs/consume.js @@ -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) diff --git a/public/viewjs/inventory.js b/public/viewjs/inventory.js index 2498d3fb..9882b24c 100644 --- a/public/viewjs/inventory.js +++ b/public/viewjs/inventory.js @@ -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(); diff --git a/public/viewjs/purchase.js b/public/viewjs/purchase.js index b7b6ff8a..d9c458f1 100644 --- a/public/viewjs/purchase.js +++ b/public/viewjs/purchase.js @@ -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();