mirror of
				https://github.com/inventree/inventree-app.git
				synced 2025-11-04 07:15:46 +00:00 
			
		
		
		
	bug fixes
This commit is contained in:
		@@ -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();
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
      );
 | 
					      );
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user