@php $recipientType = $recipient->id === $applicant->id ? 'applicant' : ($recipient->id === ($staff->id ?? null) ? 'staff' : 'creator'); $applicant_name = $applicant->firstname . ' ' . $applicant->lastname; $staff_name = $staff ? $staff->firstname . ' ' . $staff->lastname : 'N/A'; $creator_name = $creator ? $creator->firstname . ' ' . $creator->lastname : 'N/A'; $message = match($recipientType) { 'applicant' => "Your offer has been completed and your status is now Hired. Please contact HR for onboarding.", 'staff' => "Thank you! The applicant has been marked as Hired. Onboarding can now begin.", default => "Your offer has passed all signatures. The applicant is now Hired.", }; @endphp

Job Offer Fully Signed

Dear {{ $recipient->firstname }},

The job offer #{{ $offer->offer_number }} for {{ $offer->position_title }} has now been fully signed and finalized.

Signing Summary

Applicant
{{ $applicant_name }}
Signed by (Staff)
{{ $staff_name }}
Created by
{{ $creator_name }}

{!! $message !!}