{{-- 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). --}}
| Name | Role | Access | Timesheet | Total Activity | |||
|---|---|---|---|---|---|---|---|
| {{-- `form=` rather than wrapping the table: each row's actions cell already contains a delete |
{{ $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
{{-- Mirrored from the workspace; blank for native accounts. --}}
@if ($user->designation || $user->department)
{{ collect([$user->designation, $user->department])->filter()->implode(' · ') }}
@endif
|
{{ $user->email }} | {{ $user->roles->first()?->label ?? $user->roles->first()?->name ?? '—' }} | {{-- Access is the role; this says what it amounts to. --}} @if ($user->isSuperAdmin()) Super Admin @elseif ($user->canUsePortal()) @php $everyone = $user->canAccess(\App\Support\Permissions::VIEW_ALL); @endphp Portal · {{ $everyone ? 'everyone' : ($user->canAccess(\App\Support\Permissions::VIEW_TEAM) ? 'their teams' : 'self') }} @else Desktop @endif | {{-- A switch rather than a badge: it is flicked from the list, and posts on change so there is nothing to save. --}} | @php $totalSec = (int) ($user->time_intervals_sum_active_seconds ?? 0); @endphp {{ \App\Support\Duration::hhmm($totalSec) }} |
Open
@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 | |||||||