{{-- One users table, rendered once per tab. @param \Illuminate\Support\Collection $rows @param string $kind 'workspace' | 'native' — only changes the empty state, since the tab itself already says which kind these are (that's why there's no Source column any more). --}}
@forelse ($rows as $user) @empty @endforelse
Name Email Role Access Total Activity
{{-- `form=` rather than wrapping the table: each row's actions cell already contains a delete
, and nested forms are invalid HTML (the browser drops the inner one). This binds the box to the footer form sitting outside the table. --}}
{{ $user->name }} {{-- Only reachable via the All / Inactive filter, so the badge is the whole reason the row is visible. --}} @if ($user->status === \App\Support\EmployeeStatus::INACTIVE) Inactive @endif {{ $user->email }} {{ $user->roles->first()?->label ?? $user->roles->first()?->name ?? '—' }} @if ($user->isSuperAdmin()) Super Admin @elseif ($user->is_admin) Admin @else Desktop @endif @php $totalSec = (int) ($user->time_intervals_sum_active_seconds ?? 0); @endphp {{ \App\Support\Duration::hhmm($totalSec) }} @if ($kind === 'workspace') {{-- Diagnosis: what is this employee's desktop showing, and has the workspace moved on since it synced? --}} {{-- Opened declaratively (data-bs-toggle) like every other modal here: Tabler's bundle exposes no `bootstrap` global, so the JS API isn't available. --}} @endif
@if ($kind === 'workspace') No workspace users mirrored into this company yet — use “Sync Workspace Users”. @else No native users in this company yet — create one with “New User”. @endif
@if ($rows->isNotEmpty()) {{-- The target of every checkbox above (see the `form=` note there). One button for the whole tab rather than a Send Invite per row: people are onboarded a team at a time. --}} @endif