From f935bfb8acbef5df06cc9b3655d6f796239df0ad Mon Sep 17 00:00:00 2001 From: Kevin_Ramirez Date: Fri, 2 Jan 2026 11:05:50 -0600 Subject: [PATCH] Se eliminaron archivos inecesarios y se puso nombre a la tabla de acciones en catalogos generales --- .../dashboard/customs_brokers/columns.ts | 1 + .../general_catalogs/doda/columns.ts | 1 + .../electronic_notices/columns.ts | 2 + .../general_catalogs/equivalencies/columns.ts | 2 + .../general_catalogs/identifiers/columns.ts | 2 + .../general_catalogs/inpc/columns.ts | 1 + .../general_catalogs/prevalidators/columns.ts | 2 + .../unit_conversions/columns.ts | 2 + .../units_of_measure/american/columns.ts | 1 + .../units_of_measure/customs/columns.ts | 1 + .../units_of_measure/oma/columns.ts | 1 + .../dashboard/identifiers/columns.ts | 1 + .../lib/components/dashboard/seal/columns.ts | 41 ++++--- .../dashboard/units_of_measure/ace/columns.ts | 27 ----- .../ace/create-edit-dialog.svelte | 110 ----------------- .../ace/data-table-actions.svelte | 79 ------------ .../units_of_measure/ace/data-table.svelte | 106 ---------------- .../units_of_measure/american/columns.ts | 27 ----- .../american/create-edit-dialog.svelte | 110 ----------------- .../american/data-table-actions.svelte | 79 ------------ .../units_of_measure/customs/columns.ts | 32 ----- .../customs/create-edit-dialog.svelte | 113 ------------------ .../customs/data-table-actions.svelte | 79 ------------ .../customs/data-table.svelte | 106 ---------------- .../units_of_measure/general/columns.ts | 32 ----- .../general/create-edit-dialog.svelte | 113 ------------------ .../general/data-table-actions.svelte | 79 ------------ .../general/data-table.svelte | 106 ---------------- .../dashboard/units_of_measure/oma/columns.ts | 27 ----- .../oma/create-edit-dialog.svelte | 110 ----------------- .../oma/data-table-actions.svelte | 79 ------------ 31 files changed, 37 insertions(+), 1435 deletions(-) delete mode 100644 frontend/src/lib/components/dashboard/units_of_measure/ace/columns.ts delete mode 100644 frontend/src/lib/components/dashboard/units_of_measure/ace/create-edit-dialog.svelte delete mode 100644 frontend/src/lib/components/dashboard/units_of_measure/ace/data-table-actions.svelte delete mode 100644 frontend/src/lib/components/dashboard/units_of_measure/ace/data-table.svelte delete mode 100644 frontend/src/lib/components/dashboard/units_of_measure/american/columns.ts delete mode 100644 frontend/src/lib/components/dashboard/units_of_measure/american/create-edit-dialog.svelte delete mode 100644 frontend/src/lib/components/dashboard/units_of_measure/american/data-table-actions.svelte delete mode 100644 frontend/src/lib/components/dashboard/units_of_measure/customs/columns.ts delete mode 100644 frontend/src/lib/components/dashboard/units_of_measure/customs/create-edit-dialog.svelte delete mode 100644 frontend/src/lib/components/dashboard/units_of_measure/customs/data-table-actions.svelte delete mode 100644 frontend/src/lib/components/dashboard/units_of_measure/customs/data-table.svelte delete mode 100644 frontend/src/lib/components/dashboard/units_of_measure/general/columns.ts delete mode 100644 frontend/src/lib/components/dashboard/units_of_measure/general/create-edit-dialog.svelte delete mode 100644 frontend/src/lib/components/dashboard/units_of_measure/general/data-table-actions.svelte delete mode 100644 frontend/src/lib/components/dashboard/units_of_measure/general/data-table.svelte delete mode 100644 frontend/src/lib/components/dashboard/units_of_measure/oma/columns.ts delete mode 100644 frontend/src/lib/components/dashboard/units_of_measure/oma/create-edit-dialog.svelte delete mode 100644 frontend/src/lib/components/dashboard/units_of_measure/oma/data-table-actions.svelte diff --git a/frontend/src/lib/components/dashboard/customs_brokers/columns.ts b/frontend/src/lib/components/dashboard/customs_brokers/columns.ts index 993c6763..4f099fd3 100644 --- a/frontend/src/lib/components/dashboard/customs_brokers/columns.ts +++ b/frontend/src/lib/components/dashboard/customs_brokers/columns.ts @@ -118,6 +118,7 @@ export function createColumns(onSuccess?: () => void): ColumnDef[ }, { id: "actions", + header: "Acciones", cell: ({ row }) => { return renderComponent(DataTableActions, { broker: row.original, 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 e9751ef3..946aed85 100644 --- a/frontend/src/lib/components/dashboard/general_catalogs/doda/columns.ts +++ b/frontend/src/lib/components/dashboard/general_catalogs/doda/columns.ts @@ -32,6 +32,7 @@ export function createColumns(onSuccess?: () => void): ColumnDef[] { }, { id: 'actions', + Headers: 'Acciones', cell: ({ row }) => { return renderComponent(DataTableActions, { item: row.original, diff --git a/frontend/src/lib/components/dashboard/general_catalogs/electronic_notices/columns.ts b/frontend/src/lib/components/dashboard/general_catalogs/electronic_notices/columns.ts index 3a07231a..3ebec0cb 100644 --- a/frontend/src/lib/components/dashboard/general_catalogs/electronic_notices/columns.ts +++ b/frontend/src/lib/components/dashboard/general_catalogs/electronic_notices/columns.ts @@ -2,6 +2,7 @@ import type { ColumnDef } from '@tanstack/table-core'; import type { ElectronicNotice } from '$lib/api/dashboard/a76/general_catalogs/electronic-notices'; import { renderComponent } from '$lib/components/ui/data-table'; import DataTableActions from './data-table-actions.svelte'; +import { Head } from '$lib/components/ui/table'; export function createColumns(onSuccess?: () => void): ColumnDef[] { return [ @@ -32,6 +33,7 @@ export function createColumns(onSuccess?: () => void): ColumnDef { return renderComponent(DataTableActions, { item: row.original, diff --git a/frontend/src/lib/components/dashboard/general_catalogs/equivalencies/columns.ts b/frontend/src/lib/components/dashboard/general_catalogs/equivalencies/columns.ts index 704f2210..f4a92c75 100644 --- a/frontend/src/lib/components/dashboard/general_catalogs/equivalencies/columns.ts +++ b/frontend/src/lib/components/dashboard/general_catalogs/equivalencies/columns.ts @@ -2,6 +2,7 @@ import type { ColumnDef } from '@tanstack/table-core'; import type { Equivalency } from '$lib/api/dashboard/a76/general_catalogs/equivalencies'; import { renderComponent } from '$lib/components/ui/data-table'; import DataTableActions from './data-table-actions.svelte'; +import { Header } from '$lib/components/ui/alert-dialog'; export function createColumns(onSuccess?: () => void): ColumnDef[] { return [ @@ -22,6 +23,7 @@ export function createColumns(onSuccess?: () => void): ColumnDef[] }, { id: 'actions', + Header: 'Acciones', cell: ({ row }) => { return renderComponent(DataTableActions, { item: row.original, diff --git a/frontend/src/lib/components/dashboard/general_catalogs/identifiers/columns.ts b/frontend/src/lib/components/dashboard/general_catalogs/identifiers/columns.ts index 8247aeb7..6aa1997c 100644 --- a/frontend/src/lib/components/dashboard/general_catalogs/identifiers/columns.ts +++ b/frontend/src/lib/components/dashboard/general_catalogs/identifiers/columns.ts @@ -2,6 +2,7 @@ import type { ColumnDef } from '@tanstack/table-core'; import type { Identifier } from '$lib/api/dashboard/a76/general_catalogs/identifiers'; import { renderComponent } from '$lib/components/ui/data-table'; import DataTableActions from './data-table-actions.svelte'; +import { Header } from '$lib/components/ui/alert-dialog'; export function createColumns(onSuccess?: () => void): ColumnDef[] { return [ @@ -27,6 +28,7 @@ export function createColumns(onSuccess?: () => void): ColumnDef[] { }, { id: 'actions', + Header: 'Acciones', cell: ({ row }) => { return renderComponent(DataTableActions, { item: row.original, diff --git a/frontend/src/lib/components/dashboard/general_catalogs/inpc/columns.ts b/frontend/src/lib/components/dashboard/general_catalogs/inpc/columns.ts index 34d58e58..c6828b12 100644 --- a/frontend/src/lib/components/dashboard/general_catalogs/inpc/columns.ts +++ b/frontend/src/lib/components/dashboard/general_catalogs/inpc/columns.ts @@ -22,6 +22,7 @@ export function createColumns(onSuccess?: () => void): ColumnDef[] { }, { id: 'actions', + header: 'Acciones', cell: ({ row }) => { return renderComponent(DataTableActions, { item: row.original, diff --git a/frontend/src/lib/components/dashboard/general_catalogs/prevalidators/columns.ts b/frontend/src/lib/components/dashboard/general_catalogs/prevalidators/columns.ts index 1c8b2ab5..404a0752 100644 --- a/frontend/src/lib/components/dashboard/general_catalogs/prevalidators/columns.ts +++ b/frontend/src/lib/components/dashboard/general_catalogs/prevalidators/columns.ts @@ -2,6 +2,7 @@ import type { ColumnDef } from '@tanstack/table-core'; import type { Prevalidator } from '$lib/api/dashboard/a76/general_catalogs/prevalidators'; import { renderComponent } from '$lib/components/ui/data-table'; import DataTableActions from './data-table-actions.svelte'; +import { Header } from '$lib/components/ui/alert-dialog'; export function createColumns(onSuccess?: () => void): ColumnDef[] { return [ @@ -27,6 +28,7 @@ export function createColumns(onSuccess?: () => void): ColumnDef[] }, { id: 'actions', + Header: 'Acciones', cell: ({ row }) => { return renderComponent(DataTableActions, { item: row.original, diff --git a/frontend/src/lib/components/dashboard/general_catalogs/unit_conversions/columns.ts b/frontend/src/lib/components/dashboard/general_catalogs/unit_conversions/columns.ts index a251e9fa..34d970a0 100644 --- a/frontend/src/lib/components/dashboard/general_catalogs/unit_conversions/columns.ts +++ b/frontend/src/lib/components/dashboard/general_catalogs/unit_conversions/columns.ts @@ -2,6 +2,7 @@ import type { ColumnDef } from '@tanstack/table-core'; import type { UnitConversion } from '$lib/api/dashboard/a76/general_catalogs/unit-conversions'; import { renderComponent } from '$lib/components/ui/data-table'; import DataTableActions from './data-table-actions.svelte'; +import { Header } from '$lib/components/ui/alert-dialog'; export function createColumns(onSuccess?: () => void): ColumnDef[] { return [ @@ -19,6 +20,7 @@ export function createColumns(onSuccess?: () => void): ColumnDef }, { id: 'actions', + header: 'Acciones', cell: ({ row }) => renderComponent(DataTableActions, { conversion: row.original, diff --git a/frontend/src/lib/components/dashboard/general_catalogs/units_of_measure/american/columns.ts b/frontend/src/lib/components/dashboard/general_catalogs/units_of_measure/american/columns.ts index d9f1124e..f9d51db1 100644 --- a/frontend/src/lib/components/dashboard/general_catalogs/units_of_measure/american/columns.ts +++ b/frontend/src/lib/components/dashboard/general_catalogs/units_of_measure/american/columns.ts @@ -15,6 +15,7 @@ export function createColumns(onSuccess?: () => void): ColumnDef renderComponent(DataTableActions, { unit: row.original, diff --git a/frontend/src/lib/components/dashboard/general_catalogs/units_of_measure/customs/columns.ts b/frontend/src/lib/components/dashboard/general_catalogs/units_of_measure/customs/columns.ts index 5fcde59a..6f5d2136 100644 --- a/frontend/src/lib/components/dashboard/general_catalogs/units_of_measure/customs/columns.ts +++ b/frontend/src/lib/components/dashboard/general_catalogs/units_of_measure/customs/columns.ts @@ -19,6 +19,7 @@ export function createColumns(onSuccess?: () => void): ColumnDef renderComponent(DataTableActions, { unit: row.original, diff --git a/frontend/src/lib/components/dashboard/general_catalogs/units_of_measure/oma/columns.ts b/frontend/src/lib/components/dashboard/general_catalogs/units_of_measure/oma/columns.ts index b3f5c0b8..a24ccbea 100644 --- a/frontend/src/lib/components/dashboard/general_catalogs/units_of_measure/oma/columns.ts +++ b/frontend/src/lib/components/dashboard/general_catalogs/units_of_measure/oma/columns.ts @@ -15,6 +15,7 @@ export function createColumns(onSuccess?: () => void): ColumnDef renderComponent(DataTableActions, { unit: row.original, diff --git a/frontend/src/lib/components/dashboard/identifiers/columns.ts b/frontend/src/lib/components/dashboard/identifiers/columns.ts index d1feb995..c1b371ed 100644 --- a/frontend/src/lib/components/dashboard/identifiers/columns.ts +++ b/frontend/src/lib/components/dashboard/identifiers/columns.ts @@ -26,6 +26,7 @@ export function createColumns(onSuccess?: () => void): ColumnDef[] { }, { id: 'actions', + header: 'Acciones', cell: ({ row }) => { return renderComponent(DataTableActions, { item: row.original, diff --git a/frontend/src/lib/components/dashboard/seal/columns.ts b/frontend/src/lib/components/dashboard/seal/columns.ts index dbe33b26..bf68d94e 100644 --- a/frontend/src/lib/components/dashboard/seal/columns.ts +++ b/frontend/src/lib/components/dashboard/seal/columns.ts @@ -1,27 +1,26 @@ -/** - * Column definitions for Seal table - */ import type { ColumnDef } from '@tanstack/table-core'; import type { Seal } from '$lib/api/dashboard/a76/general_catalogs/seal'; import { renderComponent } from '$lib/components/ui/data-table'; import DataTableActions from './data-table-actions.svelte'; export function createColumns(onSuccess?: () => void): ColumnDef[] { - return [ - { - accessorKey: 'seal', - header: 'Sello', - cell: ({ row }) => row.original.seal - }, - { - id: 'actions', - header: 'Acciones', - cell: ({ row }) => { - return renderComponent(DataTableActions, { - item: row.original, - onSuccess - }); - } - } - ]; -} + return [ + + { + accessorKey: 'seal', + header: 'Sello', + cell: ({ row }) => row.original.seal, + }, + { + id: 'actions', + header: 'Acciones', + meta: { + class: 'w-[100px] text-right' + }, + cell: ({ row }) => renderComponent(DataTableActions, { + item: row.original, + onSuccess + }) + } + ]; +} \ No newline at end of file diff --git a/frontend/src/lib/components/dashboard/units_of_measure/ace/columns.ts b/frontend/src/lib/components/dashboard/units_of_measure/ace/columns.ts deleted file mode 100644 index d88fb3a2..00000000 --- a/frontend/src/lib/components/dashboard/units_of_measure/ace/columns.ts +++ /dev/null @@ -1,27 +0,0 @@ -import type { UnitOfMeasureACE } from '$lib/api/dashboard/a76/general_catalogs/units-of-measure'; -import type { ColumnDef } from '@tanstack/table-core'; -import { renderComponent } from '$lib/components/ui/data-table'; -import DataTableActions from './data-table-actions.svelte'; - -export function createColumns(onSuccess?: () => void): ColumnDef[] { - return [ - { - accessorKey: 'code', - header: 'Código', - }, - { - accessorKey: 'description', - header: 'Descripción', - cell: ({ row }) => row.original.description || '-' - }, - { - id: 'actions', - cell: ({ row }) => { - return renderComponent(DataTableActions, { - item: row.original, - onSuccess - }); - } - } - ]; -} diff --git a/frontend/src/lib/components/dashboard/units_of_measure/ace/create-edit-dialog.svelte b/frontend/src/lib/components/dashboard/units_of_measure/ace/create-edit-dialog.svelte deleted file mode 100644 index f0bd92f2..00000000 --- a/frontend/src/lib/components/dashboard/units_of_measure/ace/create-edit-dialog.svelte +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - {title} - - -
- {#if error} -
{error}
- {/if} - -
- - -
- -
- - -
-
- - - - -
-
diff --git a/frontend/src/lib/components/dashboard/units_of_measure/ace/data-table-actions.svelte b/frontend/src/lib/components/dashboard/units_of_measure/ace/data-table-actions.svelte deleted file mode 100644 index 49e2eb59..00000000 --- a/frontend/src/lib/components/dashboard/units_of_measure/ace/data-table-actions.svelte +++ /dev/null @@ -1,79 +0,0 @@ - - - - - {#snippet child({ props })} - - {/snippet} - - - Acciones - dialogOpen = true}> - - Editar - - - {#if loading} - - {:else} - - {/if} - Eliminar - - - - - diff --git a/frontend/src/lib/components/dashboard/units_of_measure/ace/data-table.svelte b/frontend/src/lib/components/dashboard/units_of_measure/ace/data-table.svelte deleted file mode 100644 index ea8886c5..00000000 --- a/frontend/src/lib/components/dashboard/units_of_measure/ace/data-table.svelte +++ /dev/null @@ -1,106 +0,0 @@ - - -
- - - {#each table.getHeaderGroups() as headerGroup (headerGroup.id)} - - {#each headerGroup.headers as header (header.id)} - - {#if !header.isPlaceholder} - - {/if} - - {/each} - - {/each} - - - {#each table.getRowModel().rows as row (row.id)} - - {#each row.getVisibleCells() as cell (cell.id)} - - - - {/each} - - {:else} - - - No hay resultados. - - - {/each} - - -
- -
-
- Total: {totalItems} -
-
- - -
-
diff --git a/frontend/src/lib/components/dashboard/units_of_measure/american/columns.ts b/frontend/src/lib/components/dashboard/units_of_measure/american/columns.ts deleted file mode 100644 index e3a4bff7..00000000 --- a/frontend/src/lib/components/dashboard/units_of_measure/american/columns.ts +++ /dev/null @@ -1,27 +0,0 @@ -import type { UnitOfMeasureAmerican } from '$lib/api/dashboard/a76/general_catalogs/units-of-measure'; -import type { ColumnDef } from '@tanstack/table-core'; -import { renderComponent } from '$lib/components/ui/data-table'; -import DataTableActions from './data-table-actions.svelte'; - -export function createColumns(onSuccess?: () => void): ColumnDef[] { - return [ - { - accessorKey: 'code', - header: 'Código', - }, - { - accessorKey: 'description', - header: 'Descripción', - cell: ({ row }) => row.original.description || '-' - }, - { - id: 'actions', - cell: ({ row }) => { - return renderComponent(DataTableActions, { - item: row.original, - onSuccess - }); - } - } - ]; -} diff --git a/frontend/src/lib/components/dashboard/units_of_measure/american/create-edit-dialog.svelte b/frontend/src/lib/components/dashboard/units_of_measure/american/create-edit-dialog.svelte deleted file mode 100644 index 8ef1d6fb..00000000 --- a/frontend/src/lib/components/dashboard/units_of_measure/american/create-edit-dialog.svelte +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - {title} - - -
- {#if error} -
{error}
- {/if} - -
- - -
- -
- - -
-
- - - - -
-
diff --git a/frontend/src/lib/components/dashboard/units_of_measure/american/data-table-actions.svelte b/frontend/src/lib/components/dashboard/units_of_measure/american/data-table-actions.svelte deleted file mode 100644 index 74912f4e..00000000 --- a/frontend/src/lib/components/dashboard/units_of_measure/american/data-table-actions.svelte +++ /dev/null @@ -1,79 +0,0 @@ - - - - - {#snippet child({ props })} - - {/snippet} - - - Acciones - dialogOpen = true}> - - Editar - - - {#if loading} - - {:else} - - {/if} - Eliminar - - - - - diff --git a/frontend/src/lib/components/dashboard/units_of_measure/customs/columns.ts b/frontend/src/lib/components/dashboard/units_of_measure/customs/columns.ts deleted file mode 100644 index db580d6b..00000000 --- a/frontend/src/lib/components/dashboard/units_of_measure/customs/columns.ts +++ /dev/null @@ -1,32 +0,0 @@ -import type { ColumnDef } from '@tanstack/table-core'; -import { renderComponent } from '$lib/components/ui/data-table'; -import DataTableActions from './data-table-actions.svelte'; - -export interface UMCustomsMex { - id: number; - code: string; - description: string | null; -} - -export function createColumns(onSuccess?: () => void): ColumnDef[] { - return [ - { - accessorKey: 'code', - header: 'Código', - }, - { - accessorKey: 'description', - header: 'Descripción', - cell: ({ row }) => row.original.description || '-' - }, - { - id: 'actions', - cell: ({ row }) => { - return renderComponent(DataTableActions, { - item: row.original, - onSuccess - }); - } - } - ]; -} diff --git a/frontend/src/lib/components/dashboard/units_of_measure/customs/create-edit-dialog.svelte b/frontend/src/lib/components/dashboard/units_of_measure/customs/create-edit-dialog.svelte deleted file mode 100644 index 46319d69..00000000 --- a/frontend/src/lib/components/dashboard/units_of_measure/customs/create-edit-dialog.svelte +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - {title} - - -
- {#if error} -
{error}
- {/if} - -
- - -
- -
- - -
-
- -
- - -
-
-
diff --git a/frontend/src/lib/components/dashboard/units_of_measure/customs/data-table-actions.svelte b/frontend/src/lib/components/dashboard/units_of_measure/customs/data-table-actions.svelte deleted file mode 100644 index 0e845518..00000000 --- a/frontend/src/lib/components/dashboard/units_of_measure/customs/data-table-actions.svelte +++ /dev/null @@ -1,79 +0,0 @@ - - - - - {#snippet child({ props })} - - {/snippet} - - - Acciones - dialogOpen = true}> - - Editar - - - {#if loading} - - {:else} - - {/if} - Eliminar - - - - - diff --git a/frontend/src/lib/components/dashboard/units_of_measure/customs/data-table.svelte b/frontend/src/lib/components/dashboard/units_of_measure/customs/data-table.svelte deleted file mode 100644 index ea8886c5..00000000 --- a/frontend/src/lib/components/dashboard/units_of_measure/customs/data-table.svelte +++ /dev/null @@ -1,106 +0,0 @@ - - -
- - - {#each table.getHeaderGroups() as headerGroup (headerGroup.id)} - - {#each headerGroup.headers as header (header.id)} - - {#if !header.isPlaceholder} - - {/if} - - {/each} - - {/each} - - - {#each table.getRowModel().rows as row (row.id)} - - {#each row.getVisibleCells() as cell (cell.id)} - - - - {/each} - - {:else} - - - No hay resultados. - - - {/each} - - -
- -
-
- Total: {totalItems} -
-
- - -
-
diff --git a/frontend/src/lib/components/dashboard/units_of_measure/general/columns.ts b/frontend/src/lib/components/dashboard/units_of_measure/general/columns.ts deleted file mode 100644 index 710cb488..00000000 --- a/frontend/src/lib/components/dashboard/units_of_measure/general/columns.ts +++ /dev/null @@ -1,32 +0,0 @@ -import type { ColumnDef } from '@tanstack/table-core'; -import { renderComponent } from '$lib/components/ui/data-table'; -import DataTableActions from './data-table-actions.svelte'; - -export interface UnitMeasure { - id: number; - code: string; - description: string | null; -} - -export function createColumns(onSuccess?: () => void): ColumnDef[] { - return [ - { - accessorKey: 'code', - header: 'Código', - }, - { - accessorKey: 'description', - header: 'Descripción', - cell: ({ row }) => row.original.description || '-' - }, - { - id: 'actions', - cell: ({ row }) => { - return renderComponent(DataTableActions, { - item: row.original, - onSuccess - }); - } - } - ]; -} diff --git a/frontend/src/lib/components/dashboard/units_of_measure/general/create-edit-dialog.svelte b/frontend/src/lib/components/dashboard/units_of_measure/general/create-edit-dialog.svelte deleted file mode 100644 index ffbb4054..00000000 --- a/frontend/src/lib/components/dashboard/units_of_measure/general/create-edit-dialog.svelte +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - {title} - - -
- {#if error} -
{error}
- {/if} - -
- - -
- -
- - -
-
- -
- - -
-
-
diff --git a/frontend/src/lib/components/dashboard/units_of_measure/general/data-table-actions.svelte b/frontend/src/lib/components/dashboard/units_of_measure/general/data-table-actions.svelte deleted file mode 100644 index 66641d66..00000000 --- a/frontend/src/lib/components/dashboard/units_of_measure/general/data-table-actions.svelte +++ /dev/null @@ -1,79 +0,0 @@ - - - - - {#snippet child({ props })} - - {/snippet} - - - Acciones - dialogOpen = true}> - - Editar - - - {#if loading} - - {:else} - - {/if} - Eliminar - - - - - diff --git a/frontend/src/lib/components/dashboard/units_of_measure/general/data-table.svelte b/frontend/src/lib/components/dashboard/units_of_measure/general/data-table.svelte deleted file mode 100644 index ea8886c5..00000000 --- a/frontend/src/lib/components/dashboard/units_of_measure/general/data-table.svelte +++ /dev/null @@ -1,106 +0,0 @@ - - -
- - - {#each table.getHeaderGroups() as headerGroup (headerGroup.id)} - - {#each headerGroup.headers as header (header.id)} - - {#if !header.isPlaceholder} - - {/if} - - {/each} - - {/each} - - - {#each table.getRowModel().rows as row (row.id)} - - {#each row.getVisibleCells() as cell (cell.id)} - - - - {/each} - - {:else} - - - No hay resultados. - - - {/each} - - -
- -
-
- Total: {totalItems} -
-
- - -
-
diff --git a/frontend/src/lib/components/dashboard/units_of_measure/oma/columns.ts b/frontend/src/lib/components/dashboard/units_of_measure/oma/columns.ts deleted file mode 100644 index 4b28f780..00000000 --- a/frontend/src/lib/components/dashboard/units_of_measure/oma/columns.ts +++ /dev/null @@ -1,27 +0,0 @@ -import type { UnitOfMeasureOMA } from '$lib/api/dashboard/a76/general_catalogs/units-of-measure'; -import type { ColumnDef } from '@tanstack/table-core'; -import { renderComponent } from '$lib/components/ui/data-table'; -import DataTableActions from './data-table-actions.svelte'; - -export function createColumns(onSuccess?: () => void): ColumnDef[] { - return [ - { - accessorKey: 'code', - header: 'Código', - }, - { - accessorKey: 'description', - header: 'Descripción', - cell: ({ row }) => row.original.description || '-' - }, - { - id: 'actions', - cell: ({ row }) => { - return renderComponent(DataTableActions, { - item: row.original, - onSuccess - }); - } - } - ]; -} diff --git a/frontend/src/lib/components/dashboard/units_of_measure/oma/create-edit-dialog.svelte b/frontend/src/lib/components/dashboard/units_of_measure/oma/create-edit-dialog.svelte deleted file mode 100644 index 2917b9fa..00000000 --- a/frontend/src/lib/components/dashboard/units_of_measure/oma/create-edit-dialog.svelte +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - {title} - - -
- {#if error} -
{error}
- {/if} - -
- - -
- -
- - -
-
- - - - -
-
diff --git a/frontend/src/lib/components/dashboard/units_of_measure/oma/data-table-actions.svelte b/frontend/src/lib/components/dashboard/units_of_measure/oma/data-table-actions.svelte deleted file mode 100644 index 7627fe6d..00000000 --- a/frontend/src/lib/components/dashboard/units_of_measure/oma/data-table-actions.svelte +++ /dev/null @@ -1,79 +0,0 @@ - - - - - {#snippet child({ props })} - - {/snippet} - - - Acciones - dialogOpen = true}> - - Editar - - - {#if loading} - - {:else} - - {/if} - Eliminar - - - - -