Skip to content

Commit

Permalink
[PUI] Fix stock item state rendering (#8572)
Browse files Browse the repository at this point in the history
* fix rendering of stock status

* update api to support custom status

* Revert "update api to support custom status"

This reverts commit e7ff5aa.
  • Loading branch information
matmair authored Nov 28, 2024
1 parent db128f9 commit 7478a28
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/frontend/src/forms/StockForms.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,10 @@ function StockOperationsRow({
<Table.Td>
<Group grow justify='space-between' wrap='nowrap'>
<Text>{stockString}</Text>
<StatusRenderer status={record.status} type={ModelType.stockitem} />
<StatusRenderer
status={record.status_custom_key}
type={ModelType.stockitem}
/>
</Group>
</Table.Td>
{!merge && (
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/pages/stock/StockDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export default function StockDetail() {
hidden: !part.IPN
},
{
name: 'status',
name: 'status_custom_key',
type: 'status',
label: t`Stock Status`,
model: ModelType.stockitem
Expand Down

0 comments on commit 7478a28

Please sign in to comment.