Skip to content

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.

style: color MES progress bar red when estimated time is exceeded

Rob Carringtonc23712ec961f
diff --git a/packages/react/src/Progress.tsx b/packages/react/src/Progress.tsx
index c07c7ad7f1..0cf9c25162 100644
--- a/packages/react/src/Progress.tsx
+++ b/packages/react/src/Progress.tsx
@@ -30,7 +30,8 @@ const Progress = forwardRef<
>
<ProgressPrimitive.Indicator
className={cn(
- "h-full w-full flex-1 bg-emerald-500 transition-all",
+ "h-full w-full flex-1 transition-all",
+ (value || 0) > 100 ? "bg-red-500" : "bg-emerald-500",
indicatorClassName
)}
style={{ transform: `translateX(-${100 - (value || 0)}%)` }}