From fbe14cab91efb205150c10d8bc4518e525272d9f Mon Sep 17 00:00:00 2001 From: lizandrogd <77708265+lizandrogd@users.noreply.github.com> Date: Mon, 7 Jul 2025 16:22:54 -0500 Subject: [PATCH] Update show-usuarios.blade.php --- .../views/livewire/show-usuarios.blade.php | 718 +++++++++--------- 1 file changed, 361 insertions(+), 357 deletions(-) diff --git a/resources/views/livewire/show-usuarios.blade.php b/resources/views/livewire/show-usuarios.blade.php index f0fae50..5b95914 100755 --- a/resources/views/livewire/show-usuarios.blade.php +++ b/resources/views/livewire/show-usuarios.blade.php @@ -27,22 +27,22 @@
@if (auth()->user()->subvendedor || auth()->user()->rol->nombre === 'administrador' || auth()->user()->rol->nombre === 'editor' || auth()->user()->rol->nombre === 'super') - Añadir - usuario - - - - + Añadir + usuario + + + + @endif @if (auth()->user()->rol->nombre === 'super' || auth()->user()->rol->nombre === 'administrador') - Mod. - tarifas promos - - - - - + Mod. + tarifas promos + + + + + @endif
@@ -72,9 +72,9 @@ - @if (auth()->user()->rol_id == 5) - Subvendedor - @endif + @if (auth()->user()->rol_id == 5) + Subvendedor + @endif Nombre Email Rol @@ -87,74 +87,74 @@ @foreach ($usuarios as $usuario) - + @if (auth()->user()->rol_id == 5) - + {{ $usuario->subvendedor_relacion->name ?? 'N/A' }} @endif - {{ $usuario->name ?? '' }} - {{ $usuario->email ?? '' }} - {{ $usuario->rol->nombre ?? '' }} - {{ $usuario->historiales_venta_count ?? '' }} - {{ number_format($usuario->saldo->valor ?? 0) ?? 0 }} - -

- Tarifas: {{ $usuario->countActiveTarifas() ?? 0 }}, - Promos: {{ $usuario->countActivePromos() ?? 0 }} -

- - - @if (auth()->user()->rol->nombre == 'super') - - @else - @if (Auth::user()->subvendedor) - - @endif - @endif - - + {{ $usuario->name ?? '' }} + {{ $usuario->email ?? '' }} + {{ $usuario->rol->nombre ?? '' }} + {{ $usuario->historiales_venta_count ?? '' }} + {{ number_format($usuario->saldo->valor ?? 0) ?? 0 }} + +

+ Tarifas: {{ $usuario->countActiveTarifas() ?? 0 }}, + Promos: {{ $usuario->countActivePromos() ?? 0 }} +

+ + @if (auth()->user()->rol->nombre == 'super') - - - -
- - - - - - - -
- - @elseif (Auth::user()->subvendedor) - - - -
- - - @if ($usuario->subvendedor) - - @else - - @endif - - - -
- - @else + + @else + @if (Auth::user()->subvendedor) + @endif - + @endif + + + @if (auth()->user()->rol->nombre == 'super') + + + +
+ + + + + + + +
+ + @elseif (Auth::user()->subvendedor) + + + +
+ + + @if ($usuario->subvendedor) + + @else + + @endif + + + +
+ + @else + @endif + @endforeach
@@ -185,17 +185,17 @@ class="border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:border-neutral-300 focus:ring-0 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"> @if (!empty($consulta_tarifas)) - @foreach ($consulta_tarifas as $consulta_tarifa) - @if ($consulta_tarifa->servicio && $consulta_tarifa->servicio->por_tiempo) - - @elseif ($consulta_tarifa->servicio) - - @endif - @endforeach + @foreach ($consulta_tarifas as $consulta_tarifa) + @if ($consulta_tarifa->servicio && $consulta_tarifa->servicio->por_tiempo) + + @elseif ($consulta_tarifa->servicio) + + @endif + @endforeach @endif @@ -221,9 +221,9 @@ @if (auth()->user()->rol->nombre === 'super' || auth()->user()->rol->nombre === 'administrador') - + @else - + @endif @@ -246,61 +246,61 @@ @if (!empty($consulta_usuarioTarifas)) - @foreach ($consulta_usuarioTarifas as $usuarioTarifa) - - {{ $usuarioTarifa->tarifa->servicio->nombre ?? '' }} - + @foreach ($consulta_usuarioTarifas as $usuarioTarifa) + + {{ $usuarioTarifa->tarifa->servicio->nombre ?? '' }} + - - @if ($usuarioTarifa->tarifa) - @if ($usuarioTarifa->tarifa->servicio && $usuarioTarifa->tarifa->servicio->por_tiempo) - {{ $usuarioTarifa->tarifa->dias ?? '' }} - {{ $usuarioTarifa->tarifa->dias == 1 ? 'día' : 'días' }} - @else - {{ $usuarioTarifa->tarifa->pantallas ?? '' }} - {{ $usuarioTarifa->tarifa->pantallas == 1 ? 'pantalla' : 'pantallas' }} - - {{ $usuarioTarifa->tarifa->dias ?? '' }} - {{ $usuarioTarifa->tarifa->dias == 1 ? 'día' : 'días' }} - @endif - @else - {{ 'Tarifa no disponible' }} - @endif + + @if ($usuarioTarifa->tarifa) + @if ($usuarioTarifa->tarifa->servicio && $usuarioTarifa->tarifa->servicio->por_tiempo) + {{ $usuarioTarifa->tarifa->dias ?? '' }} + {{ $usuarioTarifa->tarifa->dias == 1 ? 'día' : 'días' }} + @else + {{ $usuarioTarifa->tarifa->pantallas ?? '' }} + {{ $usuarioTarifa->tarifa->pantallas == 1 ? 'pantalla' : 'pantallas' }} + - {{ $usuarioTarifa->tarifa->dias ?? '' }} + {{ $usuarioTarifa->tarifa->dias == 1 ? 'día' : 'días' }} + @endif + @else + {{ 'Tarifa no disponible' }} + @endif - + - @if ($usuarioTarifa->visible !== 'true') - - @else - - @endif + @if ($usuarioTarifa->visible !== 'true') + + @else + + @endif - ${{ $usuarioTarifa->precio ?? '' }} - ${{ $usuarioTarifa->utilidad ?? '' }} + ${{ $usuarioTarifa->precio ?? '' }} + ${{ $usuarioTarifa->utilidad ?? '' }} - - - - - - - - - - - - - - @endforeach + + + + + + + + + + + + + + @endforeach @endif @@ -339,12 +339,12 @@ class="border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:border-neutral-300 focus:ring-0 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"> @if (!empty($consulta_promo)) - @foreach ($consulta_promo as $promocion) - @if (!empty($promocion->nombre)) - - @endif - @endforeach + @foreach ($consulta_promo as $promocion) + @if (!empty($promocion->nombre)) + + @endif + @endforeach @endif @@ -367,9 +367,9 @@ Utilidad

@if (auth()->user()->rol->nombre === 'super' || auth()->user()->rol->nombre === 'administrador') - + @else - + @endif - - - - - - - - - {{-- editar usuario --}} -
-
+ class="fixed inset-0 z-50 backdrop-blur-sm bg-black/20"> +
-
+
+
- - - @error('nombre_edit') - Requerido* + + + @error('nombre') + Requerido* @enderror
+ +
+ + + @error('email') + Requerido* + @enderror +
+ + +
+ + + @error('password') + Requerido* + @enderror +
+ + +
+ + + @error('rol') + Requerido* + @enderror +
+ + +
+ + +
+
+ +
+
+ + + {{-- Editar usuario --}} +
+
+
+
+ +
+ + + @error('nombre_edit') + Requerido* + @enderror +
+ +
+ class="border-2 border-neutral-200 rounded-[0.8rem] shadow appearance-none focus:border-neutral-300 focus:ring-0 w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"> @error('email_edit') - Requerido* + Requerido* @enderror
+
- - + @foreach ($roles as $rol) - + @endforeach - @error('rol_edit') - Requerido* + Requerido* @enderror
-
- - - - - - + +
+ +
@@ -595,7 +599,7 @@ @error('newPassword') - {{ 'Diligencie correctamente*' }} + {{ 'Diligencie correctamente*' }} @enderror
@@ -640,12 +644,12 @@
Tu valor total seria: $

@php - $valor_recargar = str_replace([',', '.'], '', $valor_recargar); + $valor_recargar = str_replace([',', '.'], '', $valor_recargar); @endphp @if (!empty($valor_recargar)) - {{ number_format((int) $saldo_actual + (int) $valor_recargar) }} + {{ number_format((int) $saldo_actual + (int) $valor_recargar) }} @else - {{ number_format((int) $saldo_actual) }} + {{ number_format((int) $saldo_actual) }} @endif

@@ -654,11 +658,11 @@
@if (auth()->user()->rol->nombre === 'administrador' || auth()->user()->rol->nombre === 'super') - + @else - @if (Auth::user()->subvendedor) - - @endif + @if (Auth::user()->subvendedor) + + @endif @endif @@ -733,7 +737,7 @@ class="border-2 border-neutral-200 rounded-[0.8rem] shadow apperance-none focus:border-neutral-300 focus:ring-0 w-[72%] sm:w-60 py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"> @foreach ($promo as $servicio) - + @endforeach @@ -746,7 +750,7 @@ class="w-full border-2 border-neutral-200 rounded-lg focus:ring-0 shadow apperance-none focus:border-neutral-300 py-2 pl-2 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"> @foreach ($roles as $rol) - + @endforeach
@@ -792,24 +796,24 @@ @if (!empty($tarifas)) - @foreach ($tarifas as $tarifa) - - - @if ($tarifa->visible == 'activo') -
- @else -
- @endif - - {{ $tarifa->rol->nombre ?? '' }} - {{ number_format($tarifa->precio) ?? 0 }} - {{ number_format($tarifa->utilidad) ?? 0 }} - - - - - @endforeach + @foreach ($tarifas as $tarifa) + + + @if ($tarifa->visible == 'activo') +
+ @else +
+ @endif + + {{ $tarifa->rol->nombre ?? '' }} + {{ number_format($tarifa->precio) ?? 0 }} + {{ number_format($tarifa->utilidad) ?? 0 }} + + + + + @endforeach @endif @@ -834,48 +838,48 @@
@if ($informacionTarifaRol) -
- -
-
- - -
-
- - -
-
- - -
+
+ +
+
+ +
- -
-
- - -
-
- - - -
+
+ + +
+
+ +
+ +
+
+ + +
+
+ + + +
+
+
@endif @@ -901,4 +905,4 @@ input.value = formattedValue; } -
+
\ No newline at end of file