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: add outside operations to job traveler
Brad Barbin05fc996a7840
diff --git a/packages/documents/src/pdf/JobTravelerPDF.tsx b/packages/documents/src/pdf/JobTravelerPDF.tsxindex 3931db56a3..5dca977e35 100644--- a/packages/documents/src/pdf/JobTravelerPDF.tsx+++ b/packages/documents/src/pdf/JobTravelerPDF.tsx@@ -280,97 +280,88 @@ const JobTravelerPDF = ({<Text style={tw("w-2/3 text-right pr-4")}>Actions</Text></View>- {jobOperations- .filter((operation) => operation.operationType === "Inside")- .map((operation, index) => {- const setupQrCode =- operation.setupTime > 0- ? generateQRCode(- `${getStartPath(operation.id)}?type=Setup`,- 10- )- : null;- let laborQrCode =- operation.laborTime > 0- ? generateQRCode(- `${getStartPath(operation.id)}?type=Labor`,- 10- )- : null;- let machiningQrCode =- operation.machineTime > 0- ? generateQRCode(- `${getStartPath(operation.id)}?type=Machine`,- 10- )- : null;- let completeQrCode = generateQRCode(getEndPath(operation.id), 10);+ {jobOperations.map((operation, index) => {+ const isInside = operation.operationType === "Inside";+ const setupQrCode =+ operation.setupTime > 0+ ? generateQRCode(`${getStartPath(operation.id)}?type=Setup`, 10)+ : null;+ let laborQrCode =+ operation.laborTime > 0+ ? generateQRCode(`${getStartPath(operation.id)}?type=Labor`, 10)+ : null;+ let machiningQrCode =+ operation.machineTime > 0+ ? generateQRCode(+ `${getStartPath(operation.id)}?type=Machine`,+ 10+ )+ : null;+ let completeQrCode = generateQRCode(getEndPath(operation.id), 10);- if (- setupQrCode === null &&- laborQrCode === null &&- machiningQrCode === null- ) {- laborQrCode = generateQRCode(- `${getStartPath(operation.id)}?type=Labor`,- 10- );- }+ if (+ setupQrCode === null &&+ laborQrCode === null &&+ machiningQrCode === null+ ) {+ laborQrCode = generateQRCode(+ `${getStartPath(operation.id)}?type=Labor`,+ 10+ );+ }- return (- <View- style={tw(- "flex flex-col border-b border-gray-300 py-4 px-[6px] page-break-inside-avoid"- )}- key={operation.id}- >- <View style={tw("flex flex-row justify-between items-start")}>- <Text style={tw("w-1/12 text-left")}>- {getParallelizedOrder(index, operation, jobOperations)}- </Text>- <View style={tw("w-3/12 text-left")}>- <Text style={tw("font-bold")}>- {operation.description}- </Text>- </View>- <View style={tw("w-2/3 flex flex-row justify-end gap-2")}>- {setupQrCode && (- <View style={tw("flex flex-col items-center w-1/4")}>- <>- <Image src={setupQrCode} style={tw("w-16 h-16")} />- <Text style={tw("text-[8px] mt-1")}>Setup</Text>- </>- </View>- )}+ return (+ <View+ style={tw(+ "flex flex-col border-b border-gray-300 py-4 px-[6px] page-break-inside-avoid"+ )}+ key={operation.id}+ >+ <View style={tw("flex flex-row justify-between items-start")}>+ <Text style={tw("w-1/12 text-left")}>+ {getParallelizedOrder(index, operation, jobOperations)}+ </Text>+ <View style={tw("w-3/12 text-left")}>+ <Text style={tw("font-bold")}>{operation.description}</Text>+ </View>+ <View style={tw("w-2/3 flex flex-row justify-end gap-2")}>+ {isInside && setupQrCode && (+ <View style={tw("flex flex-col items-center w-1/4")}>+ <>+ <Image src={setupQrCode} style={tw("w-16 h-16")} />+ <Text style={tw("text-[8px] mt-1")}>Setup</Text>+ </>+ </View>+ )}- {laborQrCode && (- <View style={tw("flex flex-col items-center w-1/4")}>- <>- <Image src={laborQrCode} style={tw("w-16 h-16")} />- <Text style={tw("text-[8px] mt-1")}>Labor</Text>- </>- </View>- )}- {machiningQrCode && (- <View style={tw("flex flex-col items-center w-1/4")}>- <>- <Image- src={machiningQrCode}- style={tw("w-16 h-16")}- />- <Text style={tw("text-[8px] mt-1")}>Machine</Text>- </>- </View>- )}+ {isInside && laborQrCode && (+ <View style={tw("flex flex-col items-center w-1/4")}>+ <>+ <Image src={laborQrCode} style={tw("w-16 h-16")} />+ <Text style={tw("text-[8px] mt-1")}>Labor</Text>+ </>+ </View>+ )}+ {isInside && machiningQrCode && (<View style={tw("flex flex-col items-center w-1/4")}>- <Image src={completeQrCode} style={tw("w-16 h-16")} />- <Text style={tw("text-[8px] mt-1")}>Complete</Text>+ <>+ <Image+ src={machiningQrCode}+ style={tw("w-16 h-16")}+ />+ <Text style={tw("text-[8px] mt-1")}>Machine</Text>+ </></View>+ )}+ <View style={tw("flex flex-col items-center w-1/4")}>+ <Image src={completeQrCode} style={tw("w-16 h-16")} />+ <Text style={tw("text-[8px] mt-1")}>Complete</Text></View></View></View>- );- })}+ </View>+ );+ })}</View>{/* Notes Section */}