manufacturing

This commit is contained in:
2026-03-15 11:12:58 -05:00
parent 6644ba2932
commit 0596970b99
25 changed files with 2097 additions and 37 deletions

View File

@@ -6,6 +6,8 @@ export const permissions = {
crmWrite: "crm.write",
inventoryRead: "inventory.read",
inventoryWrite: "inventory.write",
manufacturingRead: "manufacturing.read",
manufacturingWrite: "manufacturing.write",
filesRead: "files.read",
filesWrite: "files.write",
ganttRead: "gantt.read",

View File

@@ -6,6 +6,7 @@ export * from "./crm/types.js";
export * from "./files/types.js";
export * from "./gantt/types.js";
export * from "./inventory/types.js";
export * from "./manufacturing/types.js";
export * from "./projects/types.js";
export * from "./purchasing/types.js";
export * from "./sales/types.js";

View File

@@ -0,0 +1,113 @@
export const workOrderStatuses = ["DRAFT", "RELEASED", "IN_PROGRESS", "ON_HOLD", "COMPLETE", "CANCELLED"] as const;
export type WorkOrderStatus = (typeof workOrderStatuses)[number];
export interface ManufacturingProjectOptionDto {
id: string;
projectNumber: string;
name: string;
customerName: string;
status: string;
}
export interface ManufacturingItemOptionDto {
id: string;
sku: string;
name: string;
type: string;
unitOfMeasure: string;
}
export interface WorkOrderSummaryDto {
id: string;
workOrderNumber: string;
status: WorkOrderStatus;
itemId: string;
itemSku: string;
itemName: string;
projectId: string | null;
projectNumber: string | null;
projectName: string | null;
quantity: number;
completedQuantity: number;
dueDate: string | null;
warehouseId: string;
warehouseCode: string;
warehouseName: string;
locationId: string;
locationCode: string;
locationName: string;
updatedAt: string;
}
export interface WorkOrderMaterialRequirementDto {
componentItemId: string;
componentSku: string;
componentName: string;
unitOfMeasure: string;
quantityPer: number;
requiredQuantity: number;
issuedQuantity: number;
remainingQuantity: number;
}
export interface WorkOrderMaterialIssueDto {
id: string;
componentItemId: string;
componentSku: string;
componentName: string;
quantity: number;
warehouseId: string;
warehouseCode: string;
warehouseName: string;
locationId: string;
locationCode: string;
locationName: string;
notes: string;
createdAt: string;
createdByName: string;
}
export interface WorkOrderCompletionDto {
id: string;
quantity: number;
notes: string;
createdAt: string;
createdByName: string;
}
export interface WorkOrderDetailDto extends WorkOrderSummaryDto {
notes: string;
createdAt: string;
itemType: string;
itemUnitOfMeasure: string;
projectCustomerName: string | null;
dueQuantity: number;
materialRequirements: WorkOrderMaterialRequirementDto[];
materialIssues: WorkOrderMaterialIssueDto[];
completions: WorkOrderCompletionDto[];
}
export interface WorkOrderInput {
itemId: string;
projectId: string | null;
status: WorkOrderStatus;
quantity: number;
warehouseId: string;
locationId: string;
dueDate: string | null;
notes: string;
}
export interface WorkOrderMaterialIssueInput {
componentItemId: string;
warehouseId: string;
locationId: string;
quantity: number;
notes: string;
}
export interface WorkOrderCompletionInput {
quantity: number;
notes: string;
}