diff --git a/frontend/src/lib/config/shortcuts.ts b/frontend/src/lib/config/shortcuts.ts index 16249465..13ad46de 100644 --- a/frontend/src/lib/config/shortcuts.ts +++ b/frontend/src/lib/config/shortcuts.ts @@ -19,6 +19,9 @@ export const GLOBAL_NAV = { 'e': '/dashboard/reference_data/customs_sections#', 'd': '/dashboard/reference_data/customs_sections', + // Customs & Brokers + 'a': '/dashboard/customs_brokers', + // Invoices 'i': '/dashboard/invoices', diff --git a/frontend/src/lib/config/shortcuts/customs-broker-edit-shortcuts.ts b/frontend/src/lib/config/shortcuts/customs-broker-edit-shortcuts.ts new file mode 100644 index 00000000..dc716087 --- /dev/null +++ b/frontend/src/lib/config/shortcuts/customs-broker-edit-shortcuts.ts @@ -0,0 +1,35 @@ +import type { ShortcutDef } from '$lib/stores/shortcut-store'; + +export const obtenerAtajosEdicionAgente = (acciones: { + irGeneral: () => void; + irContacto: () => void; + irDireccion: () => void; + guardar: () => void; + cancelar: () => void; +}): ShortcutDef[] => [ + { + key: 'Alt+Digit1', + description: 'Tab General', + action: acciones.irGeneral + }, + { + key: 'Alt+Digit2', + description: 'Tab Contacto', + action: acciones.irContacto + }, + { + key: 'Alt+Digit3', + description: 'Tab Dirección', + action: acciones.irDireccion + }, + { + key: 'Ctrl+S', + description: 'Guardar', + action: acciones.guardar + }, + { + key: 'Escape', + description: 'Cancelar / Volver', + action: acciones.cancelar + } + ]; diff --git a/frontend/src/lib/config/shortcuts/customs-brokers-list-shortcuts.ts b/frontend/src/lib/config/shortcuts/customs-brokers-list-shortcuts.ts new file mode 100644 index 00000000..88d2a8d2 --- /dev/null +++ b/frontend/src/lib/config/shortcuts/customs-brokers-list-shortcuts.ts @@ -0,0 +1,31 @@ +import type { ShortcutDef } from '$lib/stores/shortcut-store'; + +export const obtenerAtajosListaAgentes = (acciones: { + irAgentes: () => void; + irAduanas: () => void; + crear: () => void; + recargar: () => void; +}): ShortcutDef[] => [ + { + key: 'Alt+Digit1', + description: 'Ir a Agentes', + action: acciones.irAgentes, + context: 'Customs Brokers Navigation' + }, + { + key: 'Alt+Digit2', + description: 'Ir a Aduanas', + action: acciones.irAduanas, + context: 'Customs Brokers Navigation' + }, + { + key: 'Alt+Shift+N', + description: 'Nuevo Registro', + action: acciones.crear + }, + { + key: 'Alt+Shift+R', + description: 'Actualizar Lista', + action: acciones.recargar + } + ]; diff --git a/frontend/src/routes/dashboard/customs_brokers/+page.svelte b/frontend/src/routes/dashboard/customs_brokers/+page.svelte index a1a68f0b..f4af9ee9 100644 --- a/frontend/src/routes/dashboard/customs_brokers/+page.svelte +++ b/frontend/src/routes/dashboard/customs_brokers/+page.svelte @@ -1,333 +1,479 @@
- Catálogo de agentes aduanales y apoderados legales -
-Administración de Agentes y Secciones Aduanales
+| Patente | -Nombre | -Licencia | -Ciudad | -
|---|---|---|---|
| Cargando... | |||
| No se encontraron registros | |||
| {item.broker_key} | -{item.name || '-'} | -{item.license || '-'} | -{item.city || '-'} | -
Detalles del Agente
-| Patente | +Nombre | +Licencia | +Ciudad | +
|---|---|---|---|
| Cargando... | |||
| No se encontraron registros | |||
| {item.broker_key} | +{item.name || '-'} | +{item.license || '-'} | +{item.city || '-'} | +
{selectedItem.license || '-'}
-+ Detalles del Agente +
+{selectedItem.tax_id}
-{selectedItem.address || ''}
-- {[selectedItem.city, selectedItem.state].filter(Boolean).join(', ')} -
-- {[selectedItem.postal_code, selectedItem.country].filter(Boolean).join(', ')} -
-Selecciona un agente
-{selectedItem.license || '-'}
+{selectedItem.tax_id}
+{selectedItem.address || ''}
++ {[selectedItem.city, selectedItem.state].filter(Boolean).join(', ')} +
++ {[selectedItem.postal_code, selectedItem.country].filter(Boolean).join(', ')} +
+Selecciona un agente
+- {isEdit ? 'Modifica la información del agente aduanal' : 'Registra un nuevo agente aduanal en el sistema'} -
-+ {isEdit + ? 'Modifica la información del agente aduanal' + : 'Registra un nuevo agente aduanal en el sistema'} +
+