mirror of
https://github.com/inventree/inventree-app.git
synced 2025-06-16 04:05:28 +00:00
Render more information on PurchaseOrder detail page
This commit is contained in:
@ -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
Submodule lib/l10n updated: bec61c2c8f...ecd831b26c
@ -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;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user