{{-- Open — one employee, a tab per concern. Obvizio's user edit page, over Worklance data (see Admin\UserProfileController). Each tab saves on its own. --}} @extends('layouts.app') @php $initials = collect(preg_split('/\s+/', trim($user->name))) ->filter()->take(2)->map(fn ($p) => mb_strtoupper(mb_substr($p, 0, 1)))->implode(''); $inactive = $user->status === \App\Support\EmployeeStatus::INACTIVE; $lastSeen = $activity['last_seen']; $presence = 'bg-secondary'; if ($lastSeen) { $mins = $lastSeen->diffInMinutes(now()); $presence = $mins <= 15 ? 'bg-green' : ($mins <= 60 ? 'bg-yellow' : 'bg-secondary'); } $role = $user->roles->first(); // key => [label, Tabler icon, accent, applies to this person] $tabs = [ 'overview' => ['Overview', 'ti-home', 'var(--tblr-primary)', true], 'profile' => ['Profile', 'ti-user', 'var(--tblr-azure)', true], 'placement' => ['Placement', 'ti-briefcase', 'var(--tblr-indigo)', true], 'teams' => ['Teams', 'ti-users-group', 'var(--tblr-purple)', true], 'access' => ['Access', 'ti-lock', 'var(--tblr-orange)', true], 'schedule' => ['Schedule', 'ti-calendar-time', 'var(--tblr-teal)', true], 'activity' => ['Activity', 'ti-activity', 'var(--tblr-lime)', true], ]; @endphp @section('header')