This commit is contained in:
lizandrogd
2023-10-07 22:07:02 -05:00
parent 8821601b4b
commit bbe3bae7e9
2 changed files with 26 additions and 9 deletions
+3 -3
View File
@@ -76,9 +76,9 @@ class ShowClientes extends Component
if ($this->venceHoy) {
$fecha5 = Carbon::parse($fechaHoy)->subDay(5);
$consulta_clientes = $consulta_clientes->whereDate('fecha_final', '<=', $fechaHoy)
->whereDate('fecha_final', '>=', $fecha5);
//$fecha5 = Carbon::parse($fechaHoy)->subDay(5);
$consulta_clientes = $consulta_clientes->whereDate('fecha_final', $fechaHoy);
//->whereDate('fecha_final', '>=', $fecha5);
}
$consulta_clientes = $consulta_clientes->with('tarifa', 'promocion', 'cliente')
@@ -11,7 +11,8 @@
</div>
{{-- Buscador --}}
<div class="bg-[#f5f5f5] m-auto p-2 md:p-5 rounded-[1.2rem] w-auto mb-4 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 rounded-[1.2rem] w-auto mb-4 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">
<svg class="w-4" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
@@ -42,7 +43,7 @@
</svg>
</div>
<div class="text-sm mr-auto ">
<label for="cbox2">Vencidos (Hace 5 días)</label>
<label for="cbox2">Vencidos Hoy</label>
<input type="checkbox" name="" id="cbox2" wire:model="venceHoy">
</div>
@@ -69,10 +70,22 @@
</x-slot>
<x-slot name="tbody">
@foreach ($clientes as $cliente)
<tr class="border-gray-200 text-left w-full pl-4 hover:bg-gray-200 hover:ring-gray-500" x-data="{ openOption: false }">
<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-2">{{ $cliente->nombre_cliente ?? $cliente->cliente->name }}</td>
<td class="pl-2">{{ $cliente->cliente->email ?? '' }}</td>
<td class="pl-2">
@if (!empty($cliente->cuentas_obsoletas->unique()))
@foreach ($cliente->cuentas_obsoletas->unique() as $cuenta)
{{ $cuenta->correo }} <br>
@endforeach
@endif
@if (!empty($cliente->cuentas->unique()))
@foreach ($cliente->cuentas->unique() as $cuenta1)
{{ $cuenta1->correo }} <br>
@endforeach
@endif
</td>
<td class="pl-2">{{ $this->consultaPassword($cliente->id) }}</td>
@@ -126,7 +139,9 @@
@if (!empty($cliente->tarifa_id))
<td class=" w-[1rem]">
<button class="flex m-auto gap-2 items-center bg-[#B221FD] text-white px-4 py-1 rounded-lg" wire:click="enviarNotificacion({{ $cliente->id }})">Notificar
<button
class="flex m-auto gap-2 items-center bg-[#B221FD] text-white px-4 py-1 rounded-lg"
wire:click="enviarNotificacion({{ $cliente->id }})">Notificar
<svg 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" x="0" y="0" viewBox="0 0 511.996 511.996"
@@ -190,7 +205,9 @@
<path
d="M20,0H4A4,4,0,0,0,0,4V16a4,4,0,0,0,4,4H6.9l4.451,3.763a1,1,0,0,0,1.292,0L17.1,20H20a4,4,0,0,0,4-4V4A4,4,0,0,0,20,0ZM7,5h5a1,1,0,0,1,0,2H7A1,1,0,0,1,7,5ZM17,15H7a1,1,0,0,1,0-2H17a1,1,0,0,1,0,2Zm0-4H7A1,1,0,0,1,7,9H17a1,1,0,0,1,0,2Z" />
</svg></button>
<button x-on:click="openOption=!openOption" wire:click="enviarNotificacion({{ $cliente->id }})" class=" md:hidden hover:fill-white fill-gray-500 flex justify-center items-center gap-2 text-gray-500 w-full py-1 hover:bg-[#00be00] hover:text-white border-b border-gray-300 ">Notificar
<button x-on:click="openOption=!openOption"
wire:click="enviarNotificacion({{ $cliente->id }})"
class=" md:hidden hover:fill-white fill-gray-500 flex justify-center items-center gap-2 text-gray-500 w-full py-1 hover:bg-[#00be00] hover:text-white border-b border-gray-300 ">Notificar
<svg 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" x="0"