This commit is contained in:
Lizandro Guarnizo
2026-04-18 18:58:27 -05:00
parent 0025d46a34
commit c3f1eda346
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -40,7 +40,7 @@
<script> <script>
document.addEventListener('alpine:init', () => { document.addEventListener('alpine:init', () => {
Alpine.store('openDropdown', null); Alpine.store('openDropdown', null);
Livewire.hook('message.processed', () => { Livewire.hook('message.received', () => {
Alpine.store('openDropdown', null); Alpine.store('openDropdown', null);
}); });
}); });
@@ -10,7 +10,7 @@
editarTarifaRol: @entangle('editarTarifaRol'), editarTarifaRol: @entangle('editarTarifaRol'),
init() { init() {
['editar','gestion','gestionPromo','modalSaldo','modalPassword','modTarifas','modalSaldoDesc','editarTarifaRol'].forEach(prop => { ['editar','gestion','gestionPromo','modalSaldo','modalPassword','modTarifas','modalSaldoDesc','editarTarifaRol'].forEach(prop => {
this.$watch(prop, val => { if (!val) Alpine.store('openDropdown', null); }); this.$watch(prop, () => { Alpine.store('openDropdown', null); });
}); });
} }
}" class="h-full w-full md:my-2"> }" class="h-full w-full md:my-2">
@@ -154,7 +154,7 @@
</svg> </svg>
</button> </button>
<div x-cloak x-show="$store.openDropdown === {{ $usuario->id }}" @click.away="$store.openDropdown = null" :style="`position:fixed;top:${menuY}px;left:${menuX}px;`" class="z-50 bg-white text-center w-[10rem] rounded-xl border border-gray-200 shadow-xl"> <div x-cloak x-show="$store.openDropdown === {{ $usuario->id }} && menuX > 0" @click.away="$store.openDropdown = null" :style="`position:fixed;top:${menuY}px;left:${menuX}px;`" class="z-50 bg-white text-center w-[10rem] rounded-xl border border-gray-200 shadow-xl">
<button x-on:click="$store.openDropdown = null" wire:click="editar({{ $usuario->id }})" class="text-gray-600 w-full py-1.5 text-sm hover:bg-gray-50 border-b border-gray-100 hover:rounded-t-xl">Editar</button> <button x-on:click="$store.openDropdown = null" wire:click="editar({{ $usuario->id }})" class="text-gray-600 w-full py-1.5 text-sm hover:bg-gray-50 border-b border-gray-100 hover:rounded-t-xl">Editar</button>
<button x-on:click="$store.openDropdown = null" wire:click="editarPassword({{ $usuario->id }})" class="text-gray-600 w-full py-1.5 text-sm hover:bg-gray-50 border-b border-gray-100">Editar contraseña</button> <button x-on:click="$store.openDropdown = null" wire:click="editarPassword({{ $usuario->id }})" class="text-gray-600 w-full py-1.5 text-sm hover:bg-gray-50 border-b border-gray-100">Editar contraseña</button>
<button x-on:click="$store.openDropdown = null" wire:click="saldo({{ $usuario->id }})" class="text-gray-600 w-full py-1.5 text-sm hover:bg-gray-50 border-b border-gray-100">Agregar saldo</button> <button x-on:click="$store.openDropdown = null" wire:click="saldo({{ $usuario->id }})" class="text-gray-600 w-full py-1.5 text-sm hover:bg-gray-50 border-b border-gray-100">Agregar saldo</button>
@@ -172,7 +172,7 @@
</svg> </svg>
</button> </button>
<div x-cloak x-show="$store.openDropdown === {{ $usuario->id }}" @click.away="$store.openDropdown = null" :style="`position:fixed;top:${menuY}px;left:${menuX}px;`" class="z-50 bg-white text-center w-[10rem] rounded-xl border border-gray-200 shadow-xl"> <div x-cloak x-show="$store.openDropdown === {{ $usuario->id }} && menuX > 0" @click.away="$store.openDropdown = null" :style="`position:fixed;top:${menuY}px;left:${menuX}px;`" class="z-50 bg-white text-center w-[10rem] rounded-xl border border-gray-200 shadow-xl">
<button x-on:click="$store.openDropdown = null" wire:click="editar({{ $usuario->id }})" class="text-gray-600 w-full py-1.5 text-sm hover:bg-gray-50 border-b border-gray-100 hover:rounded-t-xl">Editar</button> <button x-on:click="$store.openDropdown = null" wire:click="editar({{ $usuario->id }})" class="text-gray-600 w-full py-1.5 text-sm hover:bg-gray-50 border-b border-gray-100 hover:rounded-t-xl">Editar</button>
<button x-on:click="$store.openDropdown = null" wire:click="editarPassword({{ $usuario->id }})" class="text-gray-600 w-full py-1.5 text-sm hover:bg-gray-50 border-b border-gray-100">Editar contraseña</button> <button x-on:click="$store.openDropdown = null" wire:click="editarPassword({{ $usuario->id }})" class="text-gray-600 w-full py-1.5 text-sm hover:bg-gray-50 border-b border-gray-100">Editar contraseña</button>
@if ($usuario->subvendedor) @if ($usuario->subvendedor)