mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-02-04 14:13:17 +00:00
Refactorin'
This commit is contained in:
parent
3e3ab680f6
commit
a4c96694bb
2 changed files with 11 additions and 8 deletions
|
|
@ -278,10 +278,11 @@ class APIFormField {
|
|||
itemAsString: (dynamic item) {
|
||||
switch (model) {
|
||||
case "part":
|
||||
return item["full_name"];
|
||||
return InvenTreePart.fromJson(item).fullname;
|
||||
case "partcategory":
|
||||
return InvenTreePartCategory.fromJson(item).pathstring;
|
||||
case "stocklocation":
|
||||
return item["pathstring"];
|
||||
return InvenTreeStockLocation.fromJson(item).pathstring;
|
||||
default:
|
||||
return "itemAsString not implemented for '${model}'";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue