Fix Rating
This commit is contained in:
@@ -15,17 +15,18 @@ class PractitionerRoleToDoctorResource extends JsonResource
|
||||
*/
|
||||
public function toArray($request)
|
||||
{
|
||||
$organization = [
|
||||
'id' => $this->organization->id,
|
||||
'name' => $this->organization->name,
|
||||
'code' => $this->organization->code,
|
||||
'description' => $this->organization->description,
|
||||
'address' => $this->organization->currentAddress->text ?? null,
|
||||
'lat' => $this->organization->currentAddress->lat ?? null,
|
||||
'lng' => $this->organization->currentAddress->lng ?? null,
|
||||
'distance' => '200 m',
|
||||
'city_name' => 'Kota Tangerang',
|
||||
];
|
||||
// $organization = [
|
||||
// 'id' => $this->organization->id,
|
||||
// 'name' => $this->organization->name,
|
||||
// 'code' => $this->organization->code,
|
||||
// 'description' => $this->organization->description,
|
||||
// 'address' => $this->organization->currentAddress->text ?? null,
|
||||
// 'lat' => $this->organization->currentAddress->lat ?? null,
|
||||
// 'lng' => $this->organization->currentAddress->lng ?? null,
|
||||
// 'distance' => '200 m',
|
||||
// 'city_name' => 'Kota Tangerang',
|
||||
// ];
|
||||
$organization = HospitalResource::make($this->organization);
|
||||
|
||||
$speciality = $this->speciality ? [
|
||||
'id' => $this->speciality->id ?? null,
|
||||
@@ -51,7 +52,7 @@ class PractitionerRoleToDoctorResource extends JsonResource
|
||||
'avatar_url' => asset('images/default-doctor-avatar.png'),
|
||||
'hospital' => $organization,
|
||||
'speciality' => $speciality,
|
||||
'rating' => rand(350, 500) / 10,
|
||||
'rating' => rand(350, 500) / 100,
|
||||
|
||||
'is_chat_available' => $this->is_chat_available,
|
||||
'is_video_available' => $this->is_video_available,
|
||||
|
||||
Reference in New Issue
Block a user