refresh productcard on save

This commit is contained in:
Kurt Riddlesperger 2020-01-15 23:01:29 -06:00
parent d4bec3bd10
commit 0b93adb503
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');
}
},