mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 12:20:22 +00:00
Optimized product picker barcode clear handling (fixes #2745)
This commit is contained in:
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
### Stock
|
### Stock
|
||||||
|
|
||||||
- xxx
|
- Fixed that when using/scanning a barcode on the purchase page with a note attached (which prefills the note field) and when manually selecting another product afterwards, the note of the previously used barcode was incorrectly prefilled again
|
||||||
|
|
||||||
### Shopping list
|
### Shopping list
|
||||||
|
|
||||||
|
@@ -32,6 +32,7 @@ Grocy.Components.ProductPicker.Clear = function()
|
|||||||
{
|
{
|
||||||
Grocy.Components.ProductPicker.SetValue('');
|
Grocy.Components.ProductPicker.SetValue('');
|
||||||
Grocy.Components.ProductPicker.SetId(null);
|
Grocy.Components.ProductPicker.SetId(null);
|
||||||
|
$('#product_id').attr("barcode", "null");
|
||||||
}
|
}
|
||||||
|
|
||||||
Grocy.Components.ProductPicker.InProductAddWorkflow = function()
|
Grocy.Components.ProductPicker.InProductAddWorkflow = function()
|
||||||
|
@@ -155,7 +155,7 @@ $('#save-inventory-button').on('click', function(e)
|
|||||||
$('#note').val('');
|
$('#note').val('');
|
||||||
$('#price-hint').text("");
|
$('#price-hint').text("");
|
||||||
Grocy.Components.DateTimePicker.Clear();
|
Grocy.Components.DateTimePicker.Clear();
|
||||||
Grocy.Components.ProductPicker.SetValue('');
|
Grocy.Components.ProductPicker.Clear();
|
||||||
if (Grocy.FeatureFlags.GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING)
|
if (Grocy.FeatureFlags.GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING)
|
||||||
{
|
{
|
||||||
Grocy.Components.ShoppingLocationPicker.SetValue('');
|
Grocy.Components.ShoppingLocationPicker.SetValue('');
|
||||||
|
@@ -202,6 +202,7 @@ $('#save-purchase-button').on('click', function(e)
|
|||||||
}
|
}
|
||||||
|
|
||||||
Grocy.Components.ProductAmountPicker.Reset();
|
Grocy.Components.ProductAmountPicker.Reset();
|
||||||
|
Grocy.Components.ProductPicker.Clear();
|
||||||
$("#purchase-form").removeAttr("data-used-barcode");
|
$("#purchase-form").removeAttr("data-used-barcode");
|
||||||
$("#display_amount").attr("min", Grocy.DefaultMinAmount);
|
$("#display_amount").attr("min", Grocy.DefaultMinAmount);
|
||||||
$('#display_amount').val(Grocy.UserSettings.stock_default_purchase_amount);
|
$('#display_amount').val(Grocy.UserSettings.stock_default_purchase_amount);
|
||||||
@@ -216,7 +217,6 @@ $('#save-purchase-button').on('click', function(e)
|
|||||||
{
|
{
|
||||||
Grocy.Components.DateTimePicker.Clear();
|
Grocy.Components.DateTimePicker.Clear();
|
||||||
}
|
}
|
||||||
Grocy.Components.ProductPicker.SetValue('');
|
|
||||||
if (Grocy.FeatureFlags.GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING)
|
if (Grocy.FeatureFlags.GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING)
|
||||||
{
|
{
|
||||||
Grocy.Components.ShoppingLocationPicker.SetValue('');
|
Grocy.Components.ShoppingLocationPicker.SetValue('');
|
||||||
|
Reference in New Issue
Block a user