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