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 f85eec38..7873c5e5 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 @@ -1,287 +1,330 @@ - - - - -
- - {#if isMissingRateContext} -
-
- -
-
-

- {title} -

-

- Para continuar con el guardado, es necesario registrar el tipo de cambio oficial para esta fecha. -

-
-
- {:else} - - - - {title} - - - {/if} + + -
{ e.preventDefault(); handleSubmit(); }} class="p-6 pt-4 space-y-6"> - {#if error} -
- - {error} -
- {/if} + +
+ {#if isMissingRateContext} +
+
+ +
+
+

+ {title} +

+

+ Para continuar con el guardado, es necesario registrar el tipo de cambio oficial + para esta fecha. +

+
+
+ {:else} + + + + {title} + + + {/if} -
-
- -
- - {#if isMissingRateContext} -
- Requerida -
- {/if} -
-
+ { + e.preventDefault(); + handleSubmit(); + }} + class="p-6 pt-4 space-y-6" + > + {#if error} +
+ + {error} +
+ {/if} -
-
- - -
-
-
$
- -
-

- Ej. 24.1234 -

-
-
+
+
+ +
+ + {#if isMissingRateContext} +
+ Requerida +
+ {/if} +
+
- - - - - - - -
- - +
+
+ + +
+
+
+ $ +
+ +
+

Ej. 24.1234

+
+
+ + + + + + + + +
+
+
- - - ¿Estás seguro? - - Se {isEdit ? 'actualizará' : 'creará'} el tipo de cambio con valor {formData.value} para el día {formData.date}. - - - - showConfirmation = false}>Cancelar - Confirmar - - - \ No newline at end of file + + + ¿Estás seguro? + + Se {isEdit ? 'actualizará' : 'creará'} el tipo de cambio con valor {formData.value} para el día + {formData.date}. + + + + (showConfirmation = false)}>Cancelar + Confirmar + + + diff --git a/frontend/src/lib/components/dashboard/exchange_rate/exchange-rate-guard.svelte b/frontend/src/lib/components/dashboard/exchange_rate/exchange-rate-guard.svelte index 8f113fc1..88c3d303 100644 --- a/frontend/src/lib/components/dashboard/exchange_rate/exchange-rate-guard.svelte +++ b/frontend/src/lib/components/dashboard/exchange_rate/exchange-rate-guard.svelte @@ -8,28 +8,23 @@ let checked = $state(false); async function checkExchangeRate() { - console.log('[ExchangeRateGuard] Checking...', companyStore.activeCompany); if (!companyStore.activeCompany?.id) { - console.log('[ExchangeRateGuard] No active company'); return; } // Use local date instead of UTC const today = new Date().toLocaleDateString('fr-CA'); // YYYY-MM-DD - console.log('[ExchangeRateGuard] Date:', today); try { const response = await getExchangeRates(companyStore.activeCompany.id, { date: today, page_size: 1 }); - console.log('[ExchangeRateGuard] Response (stringified):', JSON.stringify(response, null, 2)); // api.get returns { data: ..., status: ... } and types now reflect that const items = response.data?.items || []; if (items.length === 0) { - console.log('[ExchangeRateGuard] No rate found, opening modal'); open = true; } } catch (error) { @@ -46,8 +41,6 @@ }); function handleSuccess() { - - console.log('Exchange rate created successfully via guard'); checked = true; } diff --git a/frontend/src/lib/components/dashboard/general_catalogs/classification/create-edit-dialog.svelte b/frontend/src/lib/components/dashboard/general_catalogs/classification/create-edit-dialog.svelte index 86612132..087d7b5b 100644 --- a/frontend/src/lib/components/dashboard/general_catalogs/classification/create-edit-dialog.svelte +++ b/frontend/src/lib/components/dashboard/general_catalogs/classification/create-edit-dialog.svelte @@ -1,115 +1,125 @@ - - - {title} - + + + {title} + -
{ e.preventDefault(); handleSubmit(); }} class="space-y-4"> - {#if error} -
- {error} -
- {/if} + { + e.preventDefault(); + handleSubmit(); + }} + class="space-y-4" + > + {#if error} +
+ {error} +
+ {/if} -
-
- - -
-
+
+
+ + +
+
- - - - -
-
-
\ No newline at end of file + + + + + + + diff --git a/frontend/src/lib/components/dashboard/general_catalogs/concepts/create-edit-dialog.svelte b/frontend/src/lib/components/dashboard/general_catalogs/concepts/create-edit-dialog.svelte index 779795b6..d3366de5 100644 --- a/frontend/src/lib/components/dashboard/general_catalogs/concepts/create-edit-dialog.svelte +++ b/frontend/src/lib/components/dashboard/general_catalogs/concepts/create-edit-dialog.svelte @@ -1,213 +1,222 @@ - - - {title} - + + + {title} + -
{ e.preventDefault(); handleSubmit(); }} class="space-y-4"> - {#if error} -
- {error} -
- {/if} + { + e.preventDefault(); + handleSubmit(); + }} + class="space-y-4" + > + {#if error} +
+ {error} +
+ {/if} - - -
- - -
- -
-
- - -
-
- - -
-
+ + +
+ + +
-
- - -
+
+
+ + +
+
+ + +
+
-
- - -
+
+ + +
-
- - -
+
+ + +
-
-
- - -
-
- - -
-
- -
-
- - -
-
- - -
-
+
+ + +
-
- - -
+
+
+ + +
+
+ + +
+
-
-
+
+
+ + +
+
+ + +
+
- - - - - -
-
\ No newline at end of file +
+ + +
+ + + + + + + + + + diff --git a/frontend/src/lib/components/dashboard/general_catalogs/customs_broker_concepts/create-edit-dialog.svelte b/frontend/src/lib/components/dashboard/general_catalogs/customs_broker_concepts/create-edit-dialog.svelte new file mode 100644 index 00000000..930275f5 --- /dev/null +++ b/frontend/src/lib/components/dashboard/general_catalogs/customs_broker_concepts/create-edit-dialog.svelte @@ -0,0 +1,168 @@ + + + + + + {title} + + {isEdit ? 'Modifica los detalles del concepto' : 'Ingresa los datos para el nuevo concepto'} + + + +
{ + e.preventDefault(); + handleSubmit(); + }} + class="space-y-4" + > + {#if error} +
+ {error} +
+ {/if} + +
+
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+
+ + + + + +
+
+
diff --git a/frontend/src/lib/components/dashboard/general_catalogs/customs_broker_concepts/create-edite-dialoge.svelte b/frontend/src/lib/components/dashboard/general_catalogs/customs_broker_concepts/create-edite-dialoge.svelte deleted file mode 100644 index f9bb9f4b..00000000 --- a/frontend/src/lib/components/dashboard/general_catalogs/customs_broker_concepts/create-edite-dialoge.svelte +++ /dev/null @@ -1,164 +0,0 @@ - - - - - - {title} - - {isEdit ? 'Modifica los detalles del concepto' : 'Ingresa los datos para el nuevo concepto'} - - - -
{ e.preventDefault(); handleSubmit(); }} class="space-y-4"> - {#if error} -
- {error} -
- {/if} - -
-
- - -
- -
- - -
- -
- - -
- -
- - -
-
- - - - - -
-
-
\ No newline at end of file diff --git a/frontend/src/lib/components/dashboard/general_catalogs/customs_broker_concepts/data-table-actions.svelte b/frontend/src/lib/components/dashboard/general_catalogs/customs_broker_concepts/data-table-actions.svelte index 1855e3f0..e18e580d 100644 --- a/frontend/src/lib/components/dashboard/general_catalogs/customs_broker_concepts/data-table-actions.svelte +++ b/frontend/src/lib/components/dashboard/general_catalogs/customs_broker_concepts/data-table-actions.svelte @@ -4,7 +4,7 @@ import { deleteCustomsBrokerConcept, type CustomsBrokerConcept } from "$lib/api/dashboard/a76/general_catalogs/customs-broker-concepts"; import { companyStore } from "$lib/stores/company.svelte"; import { EllipsisVertical, Pencil, LoaderCircle, Trash2 } from 'lucide-svelte'; - import CreateEditDialog from "./create-edite-dialoge.svelte"; + import CreateEditDialog from "./create-edit-dialog.svelte"; let { item, diff --git a/frontend/src/lib/components/dashboard/general_catalogs/doda/columns.ts b/frontend/src/lib/components/dashboard/general_catalogs/doda/columns.ts index 946aed85..2636ab51 100644 --- a/frontend/src/lib/components/dashboard/general_catalogs/doda/columns.ts +++ b/frontend/src/lib/components/dashboard/general_catalogs/doda/columns.ts @@ -32,7 +32,7 @@ export function createColumns(onSuccess?: () => void): ColumnDef[] { }, { id: 'actions', - Headers: 'Acciones', + header: 'Acciones', cell: ({ row }) => { return renderComponent(DataTableActions, { item: row.original, diff --git a/frontend/src/lib/components/dashboard/general_catalogs/doda/create-edit-dialog.svelte b/frontend/src/lib/components/dashboard/general_catalogs/doda/create-edit-dialog.svelte index 47bd0a8e..5e4a54f1 100644 --- a/frontend/src/lib/components/dashboard/general_catalogs/doda/create-edit-dialog.svelte +++ b/frontend/src/lib/components/dashboard/general_catalogs/doda/create-edit-dialog.svelte @@ -1,361 +1,392 @@ - - - {title} - + + + {title} + -
{ e.preventDefault(); handleSubmit(); }} class="py-4"> - {#if error} -
- {error} -
- {/if} + { + e.preventDefault(); + handleSubmit(); + }} + class="py-4" + > + {#if error} +
+ {error} +
+ {/if} - - - General - Aduana/Transp. - SAT / Digital - Otros - + + + General + Aduana/Transp. + SAT / Digital + Otros + - - -
-
- - -
-
- - -
-
-
-
- - -
-
- - -
-
- - -
-
-
- - -
-
- - -
-
+ + +
+
+ + +
+
+ + +
+
+
+
+ + +
+
+ + +
+
+ + +
+
+
+ + +
+
+ + +
+
- - -
-
- - -
-
- - -
-
- - -
-
-
-
- - -
-
- - -
-
-
-
- - -
-
- - -
-
-
- - -
-
- - -
-
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+ + +
+
+ + +
+
+
+
+ + +
+
+ + +
+
+
+ + +
+
+ + +
+
- - -
-
- - -
-
- - -
-
-
- - -
-
- -