mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-14 20:16:25 +00:00
Add some //TODO items
This commit is contained in:
parent
c4d8b5ce1c
commit
8374691d8c
3 changed files with 25 additions and 7 deletions
|
|
@ -97,6 +97,8 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
|
|||
|
||||
// TODO - Handle error cases
|
||||
refresh();
|
||||
|
||||
// TODO - Display a snackbar here indicating the action was successful (or otherwise)
|
||||
}
|
||||
|
||||
void _addStockDialog() async {
|
||||
|
|
@ -141,6 +143,8 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
|
|||
// TODO - Handle error cases
|
||||
|
||||
refresh();
|
||||
|
||||
// TODO - Display a snackbar here indicating the action was successful (or otherwise)
|
||||
}
|
||||
|
||||
void _removeStockDialog() {
|
||||
|
|
@ -187,6 +191,8 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
|
|||
// TODO - Handle error cases, timeout, etc
|
||||
|
||||
refresh();
|
||||
|
||||
// TODO - Display a snackbar here indicating the action was successful (or otherwise)
|
||||
}
|
||||
|
||||
void _countStockDialog() async {
|
||||
|
|
@ -218,7 +224,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
|
|||
}
|
||||
|
||||
|
||||
void _transferStock(int location) async {
|
||||
void _transferStock(BuildContext context, InvenTreeStockLocation location) async {
|
||||
Navigator.of(context).pop();
|
||||
|
||||
double quantity = double.parse(_quantityController.text);
|
||||
|
|
@ -227,11 +233,13 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
|
|||
_quantityController.clear();
|
||||
_notesController.clear();
|
||||
|
||||
var response = await item.transferStock(quantity, location, notes: notes);
|
||||
var response = await item.transferStock(quantity, location.pk, notes: notes);
|
||||
|
||||
// TODO - Error handling
|
||||
// TODO - Error handling (potentially return false?)
|
||||
refresh();
|
||||
|
||||
// TODO - Display a snackbar here indicating the action was successful (or otherwise)
|
||||
|
||||
}
|
||||
|
||||
void _transferStockDialog() async {
|
||||
|
|
@ -293,7 +301,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
|
|||
_selectedController.text = selectedLocation.pathstring;
|
||||
},
|
||||
onSaved: (value) {
|
||||
_transferStock(selectedLocation.pk);
|
||||
_transferStock(context, selectedLocation);
|
||||
},
|
||||
itemBuilder: (context, suggestion) {
|
||||
var location = suggestion as InvenTreeStockLocation;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue