log con filtro y solo cuando editen el usuario

This commit is contained in:
Felipe
2024-03-20 10:33:19 -05:00
parent dc129dac8a
commit 2b0d1b48e7
4 changed files with 48 additions and 22 deletions
@@ -1,25 +1,26 @@
<div class="h-full w-full md:my-2">
<div
class="bg-[#f5f5f5] m-auto p-2 md:p-5 w-auto x-auto grid grid-cols-1 lg:grid-cols-1text-center rounded-xl py-4 px-2 ms:px-8 xl:mx-10 mb-8 ">
<div class="bg-[#f5f5f5] m-auto p-2 md:p-5 w-auto x-auto grid grid-cols-1 lg:grid-cols-1text-center rounded-xl py-4 px-2 ms:px-8 xl:mx-10 mb-8 ">
<div class="md:flex justify-center my-2 items-center text-center">
<div class="flex text-sm">
<x-icon-arrow-right/>
Log historial
</div>
<div class="flex relative text-sm mx-auto w-64 md:w-auto my-2">
<input id="buscar" type="search" wire:model.debounce.500ms="buscar" placeholder="Buscar"
class="shadow-md border-2 active:border-neutral-200 focus:ring-0 border-neutral-200 w-64 md:w-auto rounded-lg pr-7 py-1 m-auto focus:border-neutral-300 focus:outline-none focus:shadow-outline">
<svg class="w-5 absolute top-2 right-3" xmlns="http://www.w3.org/2000/svg" version="1.1"
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.com/svgjs" class="w-4 absolute"
x="0" y="0" viewBox="0 0 24 24" style="enable-background:new 0 0 512 512;rotate: 90deg;"
xml:space="preserve" class="">
<input id="buscar" type="search" wire:model.debounce.500ms="buscar" placeholder="Buscar" class="shadow-md border-2 active:border-neutral-200 focus:ring-0 border-neutral-200 w-64 md:w-auto rounded-lg pr-7 py-1 m-auto focus:border-neutral-300 focus:outline-none focus:shadow-outline">
<svg class="w-5 absolute top-2 right-3" xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.com/svgjs" class="w-4 absolute" x="0" y="0" viewBox="0 0 24 24" style="enable-background:new 0 0 512 512;rotate: 90deg;" xml:space="preserve" class="">
<g id="Layer_31" data-name="Layer 31">
<path
d="m21.71 20.29-5.4-5.39a7.92 7.92 0 0 0 1.69-4.9 8 8 0 1 0 -8 8 7.92 7.92 0 0 0 4.9-1.69l5.39 5.4a1 1 0 0 0 1.42 0 1 1 0 0 0 0-1.42zm-17.71-10.29a6 6 0 1 1 6 6 6 6 0 0 1 -6-6z"
fill="#b221fd" data-original="#000000" class=""></path>
<path d="m21.71 20.29-5.4-5.39a7.92 7.92 0 0 0 1.69-4.9 8 8 0 1 0 -8 8 7.92 7.92 0 0 0 4.9-1.69l5.39 5.4a1 1 0 0 0 1.42 0 1 1 0 0 0 0-1.42zm-17.71-10.29a6 6 0 1 1 6 6 6 6 0 0 1 -6-6z" fill="#b221fd" data-original="#000000" class=""></path>
</g>
</svg>
</div>
<select name="tipo" id="tipo" wire:model.debounce.500ms="tipo" class="w-40 mx-auto border-2 border-neutral-200 rounded-lg 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">
<option value="" selected>Todos</option>
<option value="creado">Creadas</option>
<option value="eliminado">Eliminadas</option>
<option value="editado">Editadas</option>
<option value="renovado">Renovadas</option>
<option value="liberado">Liberadas</option>
</select>
<select name="user_id" id="user_id" wire:model.debounce.500ms="user_id" class="w-40 mx-auto border-2 border-neutral-200 rounded-lg 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">
<option value="" selected>Todos</option>
@foreach ($users as $user)
@@ -13,7 +13,7 @@
}" class="h-full w-full md:my-2">
<div class=" fixed backdrop-blur-sm bg-white/70 left-0 bottom-0 top-0 right-0 h-full z-40" wire:loading
wire:target="noRenovar,siRenovar,ver,openRenovar,saveRenovar,createNewCuenta,createServicio,verObservacion,update,verObservacion1,update_observaciones1,eliminarCuentas,updateTarifas">
wire:target="noRenovar,siRenovar,ver,openRenovar,confirm_delete_cuenta,saveRenovar,createNewCuenta,createServicio,verObservacion,update,verObservacion1,update_observaciones1,eliminarCuentas,updateTarifas">
<div class="grid h-full place-items-center">
<div class="max-w-xs">
<img src="./img/loading.gif" alt="" class="w-full text-center">
@@ -1027,9 +1027,10 @@
<div class="mb-4 flex flex-col">
<label for="nota_eliminacion" class="block text-gray-700 text-sm font-bold mb-2">Nota:</label>
<textarea type="text" id="nota_eliminacion" wire:model="nota_eliminacion"
placeholder="Porque quieres eliminar esta cuenta?"
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 h-40 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"></textarea>
<textarea type="text" id="nota_eliminacion" wire:model="nota_eliminacion" placeholder="Porque quieres eliminar esta cuenta?" 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 h-40 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"></textarea>
@error('nota_eliminacion')
<div class="text-red-500">{{ $message }}</div>
@enderror
</div>
<div class="bg-white py-3 sm:flex sm:flex-row-reverse sm:justify-between gap-5 mt-4">
@@ -1053,8 +1054,11 @@
<div class="mb-4 flex flex-col">
<label for="nota_eliminacion" class="block text-gray-700 text-sm font-bold mb-2">Nota:</label>
<textarea type="text" id="nota_eliminacion" wire:model="nota_eliminacion"
placeholder="Porque quieres eliminar esta cuenta?"
placeholder="Porque quieres eliminar estas cuentas?"
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 h-40 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"></textarea>
@error('nota_eliminacion')
<div class="text-red-500">{{ $message }}</div>
@enderror
</div>
<div class="bg-white py-3 sm:flex sm:flex-row-reverse sm:justify-between gap-5 mt-4">