From 79604a5ecbce2711ed2153c68017848e0678cd76 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sat, 27 Jun 2026 00:00:53 +0000 Subject: [PATCH] [UI] Fix StockColumn component --- src/frontend/src/tables/ColumnRenderers.tsx | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/frontend/src/tables/ColumnRenderers.tsx b/src/frontend/src/tables/ColumnRenderers.tsx index b2d4eb4f81..8d947bbe32 100644 --- a/src/frontend/src/tables/ColumnRenderers.tsx +++ b/src/frontend/src/tables/ColumnRenderers.tsx @@ -156,7 +156,7 @@ export function StockColumn(props: StockColumnProps): TableColumn { text = `# ${stock_item.serial}`; } - if (record.is_building) { + if (stock_item.is_building) { color = 'blue'; extra.push( {t`This stock item is in production`} ); - } else if (record.sales_order) { + } else if (stock_item.sales_order) { extra.push( {t`This stock item has been assigned to a sales order`} ); - } else if (record.customer) { + } else if (stock_item.customer) { extra.push( {t`This stock item has been assigned to a customer`} ); - } else if (record.belongs_to) { + } else if (stock_item.belongs_to) { extra.push( {t`This stock item is installed in another stock item`} ); - } else if (record.consumed_by) { + } else if (stock_item.consumed_by) { extra.push( {t`This stock item has been consumed by a build order`} ); - } else if (!record.in_stock) { + } else if (!stock_item.in_stock) { extra.push( {t`This stock item has expired`} ); - } else if (record.stale) { + } else if (stock_item.stale) { extra.push( {t`This stock item is stale`} ); } - if (record.in_stock) { + if (stock_item.in_stock) { if (allocated > 0) { if (allocated > quantity) { color = 'red'; @@ -267,7 +267,7 @@ export function StockColumn(props: StockColumnProps): TableColumn { } } - if (!record.in_stock) { + if (!stock_item.in_stock) { color = 'red'; }