planning payload

This commit is contained in:
2026-03-17 23:52:58 -05:00
parent 66d8814d89
commit 14708d7013
7 changed files with 875 additions and 246 deletions

View File

@@ -1,3 +1,15 @@
export const planningReadinessStates = ["READY", "SHORTAGE", "PENDING_SUPPLY", "UNSCHEDULED", "BLOCKED"] as const;
export type PlanningReadinessState = (typeof planningReadinessStates)[number];
export interface PlanningTaskActionDto {
kind: "OPEN_RECORD" | "RELEASE_WORK_ORDER" | "CREATE_WORK_ORDER" | "CREATE_PURCHASE_ORDER";
label: string;
href?: string | null;
workOrderId?: string | null;
itemId?: string | null;
}
export interface GanttTaskDto {
id: string;
text: string;
@@ -9,6 +21,29 @@ export interface GanttTaskDto {
status?: string;
ownerLabel?: string | null;
detailHref?: string | null;
entityId?: string | null;
projectId?: string | null;
workOrderId?: string | null;
salesOrderId?: string | null;
salesOrderLineId?: string | null;
itemId?: string | null;
itemSku?: string | null;
stationId?: string | null;
stationCode?: string | null;
stationName?: string | null;
readinessState?: PlanningReadinessState;
readinessScore?: number;
shortageItemCount?: number;
totalShortageQuantity?: number;
linkedSupplyQuantity?: number;
openSupplyQuantity?: number;
releaseReady?: boolean;
overdue?: boolean;
blockedReason?: string | null;
loadMinutes?: number;
capacityMinutes?: number | null;
utilizationPercent?: number | null;
actions?: PlanningTaskActionDto[];
}
export interface GanttLinkDto {
@@ -25,6 +60,10 @@ export interface PlanningSummaryDto {
activeWorkOrders: number;
overdueWorkOrders: number;
unscheduledWorkOrders: number;
releaseReadyWorkOrders: number;
blockedWorkOrders: number;
stationCount: number;
overloadedStations: number;
horizonStart: string;
horizonEnd: string;
}
@@ -39,9 +78,25 @@ export interface PlanningExceptionDto {
detailHref: string;
}
export interface PlanningStationLoadDto {
stationId: string;
stationCode: string;
stationName: string;
operationCount: number;
workOrderCount: number;
totalPlannedMinutes: number;
capacityMinutes: number;
utilizationPercent: number;
overloaded: boolean;
blockedCount: number;
readyCount: number;
lateCount: number;
}
export interface PlanningTimelineDto {
tasks: GanttTaskDto[];
links: GanttLinkDto[];
summary: PlanningSummaryDto;
exceptions: PlanningExceptionDto[];
stationLoads: PlanningStationLoadDto[];
}