2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-04-30 22:46:49 +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

@ -19,7 +19,6 @@ class InvenTreePurchaseOrder extends InvenTreeModel {
Map<String, dynamic> formFields() {
return {
"reference": {},
"supplier": {},
"supplier_reference": {},
"description": {},
"target_date": {},

@ -1 +1 @@
Subproject commit bec61c2c8f076f4dc340962381e5bd6dd460f41b
Subproject commit ecd831b26c3739c235db65867d39ff9af517b09a

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;
}