@extends('layouts.app') @section('header')
Administration

Users

Company: {{ $activeCompany?->name ?? 'None' }}
{{-- Its own GET form so it can't submit any of the modals on this page. `tab` rides along because the tab links are fragments and never touch the query string. --}}
{{-- Workspace is a per-company add-on; without it there is nothing to sync. --}} @if ($workspaceEnabled)
@csrf
@endif
@endsection @section('content') {{-- Workspace and native accounts are separate tabs (Obvizio's users pattern): they're managed differently, so the old "Source" column is gone — the active tab already says which kind you're looking at. --}}
@if ($showWorkspaceTab && ! $workspaceEnabled) {{-- One wrapper child: Tabler's .alert is a flex row, so loose inline nodes would each become their own column. --}} @endif
@if ($showWorkspaceTab)
@include('admin.users._table', ['rows' => $workspaceUsers, 'kind' => 'workspace'])
@endif
@include('admin.users._table', ['rows' => $nativeUsers, 'kind' => 'native'])
{{-- Edit modals — rendered OUTSIDE the table (a modal isn't valid markup inside ; the browser would foster-parent it and break layout). --}} @foreach ($users as $user) @php $ukey = "user-edit-{$user->id}"; $uErr = old('form_key') === $ukey; @endphp @endforeach {{-- Create modal --}} @php $ucErr = old('form_key') === 'user-create'; @endphp @include('admin.partials.modal-form-ux') {{-- ── Tasks diagnostic ────────────────────────────────────────────────────── Side-by-side: what this employee's desktop was last handed vs what the workspace has right now. Read-only. --}} {{-- Keep the chosen tab in the URL so a reload / back-button (and the redirect after create-edit-delete) lands on the same list. --}} @endsection @push('styles') @endpush @push('scripts') @endpush