diff --git a/app/Http/Livewire/ShowPlanes.php b/app/Http/Livewire/ShowPlanes.php index a518638..b40762c 100644 --- a/app/Http/Livewire/ShowPlanes.php +++ b/app/Http/Livewire/ShowPlanes.php @@ -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() diff --git a/resources/views/components/listado-planes.blade.php b/resources/views/components/listado-planes.blade.php index 32b4b51..d62138a 100644 --- a/resources/views/components/listado-planes.blade.php +++ b/resources/views/components/listado-planes.blade.php @@ -5,6 +5,7 @@ {{ $cuenta->servicio->nombre ?? '' }} {{ $cuenta->correo?? '' }} + {{ $cuenta->password ?? '' }} {{ carbon\Carbon::parse($cuenta->inicio)->format('d M Y') ?? '' }} - {{ carbon\Carbon::parse($cuenta->vencimiento)->format('d M Y') ?? '' }} diff --git a/resources/views/components/primary-table.blade.php b/resources/views/components/primary-table.blade.php new file mode 100644 index 0000000..dbfbcf2 --- /dev/null +++ b/resources/views/components/primary-table.blade.php @@ -0,0 +1,11 @@ +
+ + + {{ $thead }} + + + {{ $tbody }} + +
+ {{ $tlink }} +
diff --git a/resources/views/layouts/footer.blade.php b/resources/views/layouts/footer.blade.php index 5526bb3..133636b 100644 --- a/resources/views/layouts/footer.blade.php +++ b/resources/views/layouts/footer.blade.php @@ -1,13 +1,3 @@ -
-

Colombia | ®SirPremium

- - - - +
+

Colombia | ®SirPremium

\ No newline at end of file diff --git a/resources/views/livewire/show-index.blade.php b/resources/views/livewire/show-index.blade.php index 91059a8..20cbc51 100644 --- a/resources/views/livewire/show-index.blade.php +++ b/resources/views/livewire/show-index.blade.php @@ -45,9 +45,7 @@ @endif @endforeach
- - - + @include('layouts.footer') diff --git a/resources/views/livewire/show-planes.blade.php b/resources/views/livewire/show-planes.blade.php index c82909e..0671e9d 100644 --- a/resources/views/livewire/show-planes.blade.php +++ b/resources/views/livewire/show-planes.blade.php @@ -132,22 +132,77 @@ +
+

Ver

+ +

entradas

+
+ + + + + + + id + Servicio + Correo + Contraseña + Inicio - Final + Restante + Ocupado + + + + + + + + @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 + + + {{ $cuentas->links() }} + + {{-- tabla --}}
- - - - - - - - - - - + diff --git a/resources/views/menu/planes.blade.php b/resources/views/menu/planes.blade.php index 3220688..793342a 100644 --- a/resources/views/menu/planes.blade.php +++ b/resources/views/menu/planes.blade.php @@ -1,3 +1,7 @@ - +
+ +
+ + @include('layouts.footer')
\ No newline at end of file
idServiciocorreoRestanteOcupado