{{ __('Permission catalog') }}

{{ __('Review a system permission and choose the company roles that receive it. Permission keys and system labels are read-only.') }}

@if(session()->has('message'))
{{ session('message') }}
@endif @if(session()->has('error'))
{{ session('error') }}
@endif
@foreach($permissionGroups as $group => $groupPermissions) @endforeach
@forelse($permissions as $permission) @empty

{{ __('No permissions match this search.') }}

@endforelse
@if($selectedPermission)

{{ __($selectedPermission->name) }}

{{ __('Manage which company roles include this permission.') }}

{{ __('Permission keys and system labels are fixed by the application and cannot be changed here.') }}

@php $visibleRoleIds = $roles->pluck('id')->map(fn ($id) => (int) $id); $allVisibleRolesSelected = $visibleRoleIds->isNotEmpty() && $visibleRoleIds->diff($permissionRoleIds)->isEmpty(); @endphp

{{ __('Company roles') }}

{{ __('Select every role that should include this permission. Save before switching to a different permission.') }}

{{ count($permissionRoleIds) }} / {{ $companyRoleCount }} {{ __('selected') }}
@if($canEditAssignments && $roles->isNotEmpty())
@endif @error('permissionRoleIds')

{{ $message }}

@enderror @error('permissionRoleIds.*')

{{ $message }}

@enderror @if($companyRoleCount === 0)

{{ __('No company roles are available.') }}

@elseif($roles->isEmpty())

{{ __('No company roles match this search.') }}

@else
@foreach($roles as $role) @endforeach
@endif @if($canEditAssignments)
@else

{{ __('You can review role assignments, but editing them requires role edit access.') }}

@endif
@else

{{ __('Select a permission') }}

{{ __('Choose a permission from the list to review its details and role assignments.') }}

@endif