Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.
TypeScript ai-agentsbill-of-materialserpinventory-managementleanmanufacturingmanufacturing-execution-systemmcp-servermesmrpopen-source-erppostgresqlproduction-planningqmsquality-management-systemreact-routerself-hostedsupabasetraceabilitytypescript
style: fix progress bars in mes for small screens
Brad Barbin498c2f75a524
diff --git a/apps/mes/app/components/JobOperation/JobOperation.tsx b/apps/mes/app/components/JobOperation/JobOperation.tsxindex a11ba6d68d..6dcf17e901 100644--- a/apps/mes/app/components/JobOperation/JobOperation.tsx+++ b/apps/mes/app/components/JobOperation/JobOperation.tsx@@ -2050,20 +2050,27 @@ export const JobOperation = ({{!["chat"].includes(activeTab) && (<Times><div className=" lg:p-6">- <div className="flex flex-col w-full gap-2">+ <div className="w-full gap-2 grid grid-cols-[auto_auto_1fr]">{operation.setupDuration > 0 && (- <HStack>+ <><Tooltip><TooltipTrigger><LuTimer className="h-4 w-4 mr-1" /></TooltipTrigger><TooltipContent side="right">Setup</TooltipContent></Tooltip>+ <span className="text-xs text-muted-foreground font-mono flex-shrink-0 flex-nowrap">+ {formatDurationMilliseconds(progress.setup, {+ style: "short"+ })}+ /+ {formatDurationMilliseconds(operation.setupDuration, {+ style: "short"+ })}+ </span><BarProgress- label="Setup"gradientinvertGradient- value={`${formatDurationMilliseconds(progress.setup, { style: "short" })}/${formatDurationMilliseconds(operation.setupDuration, { style: "short" })}`}progress={(progress.setup / operation.setupDuration) * 100}@@ -2073,21 +2080,28 @@ export const JobOperation = ({: "bg-emerald-500"}/>- </HStack>+ </>)}{operation.laborDuration > 0 && (- <HStack>+ <><Tooltip><TooltipTrigger><LuHardHat className="h-4 w-4 mr-1" /></TooltipTrigger><TooltipContent side="right">Labor</TooltipContent></Tooltip>+ <span className="text-xs text-muted-foreground font-mono flex-shrink-0 flex-nowrap">+ {formatDurationMilliseconds(progress.labor, {+ style: "short"+ })}+ /+ {formatDurationMilliseconds(operation.laborDuration, {+ style: "short"+ })}+ </span><BarProgress- label="Labor"gradientinvertGradient- value={`${formatDurationMilliseconds(progress.labor, { style: "short" })}/${formatDurationMilliseconds(operation.laborDuration, { style: "short" })}`}progress={(progress.labor / operation.laborDuration) * 100}@@ -2097,21 +2111,28 @@ export const JobOperation = ({: "bg-emerald-500"}/>- </HStack>+ </>)}{operation.machineDuration > 0 && (- <HStack>+ <><Tooltip><TooltipTrigger><LuHammer className="h-4 w-4 mr-1" /></TooltipTrigger><TooltipContent side="right">Machine</TooltipContent></Tooltip>+ <span className="text-xs text-muted-foreground font-mono flex-shrink-0 flex-nowrap">+ {formatDurationMilliseconds(progress.machine, {+ style: "short"+ })}+ /+ {formatDurationMilliseconds(operation.machineDuration, {+ style: "short"+ })}+ </span><BarProgress- label="Machine"gradientinvertGradient- value={`${formatDurationMilliseconds(progress.machine, { style: "short" })}/${formatDurationMilliseconds(operation.machineDuration, { style: "short" })}`}progress={(progress.machine / operation.machineDuration) * 100}@@ -2121,30 +2142,31 @@ export const JobOperation = ({: "bg-emerald-500"}/>- </HStack>+ </>)}- <HStack>+ <><Tooltip><TooltipTrigger><FaTasks className="h-4 w-4 mr-1" /></TooltipTrigger><TooltipContent side="right">Quantity</TooltipContent></Tooltip>+ <span className="text-xs text-muted-foreground font-mono flex-shrink-0 flex-nowrap min-w-[100px]">+ {operation.quantityComplete}/{operation.targetQuantity}+ </span><BarProgress- label="Quantity"activeClassName={operation.operationStatus === "Paused" &&operation.quantityComplete < operation.targetQuantity? "bg-yellow-500": "bg-emerald-500"}- value={`${operation.quantityComplete}/${operation.targetQuantity}`}progress={(operation.quantityComplete / operation.targetQuantity) *100}/>- </HStack>+ </></div></div></Times>diff --git a/packages/react/src/Button.tsx b/packages/react/src/Button.tsxindex 25651464c8..e6ec86b1ed 100644--- a/packages/react/src/Button.tsx+++ b/packages/react/src/Button.tsx@@ -16,7 +16,7 @@ export const buttonVariants = cva(// Active state: subtle scale down for tactile press feedback"active:scale-[0.97] active:duration-75 active:ease-out",// Accessibility: respect reduced motion preferences- "motion-reduce:transform-none motion-reduce:transition-[background-color,color,box-shadow]"+ "motion-reduce:transform-none motion-reduce:transition-[background-color,color,box-shadow] corner-squircle"],{variants: {@@ -26,7 +26,7 @@ export const buttonVariants = cva(active:"bg-active text-active-foreground hover:bg-active/90 hover:text-active-foreground shadow-button-base before:hidden",secondary:- "bg-background text-foreground hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 shadow-button-base",+ "bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 shadow-button-base",solid:"bg-accent text-accent-foreground hover:bg-accent/90 shadow-button-base",destructive: