mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
parent
3d8235423a
commit
a237de10ec
@ -209,6 +209,14 @@ export default function PartDetail() {
|
||||
label: t`Available Stock`,
|
||||
hidden: part.total_in_stock == part.unallocated_stock
|
||||
},
|
||||
{
|
||||
type: 'string',
|
||||
name: 'variant_stock',
|
||||
unit: true,
|
||||
label: t`Variant Stock`,
|
||||
hidden: !part.variant_stock,
|
||||
icon: 'stock'
|
||||
},
|
||||
{
|
||||
type: 'string',
|
||||
name: 'minimum_stock',
|
||||
@ -221,7 +229,7 @@ export default function PartDetail() {
|
||||
name: 'ordering',
|
||||
label: t`On order`,
|
||||
unit: true,
|
||||
hidden: part.ordering <= 0
|
||||
hidden: !part.purchaseable || part.ordering <= 0
|
||||
},
|
||||
{
|
||||
type: 'progressbar',
|
||||
@ -244,14 +252,14 @@ export default function PartDetail() {
|
||||
name: 'can_build',
|
||||
unit: true,
|
||||
label: t`Can Build`,
|
||||
hidden: !part.assembly
|
||||
hidden: true // TODO: Expose "can_build" to the API
|
||||
},
|
||||
{
|
||||
type: 'string',
|
||||
name: 'building',
|
||||
unit: true,
|
||||
label: t`Building`,
|
||||
hidden: !part.assembly
|
||||
hidden: !part.assembly || !part.building
|
||||
}
|
||||
];
|
||||
|
||||
@ -666,8 +674,8 @@ export default function PartDetail() {
|
||||
return [
|
||||
<DetailsBadge
|
||||
label={t`In Stock` + `: ${part.total_in_stock}`}
|
||||
color={part.in_stock >= part.minimum_stock ? 'green' : 'orange'}
|
||||
visible={part.in_stock > 0}
|
||||
color={part.total_in_stock >= part.minimum_stock ? 'green' : 'orange'}
|
||||
visible={part.total_in_stock > 0}
|
||||
key="in_stock"
|
||||
/>,
|
||||
<DetailsBadge
|
||||
@ -679,7 +687,7 @@ export default function PartDetail() {
|
||||
<DetailsBadge
|
||||
label={t`No Stock`}
|
||||
color="red"
|
||||
visible={part.in_stock == 0}
|
||||
visible={part.total_in_stock == 0}
|
||||
key="no_stock"
|
||||
/>,
|
||||
<DetailsBadge
|
||||
|
Loading…
Reference in New Issue
Block a user