planes
This commit is contained in:
@@ -97,6 +97,8 @@ class ShowPlanes extends Component
|
||||
public $perfil;
|
||||
public $repetidas;
|
||||
|
||||
public $entradas = 10;
|
||||
|
||||
public $editarTarifaRol = false;
|
||||
|
||||
|
||||
@@ -155,7 +157,7 @@ class ShowPlanes extends Component
|
||||
}
|
||||
|
||||
|
||||
$consulta_cuentas = $consulta_cuentas->paginate(30);
|
||||
$consulta_cuentas = $consulta_cuentas->paginate($this->entradas);
|
||||
|
||||
if ( $this->searchTerm) {
|
||||
$this->usuarios = User::where('email', 'LIKE', '%' . $this->searchTerm . '%')->get();
|
||||
@@ -168,7 +170,6 @@ class ShowPlanes extends Component
|
||||
|
||||
|
||||
return view('livewire.show-planes', [
|
||||
|
||||
'cuentas' => $consulta_cuentas,
|
||||
'servicios' => Servicio::where('estado','activo')->get(),
|
||||
'roles' => Role::get()
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
<td class="pl-[2rem]">{{ $cuenta->servicio->nombre ?? '' }}</td>
|
||||
|
||||
<td class="pl-[2rem] text-xs sm:text-sm ">{{ $cuenta->correo?? '' }}</td>
|
||||
<td class="pl-[2rem] text-xs sm:text-sm ">{{ $cuenta->password ?? '' }}</td>
|
||||
|
||||
<td class="pl-[2rem] text-xs hidden md:inline-table">{{ carbon\Carbon::parse($cuenta->inicio)->format('d M Y') ?? '' }} - {{ carbon\Carbon::parse($cuenta->vencimiento)->format('d M Y') ?? '' }}</td>
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
<div class="overflow-y-auto max-h-full">
|
||||
<table wire:loading.class="opacity-50 cursor-wait" class="w-full sm-w-[20rem] text-center mt-4 border-separate border-spacing-y-2">
|
||||
<thead class="font-normal bg-[#000029] text-white h-9">
|
||||
{{ $thead }}
|
||||
</thead>
|
||||
<tbody class="text-gray-500 select-none">
|
||||
{{ $tbody }}
|
||||
</tbody>
|
||||
</table>
|
||||
{{ $tlink }}
|
||||
</div>
|
||||
@@ -1,13 +1,3 @@
|
||||
<div class="w-full bg-gray-300 text-gray-500 text-center py-2 text-sm flex rounded-t-2xl mx-auto ">
|
||||
<p class="mx-auto ">Colombia | ®SirPremium</p>
|
||||
<!--div class="flex px-2">
|
||||
<p class="my-auto ml-auto">Hecho con </p>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="w-5 h-5 text-red-400 my-auto mx-1">
|
||||
<path d="M11.645 20.91l-.007-.003-.022-.012a15.247 15.247 0 01-.383-.218 25.18 25.18 0 01-4.244-3.17C4.688 15.36 2.25 12.174 2.25 8.25 2.25 5.322 4.714 3 7.688 3A5.5 5.5 0 0112 5.052 5.5 5.5 0 0116.313 3c2.973 0 5.437 2.322 5.437 5.25 0 3.925-2.438 7.111-4.739 9.256a25.175 25.175 0 01-4.244 3.17 15.247 15.247 0 01-.383.219l-.022.012-.007.004-.003.001a.752.752 0 01-.704 0l-.003-.001z" />
|
||||
</svg>
|
||||
<p class="my-auto mr-auto"> por Jaguar web services</p>
|
||||
</div-->
|
||||
|
||||
|
||||
|
||||
<div class="w-full bg-gray-300 text-gray-500 text-center py-2 text-sm flex rounded-t-2xl mx-auto fixed bottom-0">
|
||||
<p class="mx-auto">Colombia | ®SirPremium</p>
|
||||
</div>
|
||||
@@ -45,9 +45,7 @@
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
@include('layouts.footer')
|
||||
</div>
|
||||
|
||||
@@ -132,22 +132,77 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex justify-start items-center gap-x-2">
|
||||
<p>Ver</p>
|
||||
<select wire:model="entradas" name="entradas" id="entradas" class="border-gray-200 rounded-md appearance-none">
|
||||
<option value="10">10</option>
|
||||
<option value="25">25</option>
|
||||
<option value="50">50</option>
|
||||
<option value="100">100</option>
|
||||
</select>
|
||||
<p>entradas</p>
|
||||
</div>
|
||||
|
||||
<x-primary-table>
|
||||
<x-slot name="thead">
|
||||
<tr class="text-left">
|
||||
|
||||
<th class="rounded-l-lg font-normal pl-[2rem]"></th>
|
||||
<th class="font-normal pl-[2rem]">id</th>
|
||||
<th class="font-normal pl-[2rem]">Servicio</th>
|
||||
<th class="font-normal pl-[2rem]">Correo</th>
|
||||
<th class="font-normal pl-[2rem]">Contraseña</th>
|
||||
<th class="font-normal pl-[2rem] hidden md:inline-table">Inicio - Final</th>
|
||||
<th class="font-normal pl-[2rem]">Restante</th>
|
||||
<th class="font-normal pl-[2rem]">Ocupado</th>
|
||||
<th class="font-normal pl-[2rem]"></th>
|
||||
<th class="font-normal pl-[2rem] hidden md:inline-table"></th>
|
||||
<th class="font-normal rounded-r-lg md:rounded-r-none"></th>
|
||||
<th class="rounded-r-lg font-normal hidden md:inline-table"></th>
|
||||
</tr>
|
||||
</x-slot>
|
||||
<x-slot name="tbody">
|
||||
@php
|
||||
$n = 0;
|
||||
@endphp
|
||||
|
||||
@foreach ($cuentas as $cuenta)
|
||||
@php
|
||||
$n++;
|
||||
$historiales = false;
|
||||
|
||||
if (
|
||||
now()
|
||||
->addDay()
|
||||
->gt($cuenta->vencimiento)
|
||||
) {
|
||||
$historiales = $cuenta
|
||||
->historiales()
|
||||
->where(
|
||||
'fecha_final',
|
||||
'>',
|
||||
now()
|
||||
->addDay()
|
||||
->toDateString(),
|
||||
)
|
||||
->count();
|
||||
}
|
||||
|
||||
@endphp
|
||||
|
||||
@include('components/listado-planes')
|
||||
@endforeach
|
||||
</x-slot>
|
||||
<x-slot name="tlink">
|
||||
{{ $cuentas->links() }}
|
||||
</x-slot>
|
||||
</x-primary-table>
|
||||
{{-- tabla --}}
|
||||
<div class="overflow-y-auto max-h-full">
|
||||
<table wire:loading.class="opacity-50 cursor-wait" class="w-full sm-w-[20rem] text-center mt-4 border-separate border-spacing-y-2">
|
||||
<thead class="font-normal bg-[#000029] text-white h-9">
|
||||
<tr class="text-left">
|
||||
<th class="rounded-l-lg font-normal pl-[2rem]"></th>
|
||||
<th class="font-normal pl-[2rem]">id</th>
|
||||
<th class="font-normal pl-[2rem]">Servicio</th>
|
||||
<th class="font-normal pl-[2rem]">correo</th>
|
||||
<th class="font-normal pl-[2rem] hidden md:inline-table">Inicio - Final</th>
|
||||
<th class="font-normal pl-[2rem]">Restante</th>
|
||||
<th class="font-normal pl-[2rem]">Ocupado</th>
|
||||
<th class="font-normal pl-[2rem]"></th>
|
||||
<th class="font-normal pl-[2rem] hidden md:inline-table"></th>
|
||||
<th class="font-normal rounded-r-lg md:rounded-r-none"></th>
|
||||
<th class="rounded-r-lg font-normal hidden md:inline-table"></th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="text-gray-500 select-none">
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
<x-app-layout>
|
||||
<livewire:show-planes />
|
||||
<div class="pb-4">
|
||||
<livewire:show-planes />
|
||||
</div>
|
||||
|
||||
@include('layouts.footer')
|
||||
</x-app-layout>
|
||||
Reference in New Issue
Block a user