From 39365f4e8356f5220bff43cd2919b422b07b4723 Mon Sep 17 00:00:00 2001 From: acazares Date: Sun, 2 Nov 2025 15:33:19 -0600 Subject: [PATCH] feat(sidebar): enhance sidebar with additional navigation items and translations feat(translations): update English and Spanish message files with new keys refactor(layout): simplify layout component by removing loading state logic refactor(page.server): adjust authentication flow to return public page for unauthenticated users --- frontend/messages/en.json | 34 ++- frontend/messages/es.json | 34 ++- .../lib/components/sidebar/app-sidebar.svelte | 5 +- .../src/lib/components/sidebar/modules.ts | 260 +++++++++++------- frontend/src/routes/+layout.svelte | 20 +- frontend/src/routes/+page.server.ts | 6 +- 6 files changed, 238 insertions(+), 121 deletions(-) diff --git a/frontend/messages/en.json b/frontend/messages/en.json index 37a98944..f17f8b15 100644 --- a/frontend/messages/en.json +++ b/frontend/messages/en.json @@ -1,4 +1,36 @@ { "$schema": "https://inlang.com/schema/inlang-message-format", - "hello_world": "Hello, {name} from en!" + "hello_world": "Hello, {name} from en!", + "sidebar": { + "catalogos_fijos": "Fixed Catalogs", + "codigos_pedimento_regimen": "Pedimento and Regime Codes", + "contenedores": "Containers", + "paises": "Countries", + "tipos_moneda": "Currency Types", + "secciones_aduanas": "Customs Sections", + "recintos": "Customs Warehouses", + "incoterms": "Incoterms", + "tipos_factura": "Invoice Types", + "tipos_material": "Material Types", + "metodos_pago": "Payment Methods", + "codigos_pedimento": "Pedimento Codes", + "regimenes_pedimentos": "Pedimento Regimes", + "sectores": "Sectors", + "estados": "States", + "metodos_transporte": "Transportation Modes", + "tipos_transporte": "Transportation Types", + "metodos_valoracion": "Valuation Methods", + "inventarios": "Inventories", + "gestionar_inventarios": "Manage Inventories", + "reportes": "Reports", + "pedimentos": "Pedimentos", + "nuevo_pedimento": "New Pedimento", + "consultar": "Search", + "historial": "History", + "configuracion": "Settings", + "general": "General", + "licencia": "License", + "usuarios": "Users", + "ayuda": "Help" + } } diff --git a/frontend/messages/es.json b/frontend/messages/es.json index 176345c1..4885e8aa 100644 --- a/frontend/messages/es.json +++ b/frontend/messages/es.json @@ -1,4 +1,36 @@ { "$schema": "https://inlang.com/schema/inlang-message-format", - "hello_world": "Hello, {name} from es!" + "hello_world": "Hello, {name} from es!", + "sidebar": { + "catalogos_fijos": "Catálogos Fijos", + "codigos_pedimento_regimen": "Códigos de Pedimento y Régimen", + "contenedores": "Contenedores", + "paises": "Países", + "tipos_moneda": "Tipos de moneda", + "secciones_aduanas": "Secciones de aduanas", + "recintos": "Recintos", + "incoterms": "Incoterms", + "tipos_factura": "Tipos de factura", + "tipos_material": "Tipos de material", + "metodos_pago": "Métodos de pago", + "codigos_pedimento": "Códigos de pedimento", + "regimenes_pedimentos": "Regímenes de pedimentos", + "sectores": "Sectores", + "estados": "Estados", + "metodos_transporte": "Métodos de transporte", + "tipos_transporte": "Tipos de transporte", + "metodos_valoracion": "Métodos de valoración", + "inventarios": "Inventarios", + "gestionar_inventarios": "Gestionar Inventarios", + "reportes": "Reportes", + "pedimentos": "Pedimentos", + "nuevo_pedimento": "Nuevo Pedimento", + "consultar": "Consultar", + "historial": "Historial", + "configuracion": "Configuración", + "general": "General", + "licencia": "Licencia", + "usuarios": "Usuarios", + "ayuda": "Ayuda" + } } diff --git a/frontend/src/lib/components/sidebar/app-sidebar.svelte b/frontend/src/lib/components/sidebar/app-sidebar.svelte index 817f1f44..b723c4a8 100644 --- a/frontend/src/lib/components/sidebar/app-sidebar.svelte +++ b/frontend/src/lib/components/sidebar/app-sidebar.svelte @@ -1,6 +1,6 @@ -{#if initialized} - {@render children?.()} -{:else} -
-
-
-

Cargando Anexo76...

-
-
-{/if} +{@render children?.()} diff --git a/frontend/src/routes/+page.server.ts b/frontend/src/routes/+page.server.ts index d237e4e6..b8c31c46 100644 --- a/frontend/src/routes/+page.server.ts +++ b/frontend/src/routes/+page.server.ts @@ -9,6 +9,8 @@ export const load: PageServerLoad = async ({ cookies }) => { throw redirect(303, '/dashboard'); } - // Si no está autenticado, redirigir al login - throw redirect(303, '/login'); + // Si no está autenticado, mostrar la página principal pública + return { + isAuthenticated: false + }; };