@extends('layouts.app') @section('title', 'Edit ' . (($locum->worker_type ?? 'locum') === 'volunteer' ? 'Volunteer' : 'Locum') . ' | ' . $locum->full_name) @section('content') @php $isVolunteer = ($locum->worker_type ?? 'locum') === 'volunteer'; @endphp @include('locum.partials.payroll-tabs', ['active' => $isVolunteer ? 'volunteers' : 'register'])
{{-- Convert worker type — separate small form above the main edit form. Can't be inside the edit
because forms cannot be nested. --}}
Currently registered as: {{ $isVolunteer ? 'Volunteer' : 'Paid Locum' }} @if($isVolunteer) No payment is recorded for shifts. Convert to a paid locum to start tracking pay. @else Eligible for shift entries and payroll. Convert to volunteer to stop pay tracking (history preserved). @endif @csrf @method('PUT')
{{-- Convert to Full-Time Staff — goes to a different DB table (staff_records), so we redirect to the HR staff create modal pre-filled. The locum/volunteer record is only deactivated after the user actually saves the new staff record. --}}
Promote to Full-Time: Move this person to the permanent staff register. Their existing details (name, ID, KRA, SHA, NSSF, license, contacts, documents) will be pre-filled on the staff form for review. The {{ $isVolunteer ? 'volunteer' : 'locum' }} record stays active until the new staff record is saved.
@csrf
@csrf @method('PUT')

@if($isVolunteer) Volunteer @else Personal Information @endif

{{ $locum->staff_number }}
@if($isVolunteer) @else @endif
@unless($isVolunteer)

Statutory & Tax

@endunless

Professional License

Emergency Contact

Documents

@if($locum->documents)

Existing

@foreach($locum->documents as $doc)
{{ $doc['name'] ?? 'file' }} · uploaded {{ \Carbon\Carbon::parse($doc['uploaded_at'] ?? now())->format('d M Y') }}
@endforeach
@endif

Existing files are kept; uploads add to the list. Up to 5 MB each.

@unless($isVolunteer)

Payment Details

Enter flat KES amount per shift

@endunless
Cancel
@endsection @section('scripts') @endsection