From dea9a97b72ef0da33f16deab51621d957e23ba2d Mon Sep 17 00:00:00 2001 From: Felipe Date: Fri, 1 Mar 2024 09:29:19 -0500 Subject: [PATCH] editor y administrador --- app/Http/Livewire/ShowLogHistorial.php | 5 ++- .../views/livewire/show-log-general.blade.php | 3 +- .../views/livewire/show-planes.blade.php | 16 +++---- .../views/livewire/show-promociones.blade.php | 4 +- .../views/livewire/show-servicios.blade.php | 11 ++--- .../views/livewire/show-usuarios.blade.php | 42 +++++++++---------- 6 files changed, 37 insertions(+), 44 deletions(-) diff --git a/app/Http/Livewire/ShowLogHistorial.php b/app/Http/Livewire/ShowLogHistorial.php index 8eb6163..993c48a 100644 --- a/app/Http/Livewire/ShowLogHistorial.php +++ b/app/Http/Livewire/ShowLogHistorial.php @@ -2,10 +2,11 @@ namespace App\Http\Livewire; +use App\Models\Log_general; use App\Models\Log_historial; use Livewire\Component; -class ShowLogGeneral extends Component +class ShowLogHistorial extends Component { public $entradas; @@ -14,7 +15,7 @@ class ShowLogGeneral extends Component public function render() { - $query = Log_historial::query(); + $query = Log_general::query(); if ($this->buscar) { $query->where('detalle', 'like', '%' . $this->buscar . '%'); diff --git a/resources/views/livewire/show-log-general.blade.php b/resources/views/livewire/show-log-general.blade.php index 10dbbe9..5b9b2e4 100755 --- a/resources/views/livewire/show-log-general.blade.php +++ b/resources/views/livewire/show-log-general.blade.php @@ -1,6 +1,6 @@
- +
@@ -22,7 +22,6 @@
- diff --git a/resources/views/livewire/show-planes.blade.php b/resources/views/livewire/show-planes.blade.php index 81cc130..ca2dcfa 100755 --- a/resources/views/livewire/show-planes.blade.php +++ b/resources/views/livewire/show-planes.blade.php @@ -49,18 +49,12 @@ fill="#ffffff" /> - @if (auth()->user()->rol->nombre != 'editor') - + @if (auth()->user()->rol->nombre != 'editor' && auth()->user()->rol->nombre != 'administrador') + Modificar tarifas - - - + + + @endif diff --git a/resources/views/livewire/show-promociones.blade.php b/resources/views/livewire/show-promociones.blade.php index 92e3dea..a54fa14 100755 --- a/resources/views/livewire/show-promociones.blade.php +++ b/resources/views/livewire/show-promociones.blade.php @@ -828,8 +828,10 @@
@if ($total > auth()->user()->saldo->valor)
-

No tiene fondo suficientes para esta compra, recargue su cuenta.

+

No tiene fondo suficientes para esta compra, recargue su cuenta.

+ @if (auth()->user()->rol->nombre != 'editor' && auth()->user()->rol->nombre != 'super') + @endif
@endif
diff --git a/resources/views/livewire/show-servicios.blade.php b/resources/views/livewire/show-servicios.blade.php index fd69d8c..3ecfe30 100755 --- a/resources/views/livewire/show-servicios.blade.php +++ b/resources/views/livewire/show-servicios.blade.php @@ -307,11 +307,12 @@
@if ($total > auth()->user()->saldo->valor) -
-

No tiene fondo suficientes para esta compra, recargue su cuenta.

- +
+

No tiene fondo suficientes para esta compra, recargue su cuenta.

+ + @if (auth()->user()->rol->nombre != 'editor' && auth()->user()->rol->nombre != 'super') + + @endif
@endif
diff --git a/resources/views/livewire/show-usuarios.blade.php b/resources/views/livewire/show-usuarios.blade.php index 887471d..ac8db5e 100755 --- a/resources/views/livewire/show-usuarios.blade.php +++ b/resources/views/livewire/show-usuarios.blade.php @@ -33,32 +33,28 @@ Usuario - Añadir - usuario - - + @if (auth()->user()->rol->nombre !== 'administrador' && auth()->user()->rol->nombre !== 'editor') + Añadir usuario + + Mod. - tarifas promos. - - - - - - + class="justify-center flex px-4 py-2 rounded-lg cursor-pointer text-white bg-[#B221FD] hover:bg-[#7a02b8]">Mod. + tarifas promos. + + + + + + @endif +