diff --git a/frontend/src/lib/components/dashboard/exchange_rate/create-edit-dialog.svelte b/frontend/src/lib/components/dashboard/exchange_rate/create-edit-dialog.svelte index ded462ce..f19312c0 100644 --- a/frontend/src/lib/components/dashboard/exchange_rate/create-edit-dialog.svelte +++ b/frontend/src/lib/components/dashboard/exchange_rate/create-edit-dialog.svelte @@ -166,7 +166,7 @@ - + {title} @@ -232,7 +232,7 @@ /> {#if isMissingRateContext} Requerida @@ -241,28 +241,12 @@ - - Tipo de Cambio (MXN/USD) - fetchFromDof(formData.date)} - > - {#if scraping} - ⟳ Consultando... - {:else} - Consultar DOF - {/if} - - + Tipo de Cambio (MXN/USD) $ @@ -270,6 +254,7 @@ id="value" type="number" step="0.0001" + lang="en" bind:value={formData.value} disabled={loading} required @@ -278,18 +263,30 @@ autofocus /> - Ej. 24.1234 + + fetchFromDof(formData.date)} + > + {#if scraping} + ⟳ Consultando... + {:else} + Consultar DOF + {/if} + + Ej. 24.1234 + - - - Cargar TC - - Ayuda + (open = false)} disabled={loading} class="w-full hover:bg-muted/50" diff --git a/frontend/src/lib/components/dashboard/invoices/create-edit-dialog.svelte b/frontend/src/lib/components/dashboard/invoices/create-edit-dialog.svelte index 546ccfa4..c6a4e708 100644 --- a/frontend/src/lib/components/dashboard/invoices/create-edit-dialog.svelte +++ b/frontend/src/lib/components/dashboard/invoices/create-edit-dialog.svelte @@ -1,15 +1,20 @@ - + - {isEditing ? "Editar Factura" : "Nueva Factura"} + {isEditing ? 'Editar Factura' : 'Nueva Factura'} - {isEditing - ? "Modifica los datos de la factura" - : "Ingresa los datos de la nueva factura"} + {isEditing ? 'Modifica los datos de la factura' : 'Ingresa los datos de la nueva factura'} @@ -397,24 +406,29 @@ - - Tipo de Operación * - { - if (v) formData.operation_type = v as "imp" | "exp"; - }} - > - - {formData.operation_type === 'imp' ? 'Importación' : formData.operation_type === 'exp' ? 'Exportación' : 'Seleccionar tipo'} - - - Importación - Exportación - - - + + Tipo de Operación * + { + if (v) formData.operation_type = v as 'imp' | 'exp'; + }} + > + + {formData.operation_type === 'imp' + ? 'Importación' + : formData.operation_type === 'exp' + ? 'Exportación' + : 'Seleccionar tipo'} + + + Importación + Exportación + + + + Número de Factura Fecha de Factura - + @@ -470,11 +480,7 @@ CFDI UUID - + @@ -514,11 +520,7 @@ Aduana - + @@ -548,7 +550,7 @@ /> - + Moneda - + @@ -696,34 +694,31 @@ {#if error} - + {error} {/if} - (open = false)} - disabled={loading} - > + (open = false)} disabled={loading}> Cancelar {#if loading} {/if} - {isEditing ? "Actualizar" : "Crear"} + {isEditing ? 'Actualizar' : 'Crear'} - {/* Optional: maybe refresh something or just let user continue */}} + onSuccess={() => { + /* Optional: maybe refresh something or just let user continue */ + }} /> diff --git a/frontend/src/routes/dashboard/+layout.svelte b/frontend/src/routes/dashboard/+layout.svelte index 44acac62..adc8e934 100644 --- a/frontend/src/routes/dashboard/+layout.svelte +++ b/frontend/src/routes/dashboard/+layout.svelte @@ -8,6 +8,7 @@ import * as Sidebar from '$lib/components/ui/sidebar/index.js'; import { companyStore } from '$lib/stores/company.svelte'; import ExchangeRateGuard from '$lib/components/dashboard/exchange_rate/exchange-rate-guard.svelte'; + import { page } from '$app/state'; let { data, children }: { data: LayoutData; children: any } = $props(); @@ -63,4 +64,6 @@ - +{#if !page.url.pathname.includes('/dashboard/invoices') && !page.url.pathname.includes('/dashboard/pedimentos')} + +{/if}
@@ -232,7 +232,7 @@ /> {#if isMissingRateContext}
Ej. 24.1234