diff --git a/app/Mail/VisitorOutMail.php b/app/Mail/VisitorOutMail.php index 458b9bb..edf1c4a 100644 --- a/app/Mail/VisitorOutMail.php +++ b/app/Mail/VisitorOutMail.php @@ -30,7 +30,10 @@ class VisitorOutMail extends Mailable public function envelope(): Envelope { return new Envelope( - subject: 'Visitor Out Notification', + // subject: 'Visitor Out Notification', + subject: $this->entry->type === 'InterUnitStaff' + ? 'Employee Out Notification' + : 'Visitor Out Notification', ); } diff --git a/resources/views/mail/visitor-out.blade.php b/resources/views/mail/visitor-out.blade.php index 536a8a1..eb9cff1 100644 --- a/resources/views/mail/visitor-out.blade.php +++ b/resources/views/mail/visitor-out.blade.php @@ -15,8 +15,14 @@
- A visitor has checked out. Please find the details below: + A {{ $entry->type === 'InterUnitStaff' ? 'Employee' : 'Visitor' }} has checked out. Please find the details below:
| + {{-- | Visitor Name + | --}} ++ {{ $entry->type === 'InterUnitStaff' ? 'Employee Name' : 'Visitor Name' }} | {{ $entry?->name ?? '-' }} @@ -55,8 +64,11 @@ |
| + {{-- | Company + | --}} ++ {{ $entry->type === 'InterUnitStaff' ? 'Unit' : 'Company' }} | {{ $entry?->company ?? '-' }} |