@extends('layouts.app') @section('title', $user ? 'Edit User Access' : 'Add User') @section('no-page-header') @section('content')

{{ $user ? 'Edit User Access' : 'Add User' }}

Enter user details, then select the access they need.

Back
@csrf @if($user) @method('PUT') @endif @if($errors->any())
Please correct the highlighted fields.
@endif

User Information

@error('first_name')

{{ $message }}

@enderror
@error('last_name')

{{ $message }}

@enderror
@error('email')

{{ $message }}

@enderror
@error('mobile')

{{ $message }}

@enderror
@error('status_id')

{{ $message }}

@enderror
@error('password')

{{ $message }}

@enderror

Access Permissions

Check only the actions this user is allowed to perform.

Module Permissions

Read controls visibility. Create, Update and Delete control data changes.

@foreach($permissionActions as $action => $actionLabel) @endforeach @foreach($permissionModules as $module => $moduleLabel) @foreach($permissionActions as $action => $actionLabel) @php($permission = $action . '_' . $module) @endforeach @endforeach
Module{{ $actionLabel }}
Dashboard — contains('read_dashboard') || $selectedPermissions->contains('access_dashboard')) class="permission-checkbox h-4 w-4 text-indigo-600 rounded border-gray-300" aria-label="Read Dashboard"> Not applicable
{{ $moduleLabel }} contains($permission)) class="permission-checkbox module-permission h-4 w-4 text-indigo-600 rounded border-gray-300" data-module="{{ $module }}" data-action="{{ $action }}" aria-label="{{ $actionLabel }} {{ $moduleLabel }}">

Report Permissions

@foreach($reportPermissions as $permission => $label) @endforeach
@error('permissions.*')

{{ $message }}

@enderror
Cancel
@endsection @push('scripts') @endpush