{{-- Inline form on purpose: a block php directive here would pair with the inline one above and break compilation. --}}
@php($linkedUser = $employee->user ?? null)
Admin panel login
Gives this employee their own sign-in. A new login starts in the Employee role — clock in/out, leave
and their own tasks — and reaches the rest of the panel only through the roles it is given.
@if ($linkedUser)
Linked to login {{ $linkedUser->email }}.
Tick below and set a new password to reset it.
@endif
{{-- Which roles the login holds. Only the super admin decides this, so nobody else is shown it. --}}
@if ($canAssignRoles ?? false)
@php($heldRoles = old('roles_submitted') ? old('role_ids', []) : ($linkedUser ? $linkedUser->roles->pluck('id')->all() : $roles->where('slug', 'employee')->pluck('id')->all()))
Roles
Decides which menus this employee sees and which pages they can open. Tick more than one to combine them.
Applies once the employee has a panel login. What each role allows is set under
Roles & Permissions.