Update show-usuarios.blade.php

This commit is contained in:
lizandrogd
2025-07-07 16:21:45 -05:00
parent 1c20afebb4
commit 5a73ef6662
@@ -445,70 +445,78 @@
</div> </div>
{{-- Añadir usuario --}} {{-- Añadir usuario --}}
<div x-cloak x-show="add" x-transition:enter="transition duration-350" <div x-cloak x-show="add"
x-transition:enter-start="opacity-0 scale-100" x-transition:enter-end="opacity-100 scale-100" x-transition:enter="transition duration-350"
x-transition:leave="transition duration-350" x-transition:leave-start="opacity-100 scale-100" x-transition:enter-start="opacity-0 scale-100"
x-transition:leave-end="opacity-0 scale-100" x-transition:enter-end="opacity-100 scale-100"
class="absolute backdrop-blur-sm bg-black/20 left-0 bottom-0 top-0 right-0 h-full"> x-transition:leave="transition duration-350"
<div class="grid h-full place-items-center "> x-transition:leave-start="opacity-100 scale-100"
<form> x-transition:leave-end="opacity-0 scale-100"
<div class="bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4 rounded-[1rem] shadow-md"> class="fixed inset-0 z-50 backdrop-blur-sm bg-black/20">
<div class="mb-4"> <div class="grid h-full place-items-center">
<label for="nombre" class="block text-gray-700 text-sm font-bold mb-2">Nombre:</label> <form>
<input type="text" id="nombre" wire:model="nombre" <div class="bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4 rounded-[1rem] shadow-md w-[20rem] sm:w-[24rem]">
class="border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:border-neutral-300 focus:ring-0 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"> <!-- Nombre -->
@error('nombre') <div class="mb-4">
<span class="text-red-400 text-sm ">Requerido*</span> <label for="nombre" class="block text-gray-700 text-sm font-bold mb-2">Nombre:</label>
@enderror <input type="text" id="nombre" wire:model="nombre"
</div> class="border-2 border-neutral-200 rounded-[0.8rem] shadow appearance-none focus:border-neutral-300 focus:ring-0 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
@error('nombre')
<span class="text-red-400 text-sm">Requerido*</span>
@enderror
</div>
<div class="mb-4"> <!-- Email -->
<label for="email" class="block text-gray-700 text-sm font-bold mb-2">Email:</label> <div class="mb-4">
<input type="text" id="email" wire:model="email" <label for="email" class="block text-gray-700 text-sm font-bold mb-2">Email:</label>
class="border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:border-neutral-300 focus:ring-0 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"> <input type="text" id="email" wire:model="email"
@error('email') class="border-2 border-neutral-200 rounded-[0.8rem] shadow appearance-none focus:border-neutral-300 focus:ring-0 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
<span class="text-red-400 text-sm ">Requerido*</span> @error('email')
@enderror <span class="text-red-400 text-sm">Requerido*</span>
</div> @enderror
</div>
<div class="mb-4"> <!-- Contraseña -->
<label for="password" <div class="mb-4">
class="block text-gray-700 text-sm font-bold mb-2">Contraseña:</label> <label for="password" class="block text-gray-700 text-sm font-bold mb-2">Contraseña:</label>
<input type="text" id="password" wire:model="password" <input type="text" id="password" wire:model="password"
class="border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:border-neutral-300 focus:ring-0 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"> class="border-2 border-neutral-200 rounded-[0.8rem] shadow appearance-none focus:border-neutral-300 focus:ring-0 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
@error('password') @error('password')
<span class="text-red-400 text-sm ">Requerido*</span> <span class="text-red-400 text-sm">Requerido*</span>
@enderror @enderror
</div> </div>
<div class="mb-4"> <!-- Rol -->
<label class="select-none text-gray-700 text-sm font-bold mb-2">Selecciona rol:</label> <div class="mb-4">
<select name="estado_promocion" id="estado_promocion" wire:model="rol" class="w-full border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none ring-0 focus:ring-0 focus:border-neutral-300 py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"> <label for="estado_promocion" class="block text-gray-700 text-sm font-bold mb-2">Selecciona rol:</label>
<option selected>Rol</option> <select id="estado_promocion" wire:model="rol"
@foreach ($roles as $rol) class="w-full border-2 border-neutral-200 rounded-[0.8rem] shadow appearance-none ring-0 focus:ring-0 focus:border-neutral-300 py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
<option value="{{ $rol->id }}">{{ $rol->nombre }}</option> <option selected>Rol</option>
@endforeach @foreach ($roles as $rol)
</select> <option value="{{ $rol->id }}">{{ $rol->nombre }}</option>
@error('rol') @endforeach
<span class="text-red-400 text-sm ">Requerido*</span> </select>
@enderror @error('rol')
</div> <span class="text-red-400 text-sm">Requerido*</span>
@enderror
</div>
<div <!-- Botones -->
class="bg-white px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse sm:justify-evenly gap-5 mt-4"> <div class="px-4 py-3 sm:px-6 flex flex-col sm:flex-row-reverse sm:justify-evenly gap-3 mt-4">
<span> <button wire:click="crear" type="button"
<button wire:click="crear" type="button" class="inline-flex justify-center w-full rounded-md border border-transparent px-4 py-2 text-white bg-[#B221FD] hover:bg-[#7a02b8] focus:shadow-outline-green ease-in-out text-sm">
class="inline-flex justify-center w-full rounded-md border border-transparent px-4 py-2 sm:mb-[0] mb-2 text-white bg-[#B221FD] hover:bg-[#7a02b8] focus:shadow-outline-green ease-in-out sm-text-sm sm-leading-5">Guardar</button> Guardar
</span> </button>
<span> <button wire:click="limpiarInputAdd" type="button"
<button wire:click="limpiarInputAdd" type="button" class="inline-flex justify-center w-full rounded-md border border-transparent px-4 py-2 text-white bg-[#585858] hover:bg-[#3a3a3a] ease-in-out text-sm">
class="inline-flex justify-center w-full rounded-md border border-transparent px-4 py-2 text-white bg-[#585858] hover:bg-[#3a3a3a] ease-in-out sm-text-sm sm-leading-5">Cerrar</button> Cerrar
</span> </button>
</div> </div>
</div>
</form>
</div> </div>
</div> </form>
</div>
</div>
{{-- editar usuario --}} {{-- editar usuario --}}
<div x-cloak x-show="editar" x-transition:enter="transition duration-350" <div x-cloak x-show="editar" x-transition:enter="transition duration-350"