Improve the inventory page 3

This commit is contained in:
Urtzi Alfaro
2025-09-18 08:06:32 +02:00
parent dcb3ce441b
commit ae77a0e1c5
31 changed files with 2376 additions and 1774 deletions

View File

@@ -65,9 +65,7 @@ export interface IngredientCreate {
low_stock_threshold: number;
max_stock_level?: number;
reorder_point: number;
shelf_life_days?: number;
requires_refrigeration?: boolean;
requires_freezing?: boolean;
shelf_life_days?: number; // Default shelf life only
is_seasonal?: boolean;
supplier_id?: string;
average_cost?: number;
@@ -89,13 +87,7 @@ export interface IngredientUpdate {
reorder_point?: number;
reorder_quantity?: number;
max_stock_level?: number;
requires_refrigeration?: boolean;
requires_freezing?: boolean;
storage_temperature_min?: number;
storage_temperature_max?: number;
storage_humidity_max?: number;
shelf_life_days?: number;
storage_instructions?: string;
shelf_life_days?: number; // Default shelf life only
is_active?: boolean;
is_perishable?: boolean;
is_seasonal?: boolean;
@@ -121,13 +113,7 @@ export interface IngredientResponse {
reorder_point: number;
reorder_quantity: number;
max_stock_level?: number;
requires_refrigeration: boolean;
requires_freezing: boolean;
storage_temperature_min?: number;
storage_temperature_max?: number;
storage_humidity_max?: number;
shelf_life_days?: number;
storage_instructions?: string;
shelf_life_days?: number; // Default shelf life only
is_active: boolean;
is_perishable: boolean;
is_seasonal?: boolean;
@@ -149,38 +135,81 @@ export interface IngredientResponse {
// Stock Management Types
export interface StockCreate {
ingredient_id: string;
batch_number?: string;
lot_number?: string;
supplier_batch_ref?: string;
// Production stage tracking
production_stage?: ProductionStage;
transformation_reference?: string;
quantity: number;
unit_price: number;
current_quantity: number;
received_date?: string;
expiration_date?: string;
batch_number?: string;
supplier_id?: string;
purchase_order_reference?: string;
best_before_date?: string;
// Stage-specific expiration fields
original_expiration_date?: string;
transformation_date?: string;
final_expiration_date?: string;
notes?: string;
unit_cost?: number;
storage_location?: string;
warehouse_zone?: string;
shelf_position?: string;
quality_status?: string;
// Batch-specific storage requirements
requires_refrigeration?: boolean;
requires_freezing?: boolean;
storage_temperature_min?: number;
storage_temperature_max?: number;
storage_humidity_max?: number;
shelf_life_days?: number;
storage_instructions?: string;
// Optional supplier reference
supplier_id?: string;
}
export interface StockUpdate {
batch_number?: string;
lot_number?: string;
supplier_batch_ref?: string;
// Production stage tracking
production_stage?: ProductionStage;
transformation_reference?: string;
quantity?: number;
unit_price?: number;
current_quantity?: number;
reserved_quantity?: number;
received_date?: string;
expiration_date?: string;
batch_number?: string;
best_before_date?: string;
// Stage-specific expiration fields
original_expiration_date?: string;
transformation_date?: string;
final_expiration_date?: string;
unit_cost?: number;
storage_location?: string;
warehouse_zone?: string;
shelf_position?: string;
quality_status?: string;
notes?: string;
is_available?: boolean;
// Batch-specific storage requirements
requires_refrigeration?: boolean;
requires_freezing?: boolean;
storage_temperature_min?: number;
storage_temperature_max?: number;
storage_humidity_max?: number;
shelf_life_days?: number;
storage_instructions?: string;
}
export interface StockResponse {
@@ -209,6 +238,7 @@ export interface StockResponse {
batch_number?: string;
supplier_id?: string;
purchase_order_reference?: string;
storage_location?: string;
// Stage-specific expiration fields
original_expiration_date?: string;
@@ -219,6 +249,16 @@ export interface StockResponse {
is_available: boolean;
is_expired: boolean;
days_until_expiry?: number;
// Batch-specific storage requirements
requires_refrigeration: boolean;
requires_freezing: boolean;
storage_temperature_min?: number;
storage_temperature_max?: number;
storage_humidity_max?: number;
shelf_life_days?: number;
storage_instructions?: string;
created_at: string;
updated_at: string;
created_by?: string;