mirror of
https://github.com/inventree/inventree-app.git
synced 2025-06-17 04:35:26 +00:00
Structural categories (#220)
* Add support for editing "structural" tree field - Requires API v83 or newer * Update release notes
This commit is contained in:
@ -25,11 +25,18 @@ class InvenTreePartCategory extends InvenTreeModel {
|
||||
@override
|
||||
Map<String, dynamic> formFields() {
|
||||
|
||||
return {
|
||||
Map<String, dynamic> fields = {
|
||||
"name": {},
|
||||
"description": {},
|
||||
"parent": {}
|
||||
"parent": {},
|
||||
"structural": {},
|
||||
};
|
||||
|
||||
if (!api.supportsStructuralCategories) {
|
||||
fields.remove("structural");
|
||||
}
|
||||
|
||||
return fields;
|
||||
}
|
||||
|
||||
String get pathstring => (jsondata["pathstring"] ?? "") as String;
|
||||
|
@ -652,13 +652,18 @@ class InvenTreeStockLocation extends InvenTreeModel {
|
||||
|
||||
@override
|
||||
Map<String, dynamic> formFields() {
|
||||
return {
|
||||
Map<String, dynamic> fields = {
|
||||
"name": {},
|
||||
"description": {},
|
||||
"parent": {
|
||||
|
||||
},
|
||||
"parent": {},
|
||||
"structural": {},
|
||||
};
|
||||
|
||||
if (!api.supportsStructuralCategories) {
|
||||
fields.remove("structural");
|
||||
}
|
||||
|
||||
return fields;
|
||||
}
|
||||
|
||||
String get parentPathString {
|
||||
|
Reference in New Issue
Block a user