|
@@ -12,7 +12,7 @@ use App\Models\Facility;
|
|
use App\Models\Handout;
|
|
use App\Models\Handout;
|
|
use App\Models\NoteTemplate;
|
|
use App\Models\NoteTemplate;
|
|
use App\Models\Pro;
|
|
use App\Models\Pro;
|
|
-use App\Models\Program;
|
|
|
|
|
|
+use App\Models\ProProAccess;
|
|
use App\Models\SectionTemplate;
|
|
use App\Models\SectionTemplate;
|
|
use App\Models\Ticket;
|
|
use App\Models\Ticket;
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Http\Request;
|
|
@@ -302,7 +302,19 @@ class PatientController extends Controller
|
|
}
|
|
}
|
|
|
|
|
|
public function calendar(Request $request, Client $patient, Appointment $currentAppointment) {
|
|
public function calendar(Request $request, Client $patient, Appointment $currentAppointment) {
|
|
- return view('app.patient.appointment-calendar', compact('patient', 'currentAppointment'));
|
|
|
|
|
|
+
|
|
|
|
+ $pros = Pro::all();
|
|
|
|
+ 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 = '') {
|
|
public function programs(Request $request, Client $patient, $filter = '') {
|