dstpabuaran.com/resources/js/pages/admin/manage/cutting/columns.tsx
Yoga Pangestu e7aa582572 feat: add cutting management functionality with CRUD operations
- Implemented CuttingIndex component for listing and managing cuttings.
- Added routes for cutting management in web.php.
- Created CuttingTest for testing cutting-related features including authorization, validation, and stock management.
- Updated roles create and edit pages to include necessary imports.
- Refactored settings and profile pages to streamline imports.
- Enhanced permissions checks for cutting management actions.
2026-08-04 02:24:11 +07:00

105 lines
2.5 KiB
TypeScript

export type CuttingMaterial = {
id: number;
raw_material_price_id: number;
material_usage: number;
material_result: number | null;
combination_id: number | null;
variant_name: string;
};
export type CuttingResult = {
id: number;
product_name: string | null;
cutting_result: number | null;
sample: number | null;
original_outside_sample: number | null;
};
export type CuttingCombination = {
id: number;
material_result: number | null;
};
export type Cutting = {
id: number;
created_by_id: number;
status: string;
description: string | null;
total_material_cost: number | null;
cost_per_unit: number | null;
photo_url: string | null;
created_at: string;
created_by: {
id: number;
user_profile: {
full_name: string;
};
};
cutting_results: CuttingResult[];
cutting_materials: {
id: number;
raw_material_price_id: number;
material_usage: number;
material_result: number | null;
combination_id: number | null;
raw_material_price: {
id: number;
variant: string;
price: number;
stock: number;
photo_url: string | null;
raw_material: {
id: number;
name: string;
unit: string;
};
};
}[];
cutting_material_combinations: {
id: number;
material_result: number | null;
}[];
};
export type CuttingForEdit = {
id: number;
status: string;
description: string | null;
product_name: string;
sample: number;
original_outside_sample: number;
cutting_result: number;
materials: {
id: number;
raw_material_price_id: number;
material_usage: number;
material_result: number | null;
combination_id: number | null;
variant: string | null;
photo_url: string | null;
}[];
combinations: {
id: number;
material_result: number | null;
material_indices: number[];
}[];
photo_key: string | null;
photo_url: string | null;
};
export type CuttingCreateData = {
rawMaterials: {
id: number;
name: string;
unit: string;
is_active: boolean;
raw_material_prices: {
id: number;
variant: string;
price: number;
stock: number;
photo_url: string | null;
}[];
}[];
};