From ad40fd3bdd7785d6c98db302a67c3d51f4283150 Mon Sep 17 00:00:00 2001 From: "kelvin.yau" Date: Tue, 11 Aug 2026 06:16:52 +0800 Subject: [PATCH] enson fix --- .../ItemTracing/buildJoPreludeGraphNodes.ts | 6 +++++- .../ItemTracing/buildTraceGraphNodes.ts | 20 +++++++++++++++---- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/src/components/ItemTracing/buildJoPreludeGraphNodes.ts b/src/components/ItemTracing/buildJoPreludeGraphNodes.ts index 76016595..9aa147f8 100644 --- a/src/components/ItemTracing/buildJoPreludeGraphNodes.ts +++ b/src/components/ItemTracing/buildJoPreludeGraphNodes.ts @@ -1,4 +1,8 @@ -import { ItemLotTraceJoPrelude, ItemLotTraceMaterialInput } from "@/app/api/itemTracing"; +import { + ItemLotTraceJoPickLine, + ItemLotTraceJoPrelude, + ItemLotTraceMaterialInput, +} from "@/app/api/itemTracing"; import { TraceGraphDetailField, TraceGraphDetailLabels, diff --git a/src/components/ItemTracing/buildTraceGraphNodes.ts b/src/components/ItemTracing/buildTraceGraphNodes.ts index b79ab868..bd878aba 100644 --- a/src/components/ItemTracing/buildTraceGraphNodes.ts +++ b/src/components/ItemTracing/buildTraceGraphNodes.ts @@ -168,6 +168,11 @@ export interface TraceGraphNode { /** Raw status codes (for coloring). */ processingStatus?: string; matchStatus?: string; + /** Material-pick stock summary chips (JO pick cards). */ + stockAvailableLabel?: string; + stockStatusLabel?: string; + bomReqQtyLabel?: string; + stockReqQtyLabel?: string; } export interface TraceGraphDetailLabels extends TraceGraphNodeLabels { @@ -255,6 +260,16 @@ export interface TraceGraphDetailLabels extends TraceGraphNodeLabels { categoryTerminal: string; processingStatus: string; matchStatus: string; + detailBomReqQty: string; + detailStockReqQty: string; + detailStockAvailable: string; + detailStockStatus: string; + stockStatusSufficient: string; + stockStatusInsufficient: string; + /** Displayed when a JO pick-table field does not apply. */ + na: string; + /** Unpicked pick-order line (no stock-out yet). */ + pendingPick: string; } const categoryForKind = (kind: TraceGraphNodeKind, labels: TraceGraphDetailLabels): string => { @@ -873,10 +888,7 @@ export const buildTraceGraphNodes = ( fieldIf(labels.detailRemarks, m.remarks), ) : detailsOf( - field( - labels.detailType, - kind === "JO_CREATED" ? labels.nodeJoCreated : labels.tr.movementType(m.movementType), - ), + field(labels.detailType, labels.tr.movementType(m.movementType)), field(labels.detailDirection, labels.tr.direction(m.direction)), field(labels.detailSourceDoc, m.refCode, { linkKind,