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

{{ $employee?->exists?'Employee: '.$employee->name:'Add employee' }}

HR contact details do not change login credentials or permissions. Inactive or terminated employees lose access through a linked staff account. Use Staff accounts to change a linked system assignment.

@csrf @if($employee?->exists)@method('PUT')@endif
@foreach(['employee_number'=>'Employee number','name'=>'Full name','job_title'=>'Job title'] as $field=>$label)
@endforeach
@foreach(['starts_on'=>'Start date','ends_on'=>'End date'] as $field=>$label)
@endforeach
@if(!$employee?->exists)
@endif @foreach(['email'=>'Contact email','phone'=>'Phone','emergency_contact'=>'Emergency contact'] as $field=>$label)
@endforeach

Private staff address

@include('hms.partials.address-fields',['addressRecord'=>$employee])
Back to employees
@if($canCreateLogin && $employee?->exists && !$employee->membership_id && in_array($employee->status,['active','on_leave'],true))

Create a staff login for this employee (organisation administrators only).

@elseif($employee?->membership_id)

Linked login: {{ $employee->membership?->user?->email }}. @if($canManageStaff)Manage staff account@endif

@endif
@endsection