From f44ffecb62008e161b46a29f39cafdbe8c195a86 Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Mon, 1 Jun 2026 11:41:58 +0530 Subject: [PATCH] Added logic in create visitor page --- .../VisitorEntryResource/Pages/CreateVisitorEntry.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Filament/Resources/VisitorEntryResource/Pages/CreateVisitorEntry.php b/app/Filament/Resources/VisitorEntryResource/Pages/CreateVisitorEntry.php index 2a81930..e274daf 100644 --- a/app/Filament/Resources/VisitorEntryResource/Pages/CreateVisitorEntry.php +++ b/app/Filament/Resources/VisitorEntryResource/Pages/CreateVisitorEntry.php @@ -26,6 +26,7 @@ class CreateVisitorEntry extends CreateRecord $employee = EmployeeMaster::where('id', $visitor->employee_master_id)->first(); $this->form->fill([ + 'register_id' => $visitor->register_id ?? '', 'mobile_number' => $mobile ?? '', 'name' => $visitor->name ?? '', 'company' => $visitor->company ?? '', @@ -37,7 +38,10 @@ class CreateVisitorEntry extends CreateRecord } else { + $registerId = $this->form->getState()['register_id'] ?? ''; + $this->form->fill([ + 'register_id' => $registerId ?? '', 'mobile_number' => $mobile ?? '', 'name' => $visitor->name ?? '', 'company' => $visitor->company ?? '',