ADD new frontend
This commit is contained in:
91
frontend/src/components/domain/inventory/index.ts
Normal file
91
frontend/src/components/domain/inventory/index.ts
Normal file
@@ -0,0 +1,91 @@
|
||||
// Inventory Domain Components
|
||||
export { default as InventoryTable, type InventoryTableProps } from './InventoryTable';
|
||||
export { default as StockLevelIndicator, type StockLevelIndicatorProps, useStockLevels } from './StockLevelIndicator';
|
||||
export { default as InventoryForm, type InventoryFormProps } from './InventoryForm';
|
||||
export { default as LowStockAlert, type LowStockAlertProps } from './LowStockAlert';
|
||||
|
||||
// Re-export related types from inventory types
|
||||
export type {
|
||||
InventoryFilters,
|
||||
IngredientResponse,
|
||||
StockAlert,
|
||||
IngredientFormData,
|
||||
UnitOfMeasure,
|
||||
ProductType,
|
||||
AlertSeverity,
|
||||
AlertType,
|
||||
SortOrder,
|
||||
} from '../../../types/inventory.types';
|
||||
|
||||
// Utility exports for common inventory operations
|
||||
export const INVENTORY_CONSTANTS = {
|
||||
// Spanish bakery categories
|
||||
BAKERY_CATEGORIES: [
|
||||
{ value: 'harinas', label: 'Harinas' },
|
||||
{ value: 'levaduras', label: 'Levaduras' },
|
||||
{ value: 'azucares', label: 'Az<41>cares y Endulzantes' },
|
||||
{ value: 'chocolates', label: 'Chocolates y Cacao' },
|
||||
{ value: 'frutas', label: 'Frutas y Frutos Secos' },
|
||||
{ value: 'lacteos', label: 'L<>cteos' },
|
||||
{ value: 'huevos', label: 'Huevos' },
|
||||
{ value: 'mantequillas', label: 'Mantequillas y Grasas' },
|
||||
{ value: 'especias', label: 'Especias y Aromas' },
|
||||
{ value: 'conservantes', label: 'Conservantes y Aditivos' },
|
||||
{ value: 'decoracion', label: 'Decoraci<63>n' },
|
||||
{ value: 'envases', label: 'Envases y Embalajes' },
|
||||
{ value: 'utensilios', label: 'Utensilios y Equipos' },
|
||||
{ value: 'limpieza', label: 'Limpieza e Higiene' },
|
||||
],
|
||||
|
||||
// Stock level filters
|
||||
STOCK_LEVEL_FILTERS: [
|
||||
{ value: '', label: 'Todos los niveles' },
|
||||
{ value: 'good', label: 'Stock Normal' },
|
||||
{ value: 'low', label: 'Stock Bajo' },
|
||||
{ value: 'critical', label: 'Stock Cr<43>tico' },
|
||||
{ value: 'out', label: 'Sin Stock' },
|
||||
],
|
||||
|
||||
// Units of measure commonly used in Spanish bakeries
|
||||
BAKERY_UNITS: [
|
||||
{ value: 'kg', label: 'Kilogramo (kg)' },
|
||||
{ value: 'g', label: 'Gramo (g)' },
|
||||
{ value: 'l', label: 'Litro (l)' },
|
||||
{ value: 'ml', label: 'Mililitro (ml)' },
|
||||
{ value: 'piece', label: 'Pieza (pz)' },
|
||||
{ value: 'package', label: 'Paquete' },
|
||||
{ value: 'bag', label: 'Bolsa' },
|
||||
{ value: 'box', label: 'Caja' },
|
||||
{ value: 'dozen', label: 'Docena' },
|
||||
{ value: 'cup', label: 'Taza' },
|
||||
{ value: 'tbsp', label: 'Cucharada' },
|
||||
{ value: 'tsp', label: 'Cucharadita' },
|
||||
],
|
||||
|
||||
// Default form values for new ingredients
|
||||
DEFAULT_INGREDIENT_VALUES: {
|
||||
low_stock_threshold: 10,
|
||||
reorder_point: 20,
|
||||
reorder_quantity: 50,
|
||||
is_perishable: false,
|
||||
requires_refrigeration: false,
|
||||
requires_freezing: false,
|
||||
},
|
||||
|
||||
// Alert severity colors and labels
|
||||
ALERT_SEVERITY: {
|
||||
CRITICAL: { label: 'Cr<43>tico', color: 'error', priority: 1 },
|
||||
HIGH: { label: 'Alto', color: 'warning', priority: 2 },
|
||||
MEDIUM: { label: 'Medio', color: 'info', priority: 3 },
|
||||
LOW: { label: 'Bajo', color: 'secondary', priority: 4 },
|
||||
},
|
||||
|
||||
// Stock status indicators
|
||||
STOCK_STATUS: {
|
||||
GOOD: { label: 'Normal', color: 'success' },
|
||||
LOW: { label: 'Bajo', color: 'warning' },
|
||||
CRITICAL: { label: 'Cr<43>tico', color: 'error' },
|
||||
OUT: { label: 'Sin Stock', color: 'error' },
|
||||
OVERSTOCKED: { label: 'Sobrestock', color: 'info' },
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user