refresh productcard on save (#495)

This commit is contained in:
kriddles 2020-01-17 11:13:43 -06:00 committed by Bernd Bestel
parent 5de563f2c9
commit 7c2320e978
4 changed files with 4 additions and 0 deletions

View File

@ -130,6 +130,7 @@ $('#save-consume-button').on('click', function(e)
$("#location_id").find("option").remove().end().append("<option></option>");
}
Grocy.Components.ProductPicker.GetInputElement().focus();
Grocy.Components.ProductCard.Refresh(jsonForm.product_id);
Grocy.FrontendHelpers.ValidateForm('consume-form');
}
},

View File

@ -88,6 +88,7 @@
Grocy.Components.DateTimePicker.Clear();
Grocy.Components.ProductPicker.SetValue('');
Grocy.Components.ProductPicker.GetInputElement().focus();
Grocy.Components.ProductCard.Refresh(jsonForm.product_id);
Grocy.FrontendHelpers.ValidateForm('inventory-form');
}
},

View File

@ -99,6 +99,7 @@
Grocy.Components.DateTimePicker.Clear();
Grocy.Components.ProductPicker.SetValue('');
Grocy.Components.ProductPicker.GetInputElement().focus();
Grocy.Components.ProductCard.Refresh(jsonForm.product_id);
Grocy.FrontendHelpers.ValidateForm('purchase-form');
}
},

View File

@ -114,6 +114,7 @@ $('#save-transfer-button').on('click', function(e)
$("#location_id_to").val("");
$("#location_id_from").val("");
Grocy.Components.ProductPicker.GetInputElement().focus();
Grocy.Components.ProductCard.Refresh(jsonForm.product_id);
Grocy.FrontendHelpers.ValidateForm('transfer-form');
}
},