Fix Rating
This commit is contained in:
@@ -52,7 +52,7 @@ class DoctorResource extends JsonResource
|
||||
'keilmuan' => $this->meta->keilmuan ?? '',
|
||||
'description' => $this->meta->description ?? '',
|
||||
'practices' => $practices,
|
||||
'rating' => rand(350, 500) / 10,
|
||||
'rating' => rand(350, 500) / 100,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ class HospitalResource extends JsonResource
|
||||
'lng' => $this->currentAddress->lng ?? null,
|
||||
'distance' => isset($this->distance_km) ? round($this->distance_km) . ' km' : null,
|
||||
'city_name' => $this->currentAddress->city->name ?? null,
|
||||
'rating' => rand(350, 500) / 10,
|
||||
'rating' => rand(350, 500) / 100,
|
||||
'phone' => $this->meta->phone,
|
||||
'photo_url' => asset('images/default-hospital-image.png'),
|
||||
'photos' => [
|
||||
|
||||
@@ -35,7 +35,7 @@ class PractitionerRoleToDoctorDetailResource extends JsonResource
|
||||
'work_experience' => $this->meta->work_experience ?? '',
|
||||
'keilmuan' => $this->meta->keilmuan ?? '',
|
||||
'description' => $this->meta->description ?? '',
|
||||
'rating' => rand(350, 500) / 10,
|
||||
'rating' => rand(350, 500) / 100,
|
||||
|
||||
'is_chat_available' => $this->is_chat_available,
|
||||
'is_video_available' => $this->is_video_available,
|
||||
|
||||
@@ -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