dstpabuaran.com/resources/js/pages/admin/master/raw-material/columns.tsx
Yoga Pangestu 384460686e feat: implement raw material management features including CRUD operations and draft handling
- Added RawMaterialController and RawMaterialVariantController for managing raw materials and their variants.
- Introduced RawMaterialRequest and RawMaterialVariantRequest for validation.
- Implemented RawMaterialService and RawMaterialVariantService for business logic.
- Created hooks for saving drafts of raw materials.
- Developed UI components for creating, editing, and listing raw materials and variants.
2026-08-02 00:54:05 +07:00

39 lines
763 B
TypeScript

export type RawMaterialVariant = {
id: number;
variant: string;
price: number;
stock: number;
photo_url: string | null;
};
export type RawMaterial = {
id: number;
name: string;
unit: string;
is_active: boolean;
raw_material_prices: RawMaterialVariant[];
};
export type RawMaterialVariantForEdit = {
id: number;
variant: string;
price: number;
stock: number;
photo_key: string | null;
photo_url: string | null;
};
export type RawMaterialForEdit = {
id: number;
name: string;
unit: string;
is_active: boolean;
raw_material_prices: RawMaterialVariantForEdit[];
};
export const UNIT_LABELS: Record<string, string> = {
kg: 'Kilogram',
meter: 'Meter',
yard: 'Yard',
};