diff --git a/src/frontend/src/components/render/Part.tsx b/src/frontend/src/components/render/Part.tsx index 261db11569..78cd5aae42 100644 --- a/src/frontend/src/components/render/Part.tsx +++ b/src/frontend/src/components/render/Part.tsx @@ -34,18 +34,53 @@ export function RenderPart( badgeColor = instance.minimum_stock > stock ? 'yellow' : 'green'; } - const badge = !!badgeText ? ( - - {badgeText} - - ) : null; + const extra: ReactNode[] = []; + + // For active parts, we can display some extra information here + if (instance.active) { + if (instance.ordering) { + extra.push( + + {t`On Order`}: {formatDecimal(instance.ordering)}{' '} + + ); + } + + if (instance.building) { + extra.push( + + {t`In Production`}: {formatDecimal(instance.building)}{' '} + + ); + } + } + + const suffix: ReactNode = ( + + {badgeText && ( + + {badgeText} + + )} + {extra && ( + + )} + + ); return ( diff --git a/src/frontend/src/components/render/Stock.tsx b/src/frontend/src/components/render/Stock.tsx index 6ee29e6f17..1e5a13b25e 100644 --- a/src/frontend/src/components/render/Stock.tsx +++ b/src/frontend/src/components/render/Stock.tsx @@ -130,7 +130,7 @@ export function RenderStockItem( zIndex={10000} icon='sitemap' title={t`Location`} - extra={[{location.pathstring}]} + extra={[{location.pathstring}]} /> )}