diff --git a/resources/views/livewire/show-clientes.blade.php b/resources/views/livewire/show-clientes.blade.php index 3b6c288..beaf235 100644 --- a/resources/views/livewire/show-clientes.blade.php +++ b/resources/views/livewire/show-clientes.blade.php @@ -54,7 +54,13 @@ {{-- tabla clientes --}} - + + Nombre + Usuario + Contraseña + Estado + + Nombre Usuario Contraseña @@ -67,7 +73,270 @@ @foreach ($clientes as $cliente) - + + {{ $cliente->nombre_cliente ?? $cliente->cliente->name }} + + @if (!empty($cliente->cuentas_obsoletas->unique())) + @foreach ($cliente->cuentas_obsoletas->unique() as $cuenta) + {{ $cuenta->correo }}
+ @endforeach + @endif + @if (!empty($cliente->cuentas->unique())) + @foreach ($cliente->cuentas->unique() as $cuenta1) + {{ $cuenta1->correo }}
+ @endforeach + @endif +
+
+

Contraseña

+

{{ $this->consultaPassword($cliente->id) }}

+
+
+

Servicio

+ @if (!empty($cliente->tarifa_id)) +

{{ $cliente->tarifa->servicio->nombre }} + + @if ($cliente->tarifa->servicio->nombre != 'Spotify Premium' && $cliente->tarifa->servicio->nombre != 'Youtube Premium') + {{ $cliente->tarifa->pantallas }} Pantallas + @endif + +

+ @endif + + @if (!empty($cliente->promocion_id)) +

{{ $cliente->promocion->nombre }}

+ @endif +
+
+

Estado

+

+ {{ $cliente->estado ?? '' }} +

+
+
+

Restante

+

+ @php + $date1 = new DateTime(strtr(strval($fechaActual), '/', '-')); + $date2 = new DateTime(strtr(strval($cliente->fecha_final), '/', '-')); + @endphp + + @if ($date1 < $date2) +

+ @php + $diff = $date1->diff($date2); + echo $diff->days . ' dias'; + @endphp +

+ @endif + + @if ($date1 > $date2) +

+ @php + echo 'Vencido'; + @endphp +

+ @endif + + @if ($date1 == $date2) +

+ @php + echo 'Vence hoy!!'; + @endphp +

+ @endif +

+
+ + +
+

Acciones

+ @if (!empty($cliente->tarifa_id)) +

+

+ + +
+

+ Ver +

+ @if (!empty($cliente->cuentas->first()->estado)) + @if ($cliente->cuentas->first()->estado == 'pendiente' && $cliente->tarifa->servicio->renovacion == true) + {{-- renovar --}} + @if (Auth::user()->saldo->valor >= $cliente->tarifa->valor) +

Renovar

+ @else +

+ Renovar

+ @endif + @endif + @endif +
+ + + +
+

+ Notificar + + + +

+

+ Notificar + + + + + +

+

+ SMS + + + +

+
+
+

+ @elseif(!empty($cliente->promocion_id)) +

+

+ + +
+

Ver +

+ @if (!empty($cliente->cuentas->first()->estado)) + @if ($cliente->cuentas->first()->estado == 'pendiente' && $cliente->tarifa->servicio->renovacion == true) + {{-- renovar --}} + @if (Auth::user()->saldo->valor >= $cliente->tarifa->valor) +

Renovar

+ @else +

+ Renovar

+ @endif + @endif + @endif +
+ + + +
+

+ Notificar + + + +

+

+ Notificar + + + + + +

+

+ SMS + + + +

+
+
+

+ @endif +
+
+ + {{ $this->consultaPassword($cliente->id) }} + +

+ {{ $cliente->estado ?? '' }} +

+ + + + {{ $cliente->nombre_cliente ?? $cliente->cliente->name }} @@ -104,7 +373,7 @@

+ class="rounded-md font-medium text-center @if ($cliente->estado == 'activo') bg-green-500 text-white @endif @if ($cliente->estado == 'pendiente') bg-yellow-500 @endif"> {{ $cliente->estado ?? '' }}

@@ -141,109 +410,163 @@ @if (!empty($cliente->tarifa_id))