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.

refactor: default MES play button to Setup, not Labor

Rob Carringtoncd929c51429e
diff --git a/apps/mes/app/components/JobOperation.tsx b/apps/mes/app/components/JobOperation.tsx
index a6f46938d8..e8105654cb 100644
--- a/apps/mes/app/components/JobOperation.tsx
+++ b/apps/mes/app/components/JobOperation.tsx
@@ -877,13 +877,13 @@ function useOperationState(operation: OperationWithDetails, job: Job) {
const [activeTab, setActiveTab] = useState("details");
const [eventType, setEventType] = useState(() => {
+ if (operation.setupDuration > 0) {
+ return "Setup";
+ }
if (operation.laborDuration > 0) {
return "Labor";
}
- if (operation.machineDuration > 0) {
- return "Machine";
- }
- return "Setup";
+ return "Machine";
});
const { carbon, accessToken } = useCarbon();