@extends('layouts.finance') @section('title', 'Page Access') @section('subtitle', 'Control which pages each user can access') @push('styles') @endpush @section('content') Page Access Manage Users Manage Roles {{-- ── User selector ──────────────────────────────────────────── --}} Select User — choose a user — @foreach($users as $user) id === $user->id ? 'selected' : '' }} > {{ $user->name }} ({{ $user->email }}) @endforeach Load @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) {{ $sectionName }} @foreach($items as $item) {!! $item['icon'] !!} {{ $item['label'] }} {{ $item['permission'] }} @endforeach @endforeach Save Page Access Clear Selection Changes take effect immediately on next page load. @else Select a user above to manage their page access. @endif @endsection
No non-admin users exist yet. Invite a user first.
Checked pages are accessible by {{ $selectedUser->name }}. Admin users automatically bypass all page restrictions and do not appear here.
Select a user above to manage their page access.