bugs fix livechat
This commit is contained in:
@@ -48,6 +48,7 @@ class LivechatResource extends JsonResource
|
||||
$specialist = 'Umum';
|
||||
$year = 0;
|
||||
$price = 0;
|
||||
$organizationId = 0;
|
||||
if (!empty($doctor['person']['start_date_work'])) {
|
||||
$starExperience = Carbon::parse($doctor['person']['start_date_work'])->format('Y-m-d');
|
||||
$experience = Carbon::createFromFormat('Y-m-d', $starExperience);
|
||||
@@ -56,15 +57,19 @@ class LivechatResource extends JsonResource
|
||||
if ($doctor['practitioner_roles']) {
|
||||
if ($doctor['practitioner_roles'][0]['speciality']){
|
||||
$specialist = $doctor['practitioner_roles'][0]['speciality']['name'];
|
||||
}
|
||||
}
|
||||
if ($doctor['practitioner_roles'][0]['price']){
|
||||
$price = $doctor['practitioner_roles'][0]['price'];
|
||||
}
|
||||
}
|
||||
if ($doctor['practitioner_roles'][0]['organization_id']){
|
||||
$organizationId = $doctor['practitioner_roles'][0]['organization_id'];
|
||||
}
|
||||
}
|
||||
$data = [
|
||||
'id' => $doctor['id'],
|
||||
'id' => $doctor['person']['id'],
|
||||
'full_name' => $doctor['person']['name'],
|
||||
'specialist' => $specialist,
|
||||
'organization_id' => $organizationId,
|
||||
'experience' => $year,
|
||||
'review' => $doctor['person']['review'],
|
||||
'price' => $price,
|
||||
@@ -76,7 +81,7 @@ class LivechatResource extends JsonResource
|
||||
return [
|
||||
'jadwal_weekday' => 'Senin - Jumat (08:00 - 17:30)',
|
||||
'jadwal_weekend' => 'Sabtu (08:00 - 12:00)',
|
||||
'doctors_livechat' =>
|
||||
'doctors_livechat' =>
|
||||
$doctorsLivechat
|
||||
,
|
||||
'specialist' => $specialists
|
||||
|
||||
Reference in New Issue
Block a user