mirror of
https://github.com/inventree/inventree-app.git
synced 2025-05-01 23:16:49 +00:00
Render more information on PurchaseOrder detail page
This commit is contained in:
parent
68d542cb6b
commit
a0a8f56490
@ -19,7 +19,6 @@ class InvenTreePurchaseOrder extends InvenTreeModel {
|
|||||||
Map<String, dynamic> formFields() {
|
Map<String, dynamic> formFields() {
|
||||||
return {
|
return {
|
||||||
"reference": {},
|
"reference": {},
|
||||||
"supplier": {},
|
|
||||||
"supplier_reference": {},
|
"supplier_reference": {},
|
||||||
"description": {},
|
"description": {},
|
||||||
"target_date": {},
|
"target_date": {},
|
||||||
|
2
lib/l10n
2
lib/l10n
@ -1 +1 @@
|
|||||||
Subproject commit bec61c2c8f076f4dc340962381e5bd6dd460f41b
|
Subproject commit ecd831b26c3739c235db65867d39ff9af517b09a
|
@ -71,17 +71,49 @@ class _PurchaseOrderDetailState extends RefreshableState<PurchaseOrderDetailWidg
|
|||||||
|
|
||||||
InvenTreeCompany? supplier = order.supplier;
|
InvenTreeCompany? supplier = order.supplier;
|
||||||
|
|
||||||
print(order.jsondata);
|
|
||||||
|
|
||||||
tiles.add(Card(
|
tiles.add(Card(
|
||||||
child: ListTile(
|
child: ListTile(
|
||||||
title: Text(order.reference),
|
title: Text(order.reference),
|
||||||
subtitle: Text(order.description),
|
subtitle: Text(order.description),
|
||||||
leading: supplier == null ? null : InvenTreeAPI().getImage(supplier.thumbnail, width: 40, height: 40),
|
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;
|
return tiles;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user