update data
This commit is contained in:
@@ -18,14 +18,16 @@ class LivechatResource extends JsonResource
|
||||
{
|
||||
$livechat = [
|
||||
'id' => $this->nID,
|
||||
'doctor_name' => isset($this->doctor->user->sFirstName) ? $this->doctor->user->sFirstName . ' ' . $this->doctor->user->sLastName : null,
|
||||
'doctor_name' => isset($this->doctor->user->sFirstName) ? $this->doctor->user->detail->sTitlePrefix . ' ' . $this->doctor->user->sFirstName . ' ' . $this->doctor->user->sLastName . ' ' . $this->doctor->user->detail->sTitleSuffix : null,
|
||||
'pasien_name' => isset($this->user->sFirstName) ? $this->user->sFirstName . ' ' . $this->user->sLastName : null,
|
||||
'pasien_phone' => isset($this->user->sPhone) ? $this->user->sPhone : '-',
|
||||
'pasien_email' => isset($this->user->sEmail) ? $this->user->sEmail : '-',
|
||||
'speciality' => $this->doctor->speciality->sKeterangan ?? null,
|
||||
'health_care' => $this->healthCare->sHealthCare ?? null,
|
||||
'date_appointment' => Carbon::parse($this->appointment->appointmentDetail->dTanggalAppointment)->format('d-m-Y')
|
||||
. ' ' . $this->appointment->appointmentDetail->tTimeAppointment ?? null,
|
||||
'date_appointment' => $this->appointment !== null ?
|
||||
Carbon::parse($this->appointment->appointmentDetail->dTanggalAppointment)->format('d-m-Y')
|
||||
. ' ' . $this->appointment->appointmentDetail->tTimeAppointment :
|
||||
null,
|
||||
'status_appointment' => $this->appointment->paymentStatus ?? null,
|
||||
'date_created' => Carbon::parse($this->dRequestTime)->format('d-m-Y') ?? null,
|
||||
'time_request' => Carbon::parse($this->dRequestTime)->format('H:i:s') ?? null,
|
||||
@@ -51,7 +53,8 @@ class LivechatResource extends JsonResource
|
||||
$livechat['duration'] = $data_duration;
|
||||
|
||||
$payment_detail = null;
|
||||
if ($this->appointment->appointmentDetail->sPaymentDetails != null) {
|
||||
|
||||
if ($this->appointment !== null && $this->appointment->appointmentDetail->sPaymentDetails !== null) {
|
||||
$payment_detail = [
|
||||
'payment_type' => $this->appointment->appointmentDetail->sPaymentDetails['payment_type'],
|
||||
'transaction_time' => $this->appointment->appointmentDetail->sPaymentDetails['transaction_time'],
|
||||
|
||||
Reference in New Issue
Block a user