mirror of
https://github.com/inventree/inventree-app.git
synced 2025-06-12 10:15:32 +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:
@ -95,6 +95,9 @@ class _PaginatedStockItemListState extends PaginatedSearchState<PaginatedStockIt
|
||||
@override
|
||||
Future<InvenTreePageResponse?> requestPage(int limit, int offset, Map<String, String> params) async {
|
||||
|
||||
// Ensure StockStatus codes are loaded
|
||||
await InvenTreeAPI().StockStatus.load();
|
||||
|
||||
final page = await InvenTreeStockItem().listPaginated(
|
||||
limit,
|
||||
offset,
|
||||
@ -120,7 +123,7 @@ class _PaginatedStockItemListState extends PaginatedSearchState<PaginatedStockIt
|
||||
trailing: Text("${item.displayQuantity}",
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
color: item.statusColor,
|
||||
color: InvenTreeAPI().StockStatus.color(item.status),
|
||||
),
|
||||
),
|
||||
onTap: () {
|
||||
|
Reference in New Issue
Block a user