mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 03:26:24 +00:00
Stock display (#379)
* Display stock quantity more prominently * Cleanup search widget * Update for stock_detail widget * More tweaks * Change bottom bar icon * Display boolean parameters appropriately * Adds ability to edit part parameters * Bump icon size a bit * Improvements to filter options - Allow filtering by "option" type - To start with, filter stock by status code * Remove debug message * Remove getTriState method - No longer needed - Remove associated unit tests * Adjust filters based on server API version * Muted colors
This commit is contained in:
parent
8076887e39
commit
e9eb84eace
20 changed files with 278 additions and 167 deletions
|
|
@ -133,12 +133,29 @@ class InvenTreePartParameter extends InvenTreeModel {
|
|||
@override
|
||||
String get URL => "part/parameter/";
|
||||
|
||||
@override
|
||||
List<String> get rolesRequired => ["part"];
|
||||
|
||||
@override
|
||||
InvenTreeModel createFromJson(Map<String, dynamic> json) => InvenTreePartParameter.fromJson(json);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> formFields() {
|
||||
return {};
|
||||
|
||||
Map<String, dynamic> fields = {
|
||||
"header": {
|
||||
"type": "string",
|
||||
"read_only": true,
|
||||
"label": name,
|
||||
"help_text": description,
|
||||
"value": "",
|
||||
},
|
||||
"data": {
|
||||
"type": "string",
|
||||
}
|
||||
};
|
||||
|
||||
return fields;
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
@ -160,7 +177,11 @@ class InvenTreePartParameter extends InvenTreeModel {
|
|||
return v;
|
||||
}
|
||||
|
||||
bool get as_bool => value.toLowerCase() == "true";
|
||||
|
||||
String get units => getString("units", subKey: "template_detail");
|
||||
|
||||
bool get is_checkbox => getBool("checkbox", subKey: "template_detail", backup: false);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue