Enhance existing api_forms functionality

- Allow form to be created without an actual API endpoint
- Useful for creating client-side forms without any server interaction
This commit is contained in:
Oliver Walters 2022-03-25 23:36:56 +11:00
parent 63bf88ac66
commit 02a9bbe3c6
3 changed files with 47 additions and 25 deletions

View file

@ -124,6 +124,11 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
// Clear the existing labels list
labels.clear();
// If the server does not support label printing, don't bother!
if (!InvenTreeAPI().supportsMixin("labels")) {
return;
}
InvenTreeAPI().get(
"/label/stock/",
params: {