Expand specialty modules; pin Emergency and Blood Bank on Pro.
Deploy Ladill Care / deploy (push) Successful in 1m37s

Add Cardiology through Child Welfare to the specialty catalog, keep Emergency and Blood Bank always enabled on Pro/Enterprise sidebars, and generate matching demo specialty doctors.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-18 09:27:05 +00:00
co-authored by Cursor
parent f87f216fb4
commit e9a76fec80
9 changed files with 524 additions and 140 deletions
@@ -21,6 +21,11 @@ class SettingsModulesController extends Controller
$member = $this->member($request);
$canManage = app(\App\Services\Care\CarePermissions::class)->can($member, 'settings.manage');
if ($modules->canManage($organization)) {
$modules->ensureDefaultModulesProvisioned($organization, $this->ownerRef($request));
$organization->refresh();
}
return view('care.settings.modules', [
'organization' => $organization,
'canManage' => $canManage,
@@ -46,9 +51,13 @@ class SettingsModulesController extends Controller
$desired = [];
foreach ($keys as $key) {
$desired[$key] = $request->boolean("modules.{$key}");
if ($modules->isDefaultOnPaidPlans($key)) {
$desired[$key] = true;
}
}
$result = $modules->sync($organization, $this->ownerRef($request), $desired);
$modules->ensureDefaultModulesProvisioned($organization, $this->ownerRef($request));
$result = $modules->sync($organization->fresh(), $this->ownerRef($request), $desired);
if ($result['errors'] !== []) {
return back()->with('error', 'Some modules could not be updated: '.implode(' ', $result['errors']));