Update show-usuarios.blade.php
This commit is contained in:
@@ -87,15 +87,38 @@
|
||||
</x-slot>
|
||||
<x-slot name="tbody">
|
||||
@foreach ($usuarios as $usuario)
|
||||
<tr wire:key="usuario-{{ $usuario->id }}" class="border-gray-200 text-left hover:bg-purple-50 transition-colors" x-data="{ openOption: false }">
|
||||
<tr wire:key="usuario-{{ $usuario->id }}" class="border-gray-200 text-left hover:bg-purple-50 transition-colors" x-data="{ openOption: false, openDetails: false }">
|
||||
@if (auth()->user()->rol_id == 5)
|
||||
|
||||
<td>{{ $usuario->subvendedor_relacion->name ?? 'N/A' }}</td>
|
||||
@endif
|
||||
<td>
|
||||
<div>
|
||||
<p class="font-medium text-gray-700">{{ $usuario->name ?? '' }}</p>
|
||||
<p class="text-xs text-gray-400 md:hidden">{{ $usuario->email ?? '' }}</p>
|
||||
<div class="flex items-center gap-1.5">
|
||||
<button @click="openDetails = !openDetails"
|
||||
class="md:hidden flex-shrink-0 w-5 h-5 rounded-full bg-purple-100 text-purple-700 text-xs font-bold flex items-center justify-center hover:bg-purple-200 transition-colors"
|
||||
x-text="openDetails ? '\u2212' : '+'">
|
||||
</button>
|
||||
<p class="font-medium text-gray-700">{{ $usuario->name ?? '' }}</p>
|
||||
</div>
|
||||
<div x-show="openDetails" x-cloak class="md:hidden mt-2 text-left border-t border-purple-100 pt-2 space-y-1">
|
||||
<div class="flex items-start gap-2">
|
||||
<span class="text-gray-400 text-xs w-16 shrink-0">Email</span>
|
||||
<span class="text-gray-600 text-xs break-all">{{ $usuario->email ?? '' }}</span>
|
||||
</div>
|
||||
<div class="flex items-center gap-2">
|
||||
<span class="text-gray-400 text-xs w-16 shrink-0">Ventas</span>
|
||||
<span class="text-gray-600 text-xs">{{ $usuario->historiales_venta_count ?? 0 }}</span>
|
||||
</div>
|
||||
<div class="flex items-center gap-2">
|
||||
<span class="text-gray-400 text-xs w-16 shrink-0">Tarifas</span>
|
||||
<span class="text-gray-600 text-xs font-semibold">{{ $usuario->countActiveTarifas() ?? 0 }}</span>
|
||||
</div>
|
||||
<div class="flex items-center gap-2">
|
||||
<span class="text-gray-400 text-xs w-16 shrink-0">Promos</span>
|
||||
<span class="text-gray-600 text-xs font-semibold">{{ $usuario->countActivePromos() ?? 0 }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="hidden md:table-cell">{{ $usuario->email ?? '' }}</td>
|
||||
|
||||
Reference in New Issue
Block a user