@php
$appRef = 'APP-' . str_pad($application->id, 5, '0', STR_PAD_LEFT);
$name = match($recipientType) {
'admin' => 'Administrator',
'reviewer' => 'Reviewer',
default => $application->user->name,
};
$dashUrl = match($recipientType) {
'admin' => url('/admin/dashboard'),
'reviewer' => url('/reviewer/dashboard'),
default => url('/applicant/dashboard'),
};
$badgeConfig = [
'submitted' => ['bg' => '#fef3c7', 'color' => '#92400e', 'label' => 'Pending Review'],
'reviewed' => ['bg' => '#dbeafe', 'color' => '#1e40af', 'label' => 'Reviewed'],
'approved' => ['bg' => '#d1fae5', 'color' => '#065f46', 'label' => 'Approved'],
'rejected' => ['bg' => '#fee2e2', 'color' => '#991b1b', 'label' => 'Rejected'],
'invoice_generated' => ['bg' => '#ede9fe', 'color' => '#5b21b6', 'label' => 'Invoice Generated'],
'payment_uploaded' => ['bg' => '#d1fae5', 'color' => '#065f46', 'label' => 'Payment Uploaded'],
];
$badge = $badgeConfig[$event] ?? ['bg' => '#f3f4f6', 'color' => '#1f2937', 'label' => ucfirst($event)];
@endphp
Dear {{ $name }},
{{-- Event-specific messages --}}
@if($event === 'submitted')
@if($recipientType === 'applicant')
Your local fish license application has been successfully submitted and is now pending review.
Our team will assess your application and notify you of any updates.
@else
A new local fish license application has been submitted and requires your attention.
Please log in to review the application details.
@endif
@elseif($event === 'reviewed')
@if($recipientType === 'applicant')
Your local fish license application has been reviewed by a reviewer.
An invoice will be generated and sent to you within 5 working days. Please check your dashboard for updates.
@else
A license application has been marked as reviewed.
An invoice should now be generated for the applicant.
@endif
@elseif($event === 'approved')
@if($recipientType === 'applicant')
Congratulations! Your local fish license application has been approved and your license has been issued.
Please log in to view and download your license.
@else
A license application has been approved and a license has been issued to the applicant.
@endif
@elseif($event === 'rejected')
@if($recipientType === 'applicant')
We regret to inform you that your local fish license application has been rejected.
Please log in to view the reason and reapply if applicable.
@else
A license application has been rejected. The applicant has been notified.
@endif
@elseif($event === 'invoice_generated')
@if($recipientType === 'applicant')
An invoice has been generated for your license application. Please log in to view the invoice details and arrange payment.
Once payment is made, upload your proof of payment through the dashboard.
@else
An invoice has been generated for the following application. The applicant has been notified to make payment.
@endif
@elseif($event === 'payment_uploaded')
@if($recipientType === 'applicant')
Your proof of payment has been successfully uploaded.
The admin will review and finalize your application. You will be notified once your license is issued.
@else
The applicant has uploaded proof of payment for the following application.
Please log in to verify the payment and issue the license.
@endif
@endif
{{ $badge['label'] }}
{{-- Application Details --}}
| Application Ref | {{ $appRef }} |
| License Type | {{ $application->license_type }} |
| Business Name | {{ $application->business_name }} |
| Applicant Name | {{ $application->user->name }} |
| Applicant Email | {{ $application->user->email }} |
@if($event === 'invoice_generated' && $invoice)
| Invoice Number | {{ $invoice->invoice_number }} |
| Total Amount | AUD ${{ number_format($invoice->total_amount, 2) }} |
| Due Date | {{ $invoice->due_date ? \Carbon\Carbon::parse($invoice->due_date)->format('d M Y') : \Carbon\Carbon::parse($invoice->created_at)->addWeek()->format('d M Y') }} |
@endif
| Updated At | {{ now()->format('d M Y, h:i A') }} |
View Dashboard →
This is an automated notification from the Kiribati Local Fish Licensing System.
Please do not reply to this email.