|
@@ -369,7 +369,19 @@ class PatientController extends Controller
|
|
|
}
|
|
|
|
|
|
public function calendar(Request $request, Client $patient, Appointment $currentAppointment) {
|
|
|
- return view('app.patient.appointment-calendar', compact('patient', 'currentAppointment'));
|
|
|
+ $pros = [];
|
|
|
+
|
|
|
+ if($this->pro && $this->pro->pro_type != 'ADMIN') {
|
|
|
+ $accessiblePros = ProProAccess::where('owner_pro_id', $this->pro->id);
|
|
|
+ $accessibleProIds = [];
|
|
|
+ foreach($accessiblePros as $accessiblePro){
|
|
|
+ $accessibleProIds[] = $accessiblePro->id;
|
|
|
+ }
|
|
|
+ $accessibleProIds[] = $this->pro->id;
|
|
|
+ $pros = Pro::whereIn('id', $accessibleProIds)->get();
|
|
|
+ }
|
|
|
+
|
|
|
+ return view('app.patient.appointment-calendar', compact('pros', 'patient', 'currentAppointment'));
|
|
|
}
|
|
|
|
|
|
public function programs(Request $request, Client $patient, $filter = '') {
|