Add catalog registrations workflow
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m12s
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m12s
This commit is contained in:
88
src/types.ts
88
src/types.ts
@@ -78,6 +78,94 @@ export interface CuttingSettings {
|
||||
productOverrides: Record<string, CutProductOverride>;
|
||||
}
|
||||
|
||||
export type CatalogProductType = 'finished_product' | 'raw_material';
|
||||
|
||||
export interface CatalogCategory {
|
||||
id: number;
|
||||
name: string;
|
||||
description: string;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
}
|
||||
|
||||
export interface CatalogProduct {
|
||||
id: number;
|
||||
type: CatalogProductType;
|
||||
sku: string;
|
||||
name: string;
|
||||
categoryId: number | null;
|
||||
categoryName: string;
|
||||
composition: string;
|
||||
notes: string;
|
||||
gramature: number | null;
|
||||
materialYield: number | null;
|
||||
widthCm: number | null;
|
||||
color: string;
|
||||
subcategory: string;
|
||||
sizes: string[];
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
}
|
||||
|
||||
export interface ConsumptionReference {
|
||||
id: number;
|
||||
productId: number;
|
||||
productSku: string;
|
||||
productName: string;
|
||||
materialProductId: number | null;
|
||||
materialSku: string;
|
||||
materialName: string;
|
||||
color: string;
|
||||
generalYield: number | null;
|
||||
sizeYields: Record<string, number>;
|
||||
sizeAreas: Record<string, number>;
|
||||
gramature: number | null;
|
||||
efficiencyPercent: number | null;
|
||||
ribGPerPiece: number | null;
|
||||
materialCostPerKg: number | null;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
}
|
||||
|
||||
export interface CatalogSummary {
|
||||
categories: CatalogCategory[];
|
||||
products: CatalogProduct[];
|
||||
consumptionReferences: ConsumptionReference[];
|
||||
}
|
||||
|
||||
export type CatalogCategoryPayload = {
|
||||
name: string;
|
||||
description?: string;
|
||||
};
|
||||
|
||||
export type CatalogProductPayload = {
|
||||
type: CatalogProductType;
|
||||
sku: string;
|
||||
name: string;
|
||||
categoryId?: number | null;
|
||||
composition?: string;
|
||||
notes?: string;
|
||||
gramature?: number | string | null;
|
||||
materialYield?: number | string | null;
|
||||
widthCm?: number | string | null;
|
||||
color?: string;
|
||||
subcategory?: string;
|
||||
sizes?: string[];
|
||||
};
|
||||
|
||||
export type ConsumptionReferencePayload = {
|
||||
productId: number | string;
|
||||
materialProductId?: number | string | null;
|
||||
color?: string;
|
||||
generalYield?: number | string | null;
|
||||
sizeYields?: Record<string, number | string>;
|
||||
sizeAreas?: Record<string, number | string>;
|
||||
gramature?: number | string | null;
|
||||
efficiencyPercent?: number | string | null;
|
||||
ribGPerPiece?: number | string | null;
|
||||
materialCostPerKg?: number | string | null;
|
||||
};
|
||||
|
||||
export interface DateRange {
|
||||
start: Date;
|
||||
end: Date;
|
||||
|
||||
Reference in New Issue
Block a user