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(production): show notes on a one-job batch card

Raul9ed06d769f72
diff --git a/apps/mes/app/components/Kanban/components/ItemCard.tsx b/apps/mes/app/components/Kanban/components/ItemCard.tsx
index a80f6e851f..317e13cfdd 100644
--- a/apps/mes/app/components/Kanban/components/ItemCard.tsx
+++ b/apps/mes/app/components/Kanban/components/ItemCard.tsx
@@ -260,7 +260,7 @@ export function ItemCard({
{item.reworkId && <Badge variant="red">Rework</Badge>}
</HStack>
- {isBatch && item.batchNotes && (
+ {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="text-sm line-clamp-2">{item.batchNotes}</span>
diff --git a/packages/documents/src/pdf/blocks/jobTraveler/OperationsBlock.tsx b/packages/documents/src/pdf/blocks/jobTraveler/OperationsBlock.tsx
index 24a8467b02..9ab7463861 100644
--- a/packages/documents/src/pdf/blocks/jobTraveler/OperationsBlock.tsx
+++ b/packages/documents/src/pdf/blocks/jobTraveler/OperationsBlock.tsx
@@ -13,10 +13,12 @@ import { breakLongNotesWord } from "../../notesText";
import { tw } from "./tw";
import type { JobOperationWithSteps, JobTravelerData } from "./types";
+/** Starts a timer on the operation in MES; `?type=` picks Setup, Labor or Machine. */
function getStartPath(operationId: string) {
return `${getMESUrl()}/x/start/${operationId}`;
}
+/** Records completed quantity on the operation in MES, finishing it at its target. */
function getEndPath(operationId: string) {
return `${getMESUrl()}/x/end/${operationId}`;
}
@@ -44,6 +46,10 @@ const SUB_SECTION_TITLE = {
textTransform: "uppercase"
} as const;
+/**
+ * The sequence number printed for an operation. One that runs With Previous
+ * shares the number of the operation it runs with.
+ */
function getParallelizedOrder(
index: number,
item: JobOperationWithSteps,