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
fix(production): keep batch notes off the schedule card
Raul43875606f887
diff --git a/apps/mes/app/components/Kanban/components/ItemCard.tsx b/apps/mes/app/components/Kanban/components/ItemCard.tsxindex d6bc5df91e..05a0dc47a4 100644--- a/apps/mes/app/components/Kanban/components/ItemCard.tsx+++ b/apps/mes/app/components/Kanban/components/ItemCard.tsx@@ -26,7 +26,6 @@ import {LuCirclePlay,LuClipboardCheck,LuSquareUser,- LuStickyNote,LuTimer,LuTrash,LuTriangleAlert@@ -260,15 +259,6 @@ export function ItemCard({{item.reworkId && <Badge variant="red">Rework</Badge>}</HStack>- {item.batchId && item.batchNotes && (- <HStack className="items-start justify-start space-x-2 max-md:col-span-2">- <LuStickyNote className="mt-0.5 shrink-0 text-muted-foreground" />- <span className="min-w-0 break-words text-sm line-clamp-2">- {item.batchNotes}- </span>- </HStack>- )}-{showDescription && item.description && (<HStack className="justify-start space-x-2 max-md:col-span-2"><LuClipboardCheck className="text-muted-foreground" />diff --git a/apps/mes/app/components/Kanban/types.ts b/apps/mes/app/components/Kanban/types.tsindex 62e20aaeea..19df3e6c4d 100644--- a/apps/mes/app/components/Kanban/types.ts+++ b/apps/mes/app/components/Kanban/types.ts@@ -78,9 +78,6 @@ const itemValidator = z.object({// The member jobs' readable ids, in collapse order — shown on the collapsed// batch card so it names every job in the batch, not just the first member.batchJobReadableIds: z.array(z.string()).optional(),- // The planner's notes from the batch builder, shown on the collapsed card so- // the operator choosing the next run sees there is something to read.- batchNotes: z.string().nullable().optional(),hasConflict: z.boolean().optional(),conflictReason: z.string().optional()});diff --git a/apps/mes/app/routes/x+/operations.tsx b/apps/mes/app/routes/x+/operations.tsxindex fc2f405e90..49e40c5ff1 100644--- a/apps/mes/app/routes/x+/operations.tsx+++ b/apps/mes/app/routes/x+/operations.tsx@@ -74,12 +74,11 @@ type BatchTotals = {quantity: number;targetQuantity: number;jobReadableIds: string[];- notes: string | null;};/**- * Per batch: the member count, summed quantities, member job numbers and the- * batch's notes, from the batch members' rows.+ * Per batch: the member count, summed quantities and member job numbers, from+ * the batch members' rows.*/function getBatchTotals(members: NonNullable<@@ -93,10 +92,7 @@ function getBatchTotals(size: 0,quantity: 0,targetQuantity: 0,- jobReadableIds: [],- notes: member.jobOperationBatch?.notes?.trim()- ? member.jobOperationBatch.notes- : null+ jobReadableIds: []};total.size += 1;total.quantity += member.operationQuantity ?? 0;@@ -162,7 +158,6 @@ function collapseBatches(batchSize: total?.size ?? members.length,batchJobReadableIds:total?.jobReadableIds ?? members.map((m) => m.title).filter(Boolean),- batchNotes: total?.notes ?? null,quantity:total?.quantity ??members.reduce((sum, m) => sum + (m.quantity ?? 0), 0),diff --git a/apps/mes/app/services/operations.service.ts b/apps/mes/app/services/operations.service.tsindex 4f07da1539..d4cd2bada4 100644--- a/apps/mes/app/services/operations.service.ts+++ b/apps/mes/app/services/operations.service.ts@@ -491,8 +491,7 @@ export async function getActiveJobOperationsByLocation(}/**- * The member operations of the given batches: quantities, the job number and- * the batch's notes.+ * The member operations of the given batches: quantities and the job number.*/export async function getJobOperationBatchMembers(client: SupabaseClient<Database>,@@ -502,7 +501,7 @@ export async function getJobOperationBatchMembers(return client.from("jobOperation").select(- "jobOperationBatchId, operationQuantity, targetQuantity, job(jobId), jobOperationBatch(notes)"+ "jobOperationBatchId, operationQuantity, targetQuantity, job(jobId)").in("jobOperationBatchId", batchIds).eq("companyId", companyId);