mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 03:26:24 +00:00
More display items for Part view:
- BOM count - Used in count - Notes
This commit is contained in:
parent
d1fba27f3a
commit
fbd52e1414
4 changed files with 85 additions and 9 deletions
|
|
@ -45,6 +45,12 @@ class InvenTreePart extends InvenTreeModel {
|
|||
// Get the number of units being build for this Part
|
||||
double get building => double.tryParse(jsondata['building'].toString() ?? '0');
|
||||
|
||||
// Get the number of BOM items in this Part (if it is an assembly)
|
||||
int get bomItemCount => jsondata['bom_items'] as int ?? 0;
|
||||
|
||||
// Get the number of BOMs this Part is used in (if it is a component)
|
||||
int get usedInCount => jsondata['used_in'] as int ?? 0;
|
||||
|
||||
bool get isAssembly => jsondata['assembly'] ?? false;
|
||||
|
||||
bool get isComponent => jsondata['component'] ?? false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue