diff --git a/app/Mail/VisitorMail.php b/app/Mail/VisitorMail.php index 5ecab64..d860441 100644 --- a/app/Mail/VisitorMail.php +++ b/app/Mail/VisitorMail.php @@ -29,7 +29,10 @@ class VisitorMail extends Mailable public function envelope(): Envelope { return new Envelope( - subject: 'Visitor Arrival Notification', + // subject: 'Visitor Arrival Notification', + subject: $this->visitor->type === 'InterUnitStaff' + ? 'Employee Arrival Notification' + : 'Visitor Arrival Notification', ); } diff --git a/resources/views/mail/visitor-arrival.blade.php b/resources/views/mail/visitor-arrival.blade.php index 5fce5d0..4bf9c2a 100644 --- a/resources/views/mail/visitor-arrival.blade.php +++ b/resources/views/mail/visitor-arrival.blade.php @@ -7,14 +7,6 @@ - - - - - - Visitor Arrival Notification - - @@ -25,8 +17,14 @@ @@ -40,7 +38,7 @@

- A visitor has arrived and is waiting to meet you. + A {{ $visitor->type === 'InterUnitStaff' ? 'Employee' : 'Visitor' }} has arrived and is waiting to meet you. Please find the details below:

@@ -48,8 +46,11 @@ style="border-collapse:collapse;margin-top:15px;"> - --}} +
-

+ {{--

Visitor Arrival Notification +

--}} +

+ {{ $visitor->type === 'InterUnitStaff' + ? 'Employee Arrival Notification' + : 'Visitor Arrival Notification' + }}

+ {{-- Visitor Name + + {{ $visitor->type === 'InterUnitStaff' ? 'Employee Name' : 'Visitor Name' }} {{ $visitor->name }} @@ -67,7 +68,7 @@
- Company + {{ $visitor->type === 'InterUnitStaff' ? 'Unit' : 'Company' }} {{ $visitor->company }}