mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 11:36:24 +00:00
Display subcategory part count
This commit is contained in:
parent
57ab6546ab
commit
f32c9f024e
2 changed files with 3 additions and 0 deletions
|
|
@ -14,6 +14,8 @@ class InvenTreePartCategory extends InvenTreeModel {
|
||||||
|
|
||||||
String get pathstring => jsondata['pathstring'] ?? '';
|
String get pathstring => jsondata['pathstring'] ?? '';
|
||||||
|
|
||||||
|
int get partcount => jsondata['parts'] ?? 0;
|
||||||
|
|
||||||
InvenTreePartCategory() : super();
|
InvenTreePartCategory() : super();
|
||||||
|
|
||||||
InvenTreePartCategory.fromJson(Map<String, dynamic> json) : super.fromJson(json) {
|
InvenTreePartCategory.fromJson(Map<String, dynamic> json) : super.fromJson(json) {
|
||||||
|
|
|
||||||
|
|
@ -202,6 +202,7 @@ class SubcategoryList extends StatelessWidget {
|
||||||
return ListTile(
|
return ListTile(
|
||||||
title: Text("${cat.name}"),
|
title: Text("${cat.name}"),
|
||||||
subtitle: Text("${cat.description}"),
|
subtitle: Text("${cat.description}"),
|
||||||
|
trailing: Text("${cat.partcount}"),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
_openCategory(context, cat.pk);
|
_openCategory(context, cat.pk);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue