Add order page with real API calls

This commit is contained in:
Urtzi Alfaro
2025-09-19 11:44:38 +02:00
parent 447e2a5012
commit 105410c9d3
22 changed files with 2556 additions and 463 deletions

View File

@@ -0,0 +1,106 @@
{
"customer_types": {
"individual": "Individual",
"business": "Empresa",
"central_bakery": "Panadería Central"
},
"delivery_methods": {
"pickup": "Recogida",
"delivery": "Entrega a domicilio"
},
"payment_terms": {
"immediate": "Inmediato",
"net_30": "Neto 30 días",
"net_60": "Neto 60 días"
},
"payment_methods": {
"cash": "Efectivo",
"card": "Tarjeta",
"bank_transfer": "Transferencia bancaria",
"account": "Cuenta"
},
"payment_status": {
"pending": "Pendiente",
"partial": "Parcial",
"paid": "Pagado",
"failed": "Fallido",
"refunded": "Reembolsado"
},
"customer_segments": {
"regular": "Regular",
"vip": "VIP",
"wholesale": "Mayorista"
},
"priority_levels": {
"low": "Baja",
"normal": "Normal",
"high": "Alta"
},
"order_types": {
"standard": "Estándar",
"rush": "Urgente",
"recurring": "Recurrente",
"special": "Especial"
},
"order_status": {
"pending": "Pendiente",
"confirmed": "Confirmado",
"in_production": "En Producción",
"ready": "Listo",
"out_for_delivery": "En Reparto",
"delivered": "Entregado",
"cancelled": "Cancelado",
"failed": "Fallido"
},
"order_sources": {
"manual": "Manual",
"online": "En línea",
"phone": "Teléfono",
"app": "Aplicación",
"api": "API"
},
"sales_channels": {
"direct": "Directo",
"wholesale": "Mayorista",
"retail": "Minorista"
},
"labels": {
"name": "Nombre",
"business_name": "Nombre Comercial",
"customer_code": "Código de Cliente",
"email": "Email",
"phone": "Teléfono",
"address": "Dirección",
"city": "Ciudad",
"state": "Estado/Provincia",
"postal_code": "Código Postal",
"country": "País",
"customer_type": "Tipo de Cliente",
"delivery_method": "Método de Entrega",
"payment_terms": "Términos de Pago",
"payment_method": "Método de Pago",
"payment_status": "Estado del Pago",
"customer_segment": "Segmento de Cliente",
"priority_level": "Nivel de Prioridad",
"order_type": "Tipo de Pedido",
"order_status": "Estado del Pedido",
"order_source": "Origen del Pedido",
"sales_channel": "Canal de Ventas",
"order_number": "Número de Pedido",
"order_date": "Fecha del Pedido",
"delivery_date": "Fecha de Entrega",
"total_amount": "Importe Total",
"subtotal": "Subtotal",
"discount": "Descuento",
"tax": "Impuestos",
"shipping": "Envío",
"special_instructions": "Instrucciones Especiales"
},
"descriptions": {
"customer_type": "Tipo de cliente para determinar precios y términos comerciales",
"delivery_method": "Método preferido para la entrega de pedidos",
"payment_terms": "Términos y condiciones de pago acordados",
"customer_segment": "Segmentación del cliente para ofertas personalizadas",
"priority_level": "Nivel de prioridad para el procesamiento de pedidos"
}
}

View File

@@ -4,6 +4,7 @@ import authEs from './es/auth.json';
import inventoryEs from './es/inventory.json';
import foodSafetyEs from './es/foodSafety.json';
import suppliersEs from './es/suppliers.json';
import ordersEs from './es/orders.json';
import errorsEs from './es/errors.json';
// Translation resources by language
@@ -14,6 +15,7 @@ export const resources = {
inventory: inventoryEs,
foodSafety: foodSafetyEs,
suppliers: suppliersEs,
orders: ordersEs,
errors: errorsEs,
},
};
@@ -37,7 +39,7 @@ export const languageConfig = {
};
// Namespaces available in translations
export const namespaces = ['common', 'auth', 'inventory', 'foodSafety', 'suppliers', 'errors'] as const;
export const namespaces = ['common', 'auth', 'inventory', 'foodSafety', 'suppliers', 'orders', 'errors'] as const;
export type Namespace = typeof namespaces[number];
// Helper function to get language display name
@@ -51,7 +53,7 @@ export const isSupportedLanguage = (language: string): language is SupportedLang
};
// Export individual language modules for direct imports
export { commonEs, authEs, inventoryEs, foodSafetyEs, suppliersEs, errorsEs };
export { commonEs, authEs, inventoryEs, foodSafetyEs, suppliersEs, ordersEs, errorsEs };
// Default export with all translations
export default resources;