From 2c8ec53ed217974b757148910b4ddd0e0540f460 Mon Sep 17 00:00:00 2001 From: Oliver Date: Wed, 11 Nov 2026 14:33:22 +1100 Subject: [PATCH] [UI] Display "primary" badge for SupplierPart (#13246) When displaying a SupplierPart inline (e.g. within a form) - add a "Primary" badge --- src/frontend/src/components/render/Company.tsx | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/frontend/src/components/render/Company.tsx b/src/frontend/src/components/render/Company.tsx index 09aeee04cc..c2f30b7399 100644 --- a/src/frontend/src/components/render/Company.tsx +++ b/src/frontend/src/components/render/Company.tsx @@ -1,6 +1,7 @@ +import { t } from '@lingui/core/macro'; import type { ReactNode } from 'react'; -import { Text } from '@mantine/core'; +import { Badge, Group, Text } from '@mantine/core'; import { ModelType } from '@lib/enums/ModelType'; import { getDetailUrl } from '@lib/functions/Navigation'; @@ -87,6 +88,17 @@ export function RenderSupplierPart( suffix += ` (${instance.pack_quantity})`; } + const suffixNode: ReactNode = ( + + {instance.primary && ( + + {t`Primary`} + + )} + {suffix && {suffix}} + + ); + return (