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 ?? '',