@extends('hms.layout') @section('title','Staff') @section('content')

Manage staff login accounts and practitioner specialties. Organisation administrators can configure roles and permissions and staff structure and heads. Employee records and addresses are managed separately.

Team members

@forelse($members as $member) @empty@endforelse
NameEmailJob / access rolesAssignmentAccount
{{ $member->user?->name }}
@if($employeesByMember->has($member->id)) Employee record / address @elseAdd employment record / address@endif
{{ $member->user?->email }}{{ ucwords(str_replace('_',' ',$member->role)) }}@if($member->custom_access)
Custom: {{ $member->roles->where('organization_id',$member->organization_id)->pluck('name')->join(', ') ?: 'No permissions' }}@endif
@if(!in_array($member->role,['admin','organization_manager'],true))
@csrf @method('PATCH')
@else Organization-wide @endif
@if((bool)auth()->user()->is_platform_admin || \App\Models\Hms\Membership::where('organization_id',$member->organization_id)->where('user_id',auth()->id())->where('role','admin')->exists()) @if($member->user && $member->user_id!==auth()->id() && ($member->role!=='admin' || (bool)auth()->user()->is_platform_admin) && !(bool)$member->user->is_platform_admin)
@csrf
@endif @endif
No staff assigned.
{{ $members->links() }}
@if(auth()->user()->is_platform_admin || \App\Models\Hms\Membership::where('organization_id',session('hms_organization_id'))->where('user_id',auth()->id())->where('role','admin')->exists())

Add staff

A new account is created. A new staff member receives an email inviting them to set their password.

@csrf @if($employee)
Creating a login linked to employee {{ $employee->employee_number }} ยท {{ $employee->name }}.
@endif

Select one or more roles created by your organisation administrator. Only their selected permissions apply; job and facility restrictions still apply.

@if($accessRoles->isEmpty())

No organisation roles yet. Create a role or use standard job permissions.

@endif
@include('hms.partials.address-fields',['addressRecord'=>$employee])
@endif
@endsection