2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-06-13 02:35:27 +00:00

Add new list widgets

- PartCategory
- StockLocation
This commit is contained in:
Oliver
2021-10-04 08:20:32 +11:00
parent d08a94ac2c
commit cf3226da6f
3 changed files with 198 additions and 0 deletions

View File

@ -17,7 +17,9 @@ import "package:inventree/inventree/part.dart";
import "package:inventree/inventree/stock.dart";
import 'package:inventree/widget/stock_list.dart';
import 'category_list.dart';
import 'company_list.dart';
import 'location_list.dart';
// Widget for performing database-wide search
@ -207,6 +209,18 @@ class _SearchDisplayState extends RefreshableState<SearchWidget> {
title: Text(L10().partCategories),
leading: FaIcon(FontAwesomeIcons.sitemap),
trailing: Text("${nCategoryResults}"),
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => PartCategoryList(
{
"original_search": query
}
)
)
);
},
)
);
}
@ -241,6 +255,18 @@ class _SearchDisplayState extends RefreshableState<SearchWidget> {
title: Text(L10().stockLocations),
leading: FaIcon(FontAwesomeIcons.mapMarkerAlt),
trailing: Text("${nLocationResults}"),
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => StockLocationList(
{
"original_search": query
}
)
)
);
},
)
);
}