@php
$permissions = match($user->role) {
'admin' => [
'User Management' => 'Full access to create, edit, and delete users',
'System Settings' => 'Can modify system-wide configurations',
'Data Access' => 'Access to all data and reports',
'Notification Management' => 'Can configure system notifications',
'Field Management' => 'Full access to all field operations'
],
'manager' => [
'User Management' => 'Can create and edit users (except admins)',
'Data Access' => 'Access to all operational data',
'Field Management' => 'Can manage field operations and assignments',
'Reports' => 'Access to all reports and analytics'
],
'worker' => [
'Field Updates' => 'Can update field data and conditions',
'Task Management' => 'Can view and update assigned tasks',
'Data Entry' => 'Can enter field observations and measurements',
'Notifications' => 'Receives relevant field alerts'
],
'user' => [
'View Data' => 'Can view public field data and reports',
'Notifications' => 'Receives general notifications',
'Profile Management' => 'Can update own profile and preferences'
],
default => []
};
@endphp
@foreach($permissions as $permission => $description)
{{ $permission }}
{{ $description }}
@endforeach