2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-06-12 18:25:26 +00:00

Stock item serial number functionality (#199)

* Stock item serial number functionality

- Allow serial numbers to be specified when creating a new stock item
- Allow serial number to be edited from stock item context

* Update build number and release notes
This commit is contained in:
Oliver
2022-08-02 13:34:15 +10:00
committed by GitHub
parent e78bb78bfd
commit 19ff6eb526
6 changed files with 55 additions and 8 deletions

View File

@ -855,17 +855,18 @@ Future<void> launchApiForm(
IconData icon = FontAwesomeIcons.save,
}) async {
showLoadingOverlay(context);
// List of fields defined by the server
Map<String, dynamic> serverFields = {};
if (url.isNotEmpty) {
showLoadingOverlay(context);
var options = await InvenTreeAPI().options(url);
hideLoadingOverlay();
// Invalid response from server
if (!options.isValid()) {
hideLoadingOverlay();
return;
}
@ -878,6 +879,7 @@ Future<void> launchApiForm(
icon: FontAwesomeIcons.userTimes,
);
hideLoadingOverlay();
return;
}
}
@ -927,6 +929,8 @@ Future<void> launchApiForm(
await field.loadInitialData();
}
hideLoadingOverlay();
// Now, launch a new widget!
Navigator.push(
context,
@ -1067,7 +1071,6 @@ class _APIFormWidgetState extends State<APIFormWidget> {
spacerRequired = true;
break;
}
}
return widgets;