@extends('layouts.finance') @section('title', 'Page Access') @section('subtitle', 'Control which pages each user can access') @push('styles') @endpush @section('content')

Page Access

{{-- ── User selector ──────────────────────────────────────────── --}}
@if($users->isEmpty())

No non-admin users exist yet. Invite a user first.

@endif
{{-- ── Permission checkboxes (shown only when a user is selected) ── --}} @if($selectedUser)
@csrf @method('PUT') {{-- Group items by section for a clear visual layout --}} @php $sections = collect($navItems)->groupBy('section'); @endphp

Checked pages are accessible by {{ $selectedUser->name }}. Admin users automatically bypass all page restrictions and do not appear here.

@foreach($sections as $sectionName => $items)
@foreach($items as $item) @endforeach
@endforeach
Clear Selection Changes take effect immediately on next page load.
@else

Select a user above to manage their page access.

@endif
@endsection