Se deshabilito el evento click que cerraba el modal si se acia fuera del modal, ademas de que se retiro el boton de crear clase en la parte superior
This commit is contained in:
@@ -284,7 +284,6 @@
|
||||
async function handleRefresh() {
|
||||
if (!canView) return;
|
||||
await loadClasses();
|
||||
toast.success('Clases actualizadas');
|
||||
}
|
||||
|
||||
function handleDelete() {
|
||||
@@ -379,16 +378,10 @@
|
||||
<p class="text-muted-foreground">Gestiona y consulta las clases de activo fijo</p>
|
||||
</div>
|
||||
<div class="flex items-center gap-3">
|
||||
<Button variant="outline" size="sm" class="h-9" onclick={handleRefresh}>
|
||||
<RefreshCw class="mr-2 h-4 w-4" />
|
||||
<Button variant="outline" size="sm" class="h-9" onclick={handleRefresh} disabled={isLoading}>
|
||||
<RefreshCw class="mr-2 h-4 w-4 {isLoading ? 'animate-spin' : ''}" />
|
||||
Actualizar
|
||||
</Button>
|
||||
{#if !isError && canCreate}
|
||||
<Button class="h-9" onclick={handleNew}>
|
||||
<Plus class="mr-2 h-4 w-4" />
|
||||
Nueva Clase
|
||||
</Button>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -449,8 +442,8 @@
|
||||
Mostrando {rangeStart}–{rangeEnd} de {totalItems} (pág. {currentPage}/{totalPages})
|
||||
{/if}
|
||||
</span>
|
||||
<Button variant="outline" size="sm" class="h-9" onclick={handleRefresh}>
|
||||
<RefreshCw class="mr-2 h-4 w-4" />
|
||||
<Button variant="outline" size="sm" class="h-9" onclick={handleRefresh} disabled={isLoading}>
|
||||
<RefreshCw class="mr-2 h-4 w-4 {isLoading ? 'animate-spin' : ''}" />
|
||||
Actualizar
|
||||
</Button>
|
||||
</div>
|
||||
@@ -601,7 +594,7 @@
|
||||
}}
|
||||
>
|
||||
<Plus class="mr-1 h-4 w-4" />
|
||||
Insertar
|
||||
Nueva Clase
|
||||
</Button>
|
||||
{/if}
|
||||
{#if canEdit}
|
||||
@@ -631,7 +624,10 @@
|
||||
|
||||
<!-- Dialog para Insertar/Editar Clase de Activo Fijo -->
|
||||
<Dialog.Root bind:open={showInsertDialog}>
|
||||
<Dialog.Content class="flex h-[90vh] w-full max-w-6xl flex-col overflow-hidden p-0">
|
||||
<Dialog.Content
|
||||
class="flex h-[90vh] w-full max-w-6xl flex-col overflow-hidden p-0"
|
||||
onInteractOutside={(e) => e.preventDefault()}
|
||||
>
|
||||
<Dialog.Header class="border-b p-6 pb-4">
|
||||
<Dialog.Title>{selectedClass ? 'Editar' : 'Nueva'} Clase de Activo Fijo</Dialog.Title>
|
||||
</Dialog.Header>
|
||||
|
||||
Reference in New Issue
Block a user