2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-28 11:36:44 +00:00

Add more fields to BuildDetail page (#7183)

* Add more fields to BuildDetail page

* Prevent badges from flickering
This commit is contained in:
Oliver 2024-05-08 16:37:16 +10:00 committed by GitHub
parent 6d620c713a
commit 08b1bdb564
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 27 additions and 2 deletions

View File

@ -150,6 +150,27 @@ export default function BuildDetail() {
label: t`Responsible`, label: t`Responsible`,
badge: 'owner', badge: 'owner',
hidden: !build.responsible hidden: !build.responsible
},
{
type: 'text',
name: 'creation_date',
label: t`Created`,
icon: 'calendar',
hidden: !build.creation_date
},
{
type: 'text',
name: 'target_date',
label: t`Target Date`,
icon: 'calendar',
hidden: !build.target_date
},
{
type: 'text',
name: 'completion_date',
label: t`Completed`,
icon: 'calendar',
hidden: !build.completion_date
} }
]; ];

View File

@ -303,7 +303,11 @@ export default function CompanyDetail(props: Readonly<CompanyDetailProps>) {
const badges: ReactNode[] = useMemo(() => { const badges: ReactNode[] = useMemo(() => {
return [ return [
<DetailsBadge label={t`Inactive`} color="red" visible={!company.active} /> <DetailsBadge
label={t`Inactive`}
color="red"
visible={company.active == false}
/>
]; ];
}, [company]); }, [company]);

View File

@ -303,7 +303,7 @@ export default function SupplierPartDetail() {
<DetailsBadge <DetailsBadge
label={t`Inactive`} label={t`Inactive`}
color="red" color="red"
visible={!supplierPart.active} visible={supplierPart.active == false}
/> />
]; ];
}, [supplierPart]); }, [supplierPart]);