2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-04-28 21:46:46 +00:00

bug fixes

This commit is contained in:
Oliver 2021-10-05 23:01:37 +11:00
parent 3daae47a25
commit 3e16ab80f7

View File

@ -135,7 +135,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
final bool result = await item.addStock(context, quantity, notes: _notesController.text); final bool result = await item.addStock(context, quantity, notes: _notesController.text);
_notesController.clear(); _notesController.clear();
_stockUpdateMessage(); _stockUpdateMessage(result);
refresh(); refresh();
} }
@ -168,7 +168,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
method: "POST", method: "POST",
icon: FontAwesomeIcons.plusCircle, icon: FontAwesomeIcons.plusCircle,
onSuccess: (data) async { onSuccess: (data) async {
_stockUpdateMessage(); _stockUpdateMessage(true);
refresh(); refresh();
} }
); );
@ -200,7 +200,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
); );
} }
void _stockUpdateMessage({bool result = true}) { void _stockUpdateMessage(bool result) {
if (result) { if (result) {
showSnackIcon(L10().stockItemUpdated, success: true); showSnackIcon(L10().stockItemUpdated, success: true);
@ -214,7 +214,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
final bool result = await item.removeStock(context, quantity, notes: _notesController.text); final bool result = await item.removeStock(context, quantity, notes: _notesController.text);
_stockUpdateMessage(); _stockUpdateMessage(result);
refresh(); refresh();
@ -247,7 +247,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
method: "POST", method: "POST",
icon: FontAwesomeIcons.minusCircle, icon: FontAwesomeIcons.minusCircle,
onSuccess: (data) async { onSuccess: (data) async {
_stockUpdateMessage(); _stockUpdateMessage(true);
refresh(); refresh();
} }
); );
@ -287,7 +287,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
final bool result = await item.countStock(context, quantity, notes: _notesController.text); final bool result = await item.countStock(context, quantity, notes: _notesController.text);
_stockUpdateMessage(); _stockUpdateMessage(result);
refresh(); refresh();
} }
@ -320,7 +320,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
method: "POST", method: "POST",
icon: FontAwesomeIcons.clipboardCheck, icon: FontAwesomeIcons.clipboardCheck,
onSuccess: (data) async { onSuccess: (data) async {
_stockUpdateMessage(); _stockUpdateMessage(true);
refresh(); refresh();
} }
); );
@ -424,7 +424,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
method: "POST", method: "POST",
icon: FontAwesomeIcons.dolly, icon: FontAwesomeIcons.dolly,
onSuccess: (data) async { onSuccess: (data) async {
_stockUpdateMessage(); _stockUpdateMessage(true);
refresh(); refresh();
} }
); );