This commit is contained in:
Marcelo
2026-04-24 03:17:04 +00:00
parent e705f5e965
commit 4973c18dc3
13 changed files with 1058 additions and 94 deletions

View File

@@ -1,4 +1,5 @@
export type RecapSkuRow = {
machineName: string;
sku: string;
good: number;
scrap: number;
@@ -46,6 +47,7 @@ export type RecapMachine = {
startedAt: string | null;
} | null;
moldChangeInProgress: boolean;
moldChangeStartMs: number | null;
};
heartbeat: {
lastSeenAt: string | null;
@@ -53,11 +55,56 @@ export type RecapMachine = {
};
};
export type RecapTimelineSegment =
| {
type: "production";
startMs: number;
endMs: number;
workOrderId: string | null;
sku: string | null;
label: string;
}
| {
type: "mold-change";
startMs: number;
endMs: number;
fromMoldId: string | null;
toMoldId: string | null;
durationSec: number;
label: string;
}
| {
type: "macrostop" | "microstop" | "slow-cycle";
startMs: number;
endMs: number;
reason: string | null;
durationSec: number;
label: string;
}
| {
type: "idle";
startMs: number;
endMs: number;
label: string;
};
export type RecapTimelineResponse = {
range: {
start: string;
end: string;
};
segments: RecapTimelineSegment[];
};
export type RecapResponse = {
range: {
start: string;
end: string;
};
availableShifts: Array<{
id: string;
name: string;
}>;
machines: RecapMachine[];
};