Add persistent production plans

This commit is contained in:
Cauê Faleiros
2026-08-25 11:47:07 -03:00
parent 21d9960145
commit 85afba4e5b
10 changed files with 493 additions and 16 deletions

View File

@@ -96,6 +96,11 @@ export interface ProductionOrderItem {
number: string;
status: ProductionOrderStatus;
statusLabel: string;
productionPlanId: number | null;
productionPlanNumber: string;
productionPlanName: string;
productionPlanStatus: string;
contractor: string;
orderReference: string;
issueDate: string | null;
expectedDate: string | null;
@@ -156,6 +161,7 @@ export type ProductionOrderPayload = {
quantity: number;
unit?: string;
integrationStatus?: string;
contractor?: string;
components?: Array<{
componentTinyId?: string;
componentSku?: string;
@@ -168,6 +174,37 @@ export type ProductionOrderPayload = {
metadata?: Record<string, unknown>;
};
export interface ProductionPlan {
id: number;
number: string;
name: string;
status: ProductionOrderStatus;
statusLabel: string;
contractor: string;
plannedStartDate: string | null;
expectedDate: string | null;
completedAt: string | null;
notes: string;
source: string;
orderCount: number;
totalQuantity: number;
actualCutQuantity: number;
finishedQuantity: number;
statusCounts: Record<string, number>;
createdAt: string | null;
updatedAt: string | null;
}
export type ProductionPlanPayload = {
id?: number;
name: string;
contractor?: string;
plannedStartDate?: string | null;
expectedDate?: string | null;
notes?: string;
source?: string;
};
export type CutPlanLotReservationPayload = {
lotId: number;
materialKey: string;
@@ -189,6 +226,7 @@ export interface CreateProductionOrdersResult {
productDescription?: string;
reason: string;
}>;
plan: ProductionPlan | null;
}
export type CutFamilyKey = 'BLCS' | 'BLOS' | 'BLMC' | 'BLPM' | 'BLRM' | 'OUTROS';