mirror of
https://github.com/inventree/inventree-app.git
synced 2025-08-06 04:31:43 +00:00
Update status codes (#307)
* Extra error info when connecting to server * Adds accessors for various types of status codes * Cleanup / refactor stock status codes - No longer need to duplicate these on the app * improvements to purchase order list - Add option to show closed orders - Render order status * Add purchase order status to order detail widget * Update release notes * Cleanup for imports * linting fixes
This commit is contained in:
@@ -66,6 +66,8 @@ class _PurchaseOrderDetailState extends RefreshableState<PurchaseOrderDetailWidg
|
||||
Future<void> request(BuildContext context) async {
|
||||
await order.reload();
|
||||
|
||||
await api.PurchaseOrderStatus.load();
|
||||
|
||||
lines = await order.getLineItems();
|
||||
|
||||
completedLines = 0;
|
||||
@@ -112,6 +114,12 @@ class _PurchaseOrderDetailState extends RefreshableState<PurchaseOrderDetailWidg
|
||||
title: Text(order.reference),
|
||||
subtitle: Text(order.description),
|
||||
leading: supplier == null ? null : InvenTreeAPI().getImage(supplier.thumbnail, width: 40, height: 40),
|
||||
trailing: Text(
|
||||
api.PurchaseOrderStatus.label(order.status),
|
||||
style: TextStyle(
|
||||
color: api.PurchaseOrderStatus.color(order.status)
|
||||
),
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user