2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-06-12 10:15:32 +00:00

Render more information on PurchaseOrder detail page

This commit is contained in:
Oliver
2021-09-28 01:15:30 +10:00
parent 68d542cb6b
commit a0a8f56490
3 changed files with 36 additions and 5 deletions

View File

@ -71,17 +71,49 @@ class _PurchaseOrderDetailState extends RefreshableState<PurchaseOrderDetailWidg
InvenTreeCompany? supplier = order.supplier;
print(order.jsondata);
tiles.add(Card(
child: ListTile(
title: Text(order.reference),
subtitle: Text(order.description),
leading: supplier == null ? null : InvenTreeAPI().getImage(supplier.thumbnail, width: 40, height: 40),
trailing: Text("${order.lineItems}"),
)
));
if (supplier != null) {
tiles.add(ListTile(
title: Text(L10().supplier),
subtitle: Text(supplier.name),
leading: FaIcon(FontAwesomeIcons.building),
onTap: () {
// TODO - Navigate to "supplier" page
},
));
}
if (order.supplierReference.isNotEmpty) {
tiles.add(ListTile(
title: Text(L10().supplierReference),
subtitle: Text(order.supplierReference),
leading: FaIcon(FontAwesomeIcons.hashtag),
));
}
if (order.issueDate.isNotEmpty) {
tiles.add(ListTile(
title: Text(L10().issueDate),
subtitle: Text(order.issueDate),
leading: FaIcon(FontAwesomeIcons.calendarAlt),
));
}
if (order.targetDate.isNotEmpty) {
tiles.add(ListTile(
title: Text(L10().targetDate),
subtitle: Text(order.targetDate),
leading: FaIcon(FontAwesomeIcons.calendarAlt),
));
}
return tiles;
}