Make admin Patients, Appointments, Inventory, Billing, and Reports data-driven.
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:
isaacclad
2026-07-18 13:38:55 +00:00
co-authored by Cursor
parent 612e021e85
commit 8e406dc93c
9 changed files with 757 additions and 9 deletions
+14 -3
View File
@@ -5,6 +5,7 @@ namespace App\Http\Controllers\Care;
use App\Http\Controllers\Controller;
use App\Http\Controllers\Care\Concerns\ScopesToAccount;
use App\Models\Branch;
use App\Services\Care\AdminOverviewService;
use App\Services\Care\CareFeatures;
use App\Services\Care\OrganizationResolver;
use App\Services\Care\PlanService;
@@ -20,12 +21,15 @@ class ReportController extends Controller
public function __construct(
protected ReportService $reports,
protected AdminOverviewService $adminOverview,
) {}
public function index(Request $request): View
{
$this->authorizeAbility($request, 'reports.finance.view');
$organization = $this->organization($request);
$member = $this->member($request);
$branchScope = app(OrganizationResolver::class)->branchScope($member);
$branches = Branch::owned($this->ownerRef($request))
->where('organization_id', $organization->id)
@@ -33,10 +37,17 @@ class ReportController extends Controller
->orderBy('name')
->get();
return view('care.reports.index', [
'organization' => $organization,
return view('care.admin.analytics', [
'title' => 'Reports',
'badge' => 'Analytics · Facility performance',
'description' => 'Live operational and financial snapshot. Open a detailed report for date ranges and CSV export.',
'adminOverview' => $this->adminOverview->reportsHub(
$organization,
$this->ownerRef($request),
$branchScope,
),
'catalog' => config('care.report_types'),
'branches' => $branches,
'reports' => config('care.report_types'),
]);
}