From c3e1e4061e65584510048e9d6d3e555f31bc1fc0 Mon Sep 17 00:00:00 2001 From: ivan-sim Date: Thu, 11 Jul 2024 08:50:50 +0700 Subject: [PATCH] Update --- .../Http/Controllers/Api/LivechatController.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Modules/Internal/Http/Controllers/Api/LivechatController.php b/Modules/Internal/Http/Controllers/Api/LivechatController.php index 023a3ca1..d26e1e28 100755 --- a/Modules/Internal/Http/Controllers/Api/LivechatController.php +++ b/Modules/Internal/Http/Controllers/Api/LivechatController.php @@ -77,7 +77,7 @@ class LivechatController extends Controller }) ->orderBy('nID', 'desc') ->get(['nID', 'nIDUser', 'nIDDokter', 'nIDHealthCare', 'nIDAppointment', 'sStatus', 'sMediaDokter', 'sMedia', 'dCreateOn']); - + $headers = [ ['value' => 'No', 'cell' => 'A1', 'mergeCell' => true, 'mergeToCell' => 'A2'], ['value' => 'Kode TC', 'cell' => 'B1', 'mergeCell' => true, 'mergeToCell' => 'B2'], @@ -120,18 +120,18 @@ class LivechatController extends Controller $nIDUser = $liveChat->user->nIDUser ?? 0; // Principal or Dependent $paymentMethod = $liveChat->appointment ? Helper::sPaymentMethod($liveChat->appointment->sPaymentMethod) : 'N/A'; $fullNameDoctor = '-'; - if ($liveChat->doctor->user !== null) { + if (!empty($liveChat->doctor->user)) { $fullNameDoctor = ''; - + if ($liveChat->doctor->user->detail !== null) { if ($liveChat->doctor->user->detail->sTitlePrefix !== null) { $fullNameDoctor .= $liveChat->doctor->user->detail->sTitlePrefix . '. '; } - + if ($liveChat->doctor->user->full_name !== null) { $fullNameDoctor .= $liveChat->doctor->user->full_name . ' '; } - + if ($liveChat->doctor->user->detail->sTitleSuffix !== null) { $fullNameDoctor .= $liveChat->doctor->user->detail->sTitleSuffix; } @@ -141,7 +141,7 @@ class LivechatController extends Controller $recordType = 'P'; if ($nIDUser){ $recordType = 'D'; - } + } switch ($status) { case 0: $statusLivechat = "Request TC";