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.

fix: don't allow type to be deselected on job operation

Brad Barbin88c748554698
diff --git a/apps/erp/app/utils/duration.ts b/apps/erp/app/utils/duration.ts
index bcf4b3011d..305b73cc09 100644
--- a/apps/erp/app/utils/duration.ts
+++ b/apps/erp/app/utils/duration.ts
@@ -200,7 +200,6 @@ export function makeDurations<
const totalDuration = setupDuration + laborDuration + machineDuration;
- // @ts-ignore
return {
...operation,
duration: totalDuration,
diff --git a/apps/mes/app/components/JobOperation.tsx b/apps/mes/app/components/JobOperation.tsx
index 4d0b690f81..d09aaff27f 100644
--- a/apps/mes/app/components/JobOperation.tsx
+++ b/apps/mes/app/components/JobOperation.tsx
@@ -1332,6 +1332,7 @@ function WorkTypeToggle({
value={value}
type="single"
onValueChange={onChange}
+ disabled={!!value && count <= 1}
className={cn(
"grid w-full",
count <= 1 && "grid-cols-1",