feature/homogenizacion-estilos-catalogos-fijos-y-generales

This commit is contained in:
2026-04-13 11:16:54 -06:00
parent aa8891145c
commit a0a6b52fc1
83 changed files with 4293 additions and 2044 deletions

View File

@@ -3,6 +3,7 @@
import { countriesApi, type Country } from '$lib/api/dashboard/reference_data/countries';
import DataTable from '$lib/components/dashboard/reference_data/countries/data-table.svelte';
import { createColumns } from '$lib/components/dashboard/reference_data/countries/columns.js';
import * as Card from '$lib/components/ui/card';
import { Button } from '$lib/components/ui/button';
import { Input } from '$lib/components/ui/input';
import { RefreshCw } from 'lucide-svelte';
@@ -149,7 +150,7 @@
<!-- Header Section -->
<div class="flex-none flex items-center justify-between">
<div class="space-y-1">
<h1 class="text-3xl font-bold tracking-tight">
<h1 class="text-2xl font-bold tracking-tight">
Países
</h1>
<p class="text-muted-foreground">
@@ -164,33 +165,16 @@
</div>
</div>
<!-- Filters Section -->
<div class="flex-none flex flex-wrap items-end gap-4">
<div class="grid w-full max-w-sm items-center gap-1.5 font-medium">
<span class="text-xs text-muted-foreground px-1">Búsqueda General</span>
<Input
placeholder="Buscar país por nombre o clave..."
bind:value={searchQuery}
oninput={handleSearch}
class="h-9"
/>
</div>
</div>
{#if error}
<div class="flex-none rounded-md border border-destructive px-4 py-3 text-sm text-destructive">
{error}
</div>
{/if}
<!-- Table Container -->
<div class="flex-1 min-h-0 rounded-md border bg-background overflow-hidden flex flex-col">
<DataTable
data={allItems}
{columns}
{loading}
{hasMore}
{loadMore}
/>
</div>
<Card.Root class="border bg-background flex min-h-0 flex-1 flex-col">
<Card.Header><div class="flex flex-wrap items-center justify-between gap-3"><Card.Title>Listado de Países</Card.Title><div class="flex flex-wrap items-center gap-2"><Input placeholder="Buscar" bind:value={searchQuery} oninput={handleSearch} class="h-9 w-44 bg-card lg:w-64" /></div></div></Card.Header>
<Card.Content class="min-h-0 p-0"><div class="rounded-md border bg-background overflow-hidden flex min-h-0 flex-1 flex-col"><DataTable data={allItems} {columns} {loading} {hasMore} {loadMore} /></div></Card.Content>
</Card.Root>
<div class="flex-none text-sm text-muted-foreground">Mostrando {allItems.length} de {totalItems} registros</div>
</div>