From aea402cd4ced7d118006eaadfaa50aced35c7f11 Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Sun, 19 Jul 2026 11:34:30 +0530 Subject: [PATCH] added employee visit logic in out mail --- app/Mail/VisitorOutMail.php | 5 ++++- resources/views/mail/visitor-out.blade.php | 20 ++++++++++++++++---- 2 files changed, 20 insertions(+), 5 deletions(-) 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 @@ -

+ {{--

Visitor Out Notification +

--}} +

+ {{ $entry->type === 'InterUnitStaff' + ? 'Employee Out Notification' + : 'Visitor Out Notification' + }}

@@ -30,15 +36,18 @@

- 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 ?? '-' }} -- 2.49.1