From 2aae3d2d6dc508b910db5a4124c0a7355ac4ff7e Mon Sep 17 00:00:00 2001 From: Saufi Date: Wed, 20 May 2026 22:18:51 +0800 Subject: [PATCH] update emel dari file --- src/app/Services/ParticipantImportService.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/app/Services/ParticipantImportService.php b/src/app/Services/ParticipantImportService.php index a15bea8..f249a62 100644 --- a/src/app/Services/ParticipantImportService.php +++ b/src/app/Services/ParticipantImportService.php @@ -109,6 +109,15 @@ class ParticipantImportService ] ); + // Kemaskini emel, telefon dan agensi jika peserta sedia ada dan CSV ada data + if (! $participant->wasRecentlyCreated) { + $updates = []; + if (! empty($data['email'])) $updates['email'] = $data['email']; + if (! empty($data['phone'])) $updates['phone'] = $data['phone']; + if (! empty($data['agency'])) $updates['agency'] = $data['agency']; + if ($updates) $participant->update($updates); + } + $pp = $program->programParticipants() ->where('participant_id', $participant->id) ->first();