mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 11:36:24 +00:00
Add class for StockItemTestResult
This commit is contained in:
parent
0a5419eb6d
commit
868e1d20dc
3 changed files with 58 additions and 1 deletions
|
|
@ -20,7 +20,7 @@ abstract class RefreshableState<T extends StatefulWidget> extends State<T> {
|
|||
|
||||
// Function called after the widget is first build
|
||||
Future<void> onBuild(BuildContext context) async {
|
||||
return;
|
||||
refresh();
|
||||
}
|
||||
|
||||
// Function to request data for this page
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
|
|||
@override
|
||||
Future<void> request(BuildContext context) async {
|
||||
await item.reload(context);
|
||||
await item.getTestResults(context);
|
||||
}
|
||||
|
||||
void _editStockItem() {
|
||||
|
|
@ -423,6 +424,15 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
|
|||
);
|
||||
}
|
||||
|
||||
tiles.add(
|
||||
ListTile(
|
||||
title: Text("Test Results"),
|
||||
leading: FaIcon(FontAwesomeIcons.tasks),
|
||||
trailing: Text("${item.testResultCount}"),
|
||||
onTap: null,
|
||||
)
|
||||
);
|
||||
|
||||
if (item.trackingItemCount > 0) {
|
||||
tiles.add(
|
||||
ListTile(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue