menu visible

This commit is contained in:
Felipe
2024-03-04 11:32:45 -05:00
parent 15baeb4caf
commit 14a7b9a782
21 changed files with 313 additions and 362 deletions
@@ -15,7 +15,7 @@
<div class="flex justify-between my-2 items-center">
<div class="flex items-center gap-4">
<div class="flex text-sm">
<svg class="w-4" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.com/svgjs" version="1.1" x="0" y="0" viewBox="0 0 24 24" style="enable-background:new 0 0 512 512" xml:space="preserve"><g><path d="M15.4,9.88,10.81,5.29a1,1,0,0,0-1.41,0,1,1,0,0,0,0,1.42L14,11.29a1,1,0,0,1,0,1.42L9.4,17.29a1,1,0,0,0,1.41,1.42l4.59-4.59A3,3,0,0,0,15.4,9.88Z" fill="#b221fd" data-original="#000000"/></g></svg>
<x-icon-arrow-right/>
Categorias
</div>
<a x-on:click="nuevaCategoria=true" class="flex px-4 py-2 rounded-lg cursor-pointer text-white bg-[#B221FD] hover:bg-[#7a02b8]"><p class="text-sm md:text-base">Nueva categoria</p>
@@ -24,7 +24,7 @@
</svg>
</a>
</div>
</div>
</div>
<div class="mt-2">
@@ -50,7 +50,7 @@
{{$categoria->nombre}}
</td>
<td class="sm:pl-[2rem] text-ellipsis">
{{$categoria->descripcion}}
{{$categoria->descripcion}}
</td>
<td class="md:pl-[2rem] md:pr-[2rem]">
<button x-on:click="openOption=!openOption">
@@ -58,7 +58,7 @@
<path stroke-linecap="round" stroke-linejoin="round" d="M6.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0zM12.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0zM18.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0z" />
</svg>
</button>
<div x-cloak x-show="openOption" @click.away="openOption = false" class="right-0 sm:right-auto absolute bg-white text-center w-[8rem] rounded-[1rem] border-b border-gray-200 shadow-lg">
<button x-on:click="openOption=false,editarCategoria = true" wire:click="editar({{$categoria->id}})" class="text-gray-500 w-full py-1 hover:bg-gray-200 border-b border-gray-300 hover:rounded-t-[1rem]">Editar</button>
<button x-on:click="openOption=false" wire:click="delete({{$categoria->id}})" class="text-white w-full py-1 bg-[#ff5050] rounded-b-[1rem] hover:bg-[#fd2828] hover:rounded-b-[1rem]">Eliminar</button>
@@ -73,7 +73,7 @@
</div>
{{-- Modal agregar categoria --}}
<div x-cloak x-show="nuevaCategoria"
<div x-cloak x-show="nuevaCategoria"
x-transition:enter="transition duration-350"
x-transition:enter-start="opacity-0 scale-100"
x-transition:enter-end="opacity-100 scale-100"
@@ -97,13 +97,13 @@
@endif
</div>
</div>
<div class="mb-4">
<label for="nombre" class="block text-gray-700 text-sm font-bold mb-2">Nombre:</label>
<input type="text" id="nombre" wire:model="nombre" 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">
@error('nombre') <span class="text-red-400 text-sm ">Requerido*</span> @enderror
</div>
<div class="mb-4">
<label for="descripcion" class="block text-gray-700 text-sm font-bold mb-2">Descripción:</label>
<textarea type="text" id="descripcion" wire:model="descripcion" class="border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:ring-0 focus:border-neutral-300 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"></textarea>
@@ -123,7 +123,7 @@
</div>
{{-- Modal editar categoria --}}
<div x-cloak x-show="editarCategoria"
<div x-cloak x-show="editarCategoria"
x-transition:enter="transition duration-350"
x-transition:enter-start="opacity-0 scale-100"
x-transition:enter-end="opacity-100 scale-100"
@@ -147,13 +147,13 @@
@endif
</div>
</div>
<div class="mb-4">
<label for="nombre" class="block text-gray-700 text-sm font-bold mb-2">Nombre:</label>
<input type="text" id="nombre" wire:model="nombre" 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">
@error('nombre') <span class="text-red-400 text-sm ">Requerido*</span> @enderror
</div>
<div class="mb-4">
<label for="descripcion" class="block text-gray-700 text-sm font-bold mb-2">Descripción:</label>
<textarea type="text" id="descripcion" wire:model="descripcion" class="border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:ring-0 focus:border-neutral-300 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"></textarea>