ocultar fixed
This commit is contained in:
@@ -62,7 +62,6 @@ class ShowUsuarios extends Component
|
|||||||
public $precioTarifa;
|
public $precioTarifa;
|
||||||
public $tarifasGestion;
|
public $tarifasGestion;
|
||||||
|
|
||||||
public $estadoTarifa = true;
|
|
||||||
|
|
||||||
public $usuarioGestion_id;
|
public $usuarioGestion_id;
|
||||||
public $precioTarifasGestion;
|
public $precioTarifasGestion;
|
||||||
@@ -73,7 +72,6 @@ class ShowUsuarios extends Component
|
|||||||
public $consulta_usuarioPromo;
|
public $consulta_usuarioPromo;
|
||||||
public $precioPromoGestion;
|
public $precioPromoGestion;
|
||||||
public $promoGestion;
|
public $promoGestion;
|
||||||
public $estadoPromo;
|
|
||||||
public $buscar_promo;
|
public $buscar_promo;
|
||||||
|
|
||||||
public $servicio_modTarifas;
|
public $servicio_modTarifas;
|
||||||
@@ -86,6 +84,9 @@ class ShowUsuarios extends Component
|
|||||||
public $editarTarifaRol = false;
|
public $editarTarifaRol = false;
|
||||||
public $informacionTarifaRol;
|
public $informacionTarifaRol;
|
||||||
|
|
||||||
|
public $estadoTarifa = false;
|
||||||
|
public $estadoPromo = false;
|
||||||
|
|
||||||
protected $rules = [
|
protected $rules = [
|
||||||
'nombre' => 'required',
|
'nombre' => 'required',
|
||||||
'email' => 'required',
|
'email' => 'required',
|
||||||
@@ -391,7 +392,7 @@ class ShowUsuarios extends Component
|
|||||||
$usuarioTarifa->utilidad = $this->utilidad;
|
$usuarioTarifa->utilidad = $this->utilidad;
|
||||||
$usuarioTarifa->tarifa_id = $this->tarifasGestion;
|
$usuarioTarifa->tarifa_id = $this->tarifasGestion;
|
||||||
$usuarioTarifa->usuario_id = $this->usuarioGestion_id;
|
$usuarioTarifa->usuario_id = $this->usuarioGestion_id;
|
||||||
$usuarioTarifa->visible = $this->estadoTarifa ? 'activo' : 'inactivo';
|
$usuarioTarifa->visible = $this->estadoTarifa ? 'inactivo' : 'activo';
|
||||||
$usuarioTarifa->save();
|
$usuarioTarifa->save();
|
||||||
|
|
||||||
$this->alert('success', '¡Tarifas del usuario actualizadas correctamente!', [
|
$this->alert('success', '¡Tarifas del usuario actualizadas correctamente!', [
|
||||||
@@ -399,12 +400,7 @@ class ShowUsuarios extends Component
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->consulta_usuarioTarifas = Usuario_tarifa::where('usuario_id', $this->usuarioGestion_id)
|
$this->consulta_usuarioTarifas = Usuario_tarifa::where('usuario_id', $this->usuarioGestion_id)->with('tarifa')->get();
|
||||||
->with('tarifa')
|
|
||||||
->get();
|
|
||||||
|
|
||||||
|
|
||||||
$this->precioTarifasGestion = null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function eliminarUsuarioTarifa($id)
|
public function eliminarUsuarioTarifa($id)
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="bg-[#f5f5f5] md:w-full m-auto p-2 md:p-5 rounded-lg relative mb-4">
|
<div class="bg-[#f5f5f5] md:w-full m-auto p-2 md:p-5 rounded-lg relative mb-4">
|
||||||
<div class="md:flex justify-center my-2 items-center text-center">
|
<div class="md:flex gap-4 justify-center my-2 items-center text-center">
|
||||||
<div class="flex text-sm">
|
<div class="flex text-sm">
|
||||||
<x-icon-arrow-right/>
|
<x-icon-arrow-right/>
|
||||||
Usuario
|
Usuario
|
||||||
@@ -59,7 +59,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<x-ver-entrada />
|
<x-ver-entrada />
|
||||||
|
|
||||||
{{-- -Tabla usuarios - --}}
|
{{-- -Tabla usuarios - --}}
|
||||||
@@ -131,97 +130,17 @@
|
|||||||
</x-slot>
|
</x-slot>
|
||||||
</x-primary-table>
|
</x-primary-table>
|
||||||
|
|
||||||
{{-- <div class="py-2">
|
|
||||||
<table class="text-center rounded-lg shadow-lg m-auto mt-4 mb-4 bg-white md:w-10/12">
|
|
||||||
<thead class="font-normal bg-[#000029] text-white h-9">
|
|
||||||
<tr class="text-left">
|
|
||||||
<th class="rounded-l-lg font-normal pl-[2rem]">Nombre</th>
|
|
||||||
<th class="font-normal pl-[2rem]">Email</th>
|
|
||||||
<th class="font-normal pl-[2rem]">Rol</th>
|
|
||||||
<th class="font-normal pl-[2rem]">Ventas</th>
|
|
||||||
<th class="font-normal pl-[2rem]">Saldo</th>
|
|
||||||
<th class="font-normal pl-[2rem]"></th>
|
|
||||||
<th class="rounded-r-lg font-normal"></th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody class="text-gray-500 select-none">
|
|
||||||
@foreach ($usuarios as $usuario)
|
|
||||||
@if ($usuario->name == 'usuarioEliminado')
|
|
||||||
@else
|
|
||||||
<tr class="border-gray-200 text-left w-full pl-4 hover:bg-gray-200 hover:ring-gray-500"
|
|
||||||
x-data="{ openOption: false }">
|
|
||||||
<td class="pl-[2rem]">{{ $usuario->name ?? '' }}</td>
|
|
||||||
|
|
||||||
<td class="pl-[2rem]">{{ $usuario->email ?? '' }}</td>
|
|
||||||
|
|
||||||
<td class="pl-[2rem] ">{{ $usuario->rol->nombre ?? '' }}</td>
|
|
||||||
|
|
||||||
<td class="pl-[2rem]">{{ $usuario->historiales_venta_count ?? '' }}</td>
|
|
||||||
|
|
||||||
<td class="pl-[2rem]">{{ $usuario->saldo->valor ?? '' }}</td>
|
|
||||||
<td class="pl-[2rem]"><button wire:click="saldo({{ $usuario->id }})"
|
|
||||||
class="justify-center text-sm flex px-2 py-1 rounded-lg cursor-pointer text-white bg-[#B221FD] hover:bg-[#7a02b8] mb-0 md:mb-0">Recargar</button>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<td class="md:pl-[2rem] md:pr-[2rem]">
|
|
||||||
<button x-on:click="openOption=!openOption">
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
|
|
||||||
stroke-width="1.5" stroke="currentColor" class="w-6 h-6 cursor-pointer">
|
|
||||||
<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="sm:absolute bg-white text-center w-[8rem] rounded-[1rem] border-b border-gray-200 shadow-lg">
|
|
||||||
<button x-on:click="openOption=false" wire:click="editar({{ $usuario->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=!openOption"
|
|
||||||
wire:click="editarPassword({{ $usuario->id }})"
|
|
||||||
class="text-gray-500 w-full py-1 hover:bg-gray-200 border-b border-gray-300 ">Editar
|
|
||||||
password</button>
|
|
||||||
<button x-on:click="openOption=false" wire:click="saldo({{ $usuario->id }})"
|
|
||||||
class="text-gray-500 w-full py-1 hover:bg-gray-200 border-b border-gray-300 ">Agregar
|
|
||||||
saldo</button>
|
|
||||||
<button x-on:click="openOption=false"
|
|
||||||
wire:click="saldodesc({{ $usuario->id }})"
|
|
||||||
class="text-gray-500 w-full py-1 hover:bg-gray-200 border-b border-gray-300 ">Descontar
|
|
||||||
saldo</button>
|
|
||||||
<button x-on:click="openOption=false,gestion=true"
|
|
||||||
wire:click="gestionar({{ $usuario->id }},'{{ $usuario->rol_id }}','{{ $usuario->name }}')"
|
|
||||||
class="text-gray-500 w-full py-1 hover:bg-gray-200 border-b border-gray-300 ">Precio
|
|
||||||
servicio</button>
|
|
||||||
<button x-on:click="openOption=false,gestionPromo=true"
|
|
||||||
wire:click="gestionarPromociones({{ $usuario->id }},'{{ $usuario->name }}')"
|
|
||||||
class="text-gray-500 w-full py-1 hover:bg-gray-200 border-b border-gray-300 ">Precio
|
|
||||||
promocion</button>
|
|
||||||
<button x-on:click="openOption=false"
|
|
||||||
wire:click="eliminar({{ $usuario->id }})"
|
|
||||||
class="text-white w-full py-1 bg-red-400 rounded-b-[1rem] hover:bg-red-600 hover:rounded-b-[1rem]">Eliminar</button>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
@endif
|
|
||||||
@endforeach
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
{{ $usuarios->links() }}
|
|
||||||
</div> --}}
|
|
||||||
|
|
||||||
{{-- Gestionar precios --}}
|
{{-- Gestionar precios --}}
|
||||||
<div x-cloak x-show="gestion" x-transition:enter="transition duration-350"
|
<div x-cloak x-show="gestion" x-transition:enter="transition duration-350"
|
||||||
x-transition:enter-start="opacity-0 scale-100" x-transition:enter-end="opacity-100 scale-100"
|
x-transition:enter-start="opacity-0 scale-100" x-transition:enter-end="opacity-100 scale-100"
|
||||||
x-transition:leave="transition duration-350" x-transition:leave-start="opacity-100 scale-100"
|
x-transition:leave="transition duration-350" x-transition:leave-start="opacity-100 scale-100"
|
||||||
x-transition:leave-end="opacity-0 scale-100"
|
x-transition:leave-end="opacity-0 scale-100" class="absolute backdrop-blur-sm bg-black/20 left-0 bottom-0 top-0 right-0 h-full">
|
||||||
class="absolute backdrop-blur-sm bg-black/20 left-0 bottom-0 top-0 right-0 h-full">
|
|
||||||
<div class="grid h-full place-items-center ">
|
<div class="grid h-full place-items-center ">
|
||||||
<div class="bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4 rounded-[1rem] shadow-md">
|
<div class="bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4 rounded-[1rem] shadow-md">
|
||||||
<p class="text-gray-500 mb-2"> Personalización de precios para {{ $usuario_nombre }} </p>
|
<p class="text-gray-500 mb-2"> Personalización de precios para {{ $usuario_nombre }} </p>
|
||||||
|
|
||||||
<div class="flex mb-4">
|
<div class="flex mb-4">
|
||||||
<input id="buscar_servicio" type="search" wire:model="buscar_servicio"
|
<input id="buscar_servicio" type="search" wire:model="buscar_servicio" placeholder="Buscar servicio" class="w-full md:w-auto shadow-md border-2 active:border-neutral-200 focus:ring-0 border-neutral-200 rounded-[0.8rem] px-4 py-1 m-auto focus:border-neutral-300 focus:outline-none focus:shadow-outline">
|
||||||
placeholder="Buscar servicio"
|
|
||||||
class="w-full md:w-auto shadow-md border-2 active:border-neutral-200 focus:ring-0 border-neutral-200 rounded-[0.8rem] px-4 py-1 m-auto focus:border-neutral-300 focus:outline-none focus:shadow-outline">
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
@@ -260,6 +179,8 @@
|
|||||||
class="mx-auto p-2 rounded-full text-black">
|
class="mx-auto p-2 rounded-full text-black">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{{ $estadoTarifa == 1 ? 'Ocultar' : 'Mostrar' }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-3 mt-3 flex gap-4 justify-end items-center">
|
<div class="mb-3 mt-3 flex gap-4 justify-end items-center">
|
||||||
@@ -306,12 +227,10 @@
|
|||||||
@endif
|
@endif
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
@if ($usuarioTarifa->visible != 'true')
|
@if ($usuarioTarifa->visible !== 'activo')
|
||||||
<td class="pl-[2rem] flex"><input type="checkbox" disabled readonly
|
<td class="pl-[2rem] flex"><input type="checkbox" disabled readonly checked class="mx-auto p-2 rounded-full text-black"></td>
|
||||||
checked class="mx-auto p-2 rounded-full text-black"></td>
|
|
||||||
@else
|
@else
|
||||||
<td class="pl-[2rem] flex"><input type="checkbox" disabled readonly
|
<td class="pl-[2rem] flex"><input type="checkbox" disabled readonly class="mx-auto p-2 rounded-full text-black"></td>
|
||||||
class="mx-auto p-2 rounded-full text-black"></td>
|
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<td class="pl-[2rem]">${{ $usuarioTarifa->precio ?? '' }}</td>
|
<td class="pl-[2rem]">${{ $usuarioTarifa->precio ?? '' }}</td>
|
||||||
@@ -836,11 +755,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div x-cloak x-show="editarTarifaRol" x-transition:enter="transition duration-350"
|
<div x-cloak x-show="editarTarifaRol" x-transition:enter="transition duration-350" x-transition:enter-start="opacity-0 scale-100" x-transition:enter-end="opacity-100 scale-100" x-transition:leave="transition duration-350" x-transition:leave-start="opacity-100 scale-100" x-transition:leave-end="opacity-0 scale-100" class="fixed backdrop-blur-sm bg-black/20 left-0 bottom-0 top-0 right-0 h-full z-20">
|
||||||
x-transition:enter-start="opacity-0 scale-100" x-transition:enter-end="opacity-100 scale-100"
|
|
||||||
x-transition:leave="transition duration-350" x-transition:leave-start="opacity-100 scale-100"
|
|
||||||
x-transition:leave-end="opacity-0 scale-100"
|
|
||||||
class="fixed backdrop-blur-sm bg-black/20 left-0 bottom-0 top-0 right-0 h-full z-20">
|
|
||||||
<div class="grid h-full place-items-center">
|
<div class="grid h-full place-items-center">
|
||||||
<div class="bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4 rounded-[1rem] shadow-md">
|
<div class="bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4 rounded-[1rem] shadow-md">
|
||||||
@if ($informacionTarifaRol)
|
@if ($informacionTarifaRol)
|
||||||
@@ -899,6 +814,5 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user