Make admin Patients, Appointments, Inventory, Billing, and Reports data-driven.
Deploy Ladill Care / deploy (push) Successful in 44s
Deploy Ladill Care / deploy (push) Successful in 44s
Facility admins see analytics overviews instead of operational directories; floor roles keep list UIs, with optional ?view=list for admins who need records. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -10,6 +10,7 @@ use App\Models\Department;
|
||||
use App\Models\Organization;
|
||||
use App\Models\Patient;
|
||||
use App\Models\Practitioner;
|
||||
use App\Services\Care\AdminOverviewService;
|
||||
use App\Services\Care\AppointmentService;
|
||||
use App\Services\Care\CareFeatures;
|
||||
use App\Services\Care\CarePermissions;
|
||||
@@ -27,6 +28,7 @@ class AppointmentController extends Controller
|
||||
|
||||
public function __construct(
|
||||
protected AppointmentService $appointments,
|
||||
protected AdminOverviewService $adminOverview,
|
||||
) {}
|
||||
|
||||
public function index(Request $request): View
|
||||
@@ -37,6 +39,20 @@ class AppointmentController extends Controller
|
||||
$resolver = app(OrganizationResolver::class);
|
||||
$branchScope = $resolver->branchScope($member);
|
||||
$practitionerScope = $resolver->practitionerScope($organization, $member);
|
||||
$permissions = app(CarePermissions::class);
|
||||
|
||||
if ($permissions->isAdmin($member) && $request->query('view') !== 'list') {
|
||||
return view('care.admin.analytics', [
|
||||
'title' => 'Appointments',
|
||||
'badge' => 'Analytics · Throughput',
|
||||
'description' => 'Scheduling, waiting, and completion rates across the facility.',
|
||||
'adminOverview' => $this->adminOverview->appointments(
|
||||
$organization,
|
||||
$this->ownerRef($request),
|
||||
$branchScope,
|
||||
),
|
||||
]);
|
||||
}
|
||||
|
||||
$filters = $request->only(['status', 'practitioner_id', 'date', 'patient_id']);
|
||||
if ($practitionerScope !== null) {
|
||||
|
||||
Reference in New Issue
Block a user