mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 11:36:24 +00:00
Add a custom "back" button to refreshable state
- Long press to return to the "home" screen
This commit is contained in:
parent
9eaf4a09da
commit
38e4735f77
3 changed files with 33 additions and 0 deletions
|
|
@ -473,6 +473,7 @@ class InvenTreeStockItem extends InvenTreeModel {
|
|||
return response.isValid();
|
||||
}
|
||||
|
||||
// TODO: Refactor this once the server supports API metadata for this action
|
||||
Future<bool> countStock(BuildContext context, double q, {String? notes}) async {
|
||||
|
||||
final bool result = await adjustStock(context, "/stock/count/", q, notes: notes);
|
||||
|
|
@ -480,6 +481,7 @@ class InvenTreeStockItem extends InvenTreeModel {
|
|||
return result;
|
||||
}
|
||||
|
||||
// TODO: Refactor this once the server supports API metadata for this action
|
||||
Future<bool> addStock(BuildContext context, double q, {String? notes}) async {
|
||||
|
||||
final bool result = await adjustStock(context, "/stock/add/", q, notes: notes);
|
||||
|
|
@ -487,6 +489,7 @@ class InvenTreeStockItem extends InvenTreeModel {
|
|||
return result;
|
||||
}
|
||||
|
||||
// TODO: Refactor this once the server supports API metadata for this action
|
||||
Future<bool> removeStock(BuildContext context, double q, {String? notes}) async {
|
||||
|
||||
final bool result = await adjustStock(context, "/stock/remove/", q, notes: notes);
|
||||
|
|
@ -494,6 +497,7 @@ class InvenTreeStockItem extends InvenTreeModel {
|
|||
return result;
|
||||
}
|
||||
|
||||
// TODO: Refactor this once the server supports API metadata for this action
|
||||
Future<bool> transferStock(int location, {double? quantity, String? notes}) async {
|
||||
if ((quantity == null) || (quantity < 0) || (quantity > this.quantity)) {
|
||||
quantity = this.quantity;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue