mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 11:36:24 +00:00
Add some friendly update messages
This commit is contained in:
parent
ba41ebde73
commit
4d5af825b1
1 changed files with 5 additions and 1 deletions
|
|
@ -168,6 +168,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
|
|||
method: "POST",
|
||||
icon: FontAwesomeIcons.plusCircle,
|
||||
onSuccess: (data) async {
|
||||
_stockUpdateMessage();
|
||||
refresh();
|
||||
}
|
||||
);
|
||||
|
|
@ -199,7 +200,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
|
|||
);
|
||||
}
|
||||
|
||||
void _stockUpdateMessage(bool result) {
|
||||
void _stockUpdateMessage({bool result = true}) {
|
||||
|
||||
if (result) {
|
||||
showSnackIcon(L10().stockItemUpdated, success: true);
|
||||
|
|
@ -246,6 +247,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
|
|||
method: "POST",
|
||||
icon: FontAwesomeIcons.minusCircle,
|
||||
onSuccess: (data) async {
|
||||
_stockUpdateMessage();
|
||||
refresh();
|
||||
}
|
||||
);
|
||||
|
|
@ -318,6 +320,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
|
|||
method: "POST",
|
||||
icon: FontAwesomeIcons.plusCircle,
|
||||
onSuccess: (data) async {
|
||||
_stockUpdateMessage();
|
||||
refresh();
|
||||
}
|
||||
);
|
||||
|
|
@ -421,6 +424,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
|
|||
method: "POST",
|
||||
icon: FontAwesomeIcons.dolly,
|
||||
onSuccess: (data) async {
|
||||
_stockUpdateMessage();
|
||||
refresh();
|
||||
}
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue