@php use App\Models\Employee; $totalEmployees = Employee::count(); $activeEmployees = Employee::where('is_active', true)->count(); $inactiveEmployees = max(0, $totalEmployees - $activeEmployees); $statCards = [ [ 'label' => 'Profesionales', 'value' => $totalEmployees, 'tone' => 'violet', 'icon' => 'M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0z', ], [ 'label' => 'Activos', 'value' => $activeEmployees, 'tone' => 'emerald', 'icon' => 'M9 12.75 11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z', ], [ 'label' => 'Inactivos', 'value' => $inactiveEmployees, 'tone' => 'amber', 'icon' => 'M11.42 15.17 17.25 21A2.652 2.652 0 0021 17.25l-5.877-5.877M11.42 15.17 6.765 20.823a2.548 2.548 0 11-3.586-3.586l6.837-5.63M15.75 15.75l2.625 2.625', ], ]; $toneClasses = [ 'violet' => ['bg' => 'bg-violet-50', 'text' => 'text-violet-600'], 'emerald' => ['bg' => 'bg-emerald-50', 'text' => 'text-emerald-600'], 'amber' => ['bg' => 'bg-amber-50', 'text' => 'text-amber-600'], ]; @endphp
@foreach ($statCards as $stat) @php $tone = $toneClasses[$stat['tone']]; @endphp
$loop->first, ])>

{{ $stat['value'] }}

{{ $stat['label'] }}

@endforeach
@forelse ($employees as $e)
@if ($e->photoUrl()) {{ $e->fullName() }} @else
{{ strtoupper(substr($e->first_name, 0, 1)) }}
@endif

{{ $e->fullName() }}

{{ $e->position ?: 'Profesional' }}

{{ $e->is_active ? 'Activo' : 'Inactivo' }} {{ $e->services->count() }} {{ $e->services->count() === 1 ? 'servicio' : 'servicios' }}

{{ $e->email ?? $e->phone ?? 'Sin contacto registrado' }}

@empty

No hay empleados

Agrega tu primer profesional al equipo.

Añadir empleado
@endforelse
@if ($employees->hasPages())
{{ $employees->links() }}
@endif

Profesional

Editar perfil

¿Eliminar este empleado?

Esta acción quitará al profesional del listado y de sus relaciones actuales.