diff --git a/frontend/src/lib/components/dashboard/invoices/edit/items/fa/class-dialog.svelte b/frontend/src/lib/components/dashboard/invoices/edit/items/fa/class-dialog.svelte index 6636c078..b3a75637 100644 --- a/frontend/src/lib/components/dashboard/invoices/edit/items/fa/class-dialog.svelte +++ b/frontend/src/lib/components/dashboard/invoices/edit/items/fa/class-dialog.svelte @@ -134,22 +134,6 @@ - {#if classesLoadError} - - {/if} -
diff --git a/frontend/src/lib/components/dashboard/invoices/edit/items/fa/part-number-dialog.svelte b/frontend/src/lib/components/dashboard/invoices/edit/items/fa/part-number-dialog.svelte index 78fdde77..a33a6a3d 100644 --- a/frontend/src/lib/components/dashboard/invoices/edit/items/fa/part-number-dialog.svelte +++ b/frontend/src/lib/components/dashboard/invoices/edit/items/fa/part-number-dialog.svelte @@ -132,22 +132,6 @@ - {#if partsLoadError} - - {/if} -
diff --git a/frontend/src/lib/components/dashboard/invoices/edit/items/fa/tab-series.svelte b/frontend/src/lib/components/dashboard/invoices/edit/items/fa/tab-series.svelte index cf666449..82e4aee7 100644 --- a/frontend/src/lib/components/dashboard/invoices/edit/items/fa/tab-series.svelte +++ b/frontend/src/lib/components/dashboard/invoices/edit/items/fa/tab-series.svelte @@ -173,22 +173,6 @@
Series - {#if seriesErrorMessage} - - {/if} -
- import { AlertCircle, AlertTriangle, ChevronDown, ChevronUp, X } from 'lucide-svelte'; - import { cn } from '$lib/utils'; - - export type ErrorPanelNoticeRow = { - field: string; - message: string; - }; - - export type ErrorPanelNoticeVariant = 'error' | 'warning'; - - export type ErrorPanelNoticeLabels = { - clear: string; - columnType: string; - columnField: string; - columnMessage: string; - emptyField: string; - dismissRowAria: string; - toggleDetailsAria: string; - }; - - let { - open, - variant = 'error', - title, - rows = [], - durationMs = 12000, - labels, - dismissibleRows = true, - class: className = '', - onClose, - onDismissRow - }: { - open: boolean; - variant?: ErrorPanelNoticeVariant; - title: string; - rows: ErrorPanelNoticeRow[]; - durationMs?: number; - labels: ErrorPanelNoticeLabels; - dismissibleRows?: boolean; - class?: string; - onClose?: () => void; - onDismissRow?: (index: number) => void; - } = $props(); - - let expanded = $state(true); - - const isWarning = $derived(variant === 'warning'); - - /** Re-expand the table when the panel opens or when errors/warnings change (new batch). */ - $effect(() => { - if (!open) return; - void title; - void variant; - void JSON.stringify(rows); - expanded = true; - }); - - $effect(() => { - if (!open || durationMs <= 0) return; - void rows.length; - const t = setTimeout(() => onClose?.(), durationMs); - return () => clearTimeout(t); - }); - - function toggleExpanded() { - expanded = !expanded; - } - - -{#if open} -
- -
- -

{title}

- - - - -
- - {#if expanded && rows.length > 0} -
- - - - - - - {#if dismissibleRows && onDismissRow} - - {/if} - - - - {#each rows as row, i (i)} - - - - - {#if dismissibleRows && onDismissRow} - - {/if} - - {/each} - -
- {labels.columnType} - - {labels.columnField} - - {labels.columnMessage} -
- - - {row.field || labels.emptyField} - - {row.message} - - -
-
- {/if} -
-{/if} diff --git a/frontend/src/routes/dashboard/export/manifest/+page.svelte b/frontend/src/routes/dashboard/export/manifest/+page.svelte index 72fcebd5..06c7f2f3 100644 --- a/frontend/src/routes/dashboard/export/manifest/+page.svelte +++ b/frontend/src/routes/dashboard/export/manifest/+page.svelte @@ -47,7 +47,10 @@ let showDetails = $state(false); - const columns = createColumns(); + const isError = $derived(!canView || status >= 400 || error); + + // Pasamos canEdit y canDelete a las columnas por si tu DataTable tiene acciones por fila + const columns = createColumns({ canEdit, canDelete }); // --- Lifecycle --- onMount(() => { diff --git a/frontend/src/routes/dashboard/goods/fda-codes/+page.svelte b/frontend/src/routes/dashboard/goods/fda-codes/+page.svelte index 9ddf117d..fb967805 100644 --- a/frontend/src/routes/dashboard/goods/fda-codes/+page.svelte +++ b/frontend/src/routes/dashboard/goods/fda-codes/+page.svelte @@ -393,21 +393,23 @@
- - {#if filteredFdaList.length > 0} -
- - Mostrando {filteredFdaList.length} registros - - {#if searchQuery} - - Filtro: "{searchQuery}" - - - {/if} -
- {/if} - + {#if filteredFdaList.length > 0} +
+ + Mostrando {filteredFdaList.length} registros + + {#if searchQuery} + + Filtro: "{searchQuery}" + + + {/if} +
+ {/if} + + {/if}