Tighten Care free tier and bill Pro/Enterprise per branch.
Deploy Ladill Care / deploy (push) Successful in 29s
Deploy Ladill Care / deploy (push) Successful in 29s
Free keeps core records, appointments, and basic workflows; Pro unlocks lab, pharmacy, billing, and Queue. Both paid tiers bill per branch with unlimited branches. Enterprise adds multi-dept workflows, analytics, AI-assisted healthcare integration, and priority support (not Afia).
This commit is contained in:
@@ -8,6 +8,7 @@ use App\Models\Branch;
|
||||
use App\Services\Care\AppointmentPatientNotifier;
|
||||
use App\Services\Care\AuditLogger;
|
||||
use App\Services\Care\CarePermissions;
|
||||
use App\Services\Care\PlanService;
|
||||
use App\Services\Messaging\MessagingCredentialsService;
|
||||
use App\Services\Queue\QueueClient;
|
||||
use App\Support\OrganizationBranding;
|
||||
@@ -30,10 +31,13 @@ class SettingsController extends Controller
|
||||
->where('organization_id', $organization->id)
|
||||
->count();
|
||||
|
||||
$plans = app(PlanService::class);
|
||||
|
||||
return view('care.settings.edit', [
|
||||
'organization' => $organization,
|
||||
'canManage' => $canManage,
|
||||
'branchCount' => $branchCount,
|
||||
'canUseQueueIntegration' => $plans->canUseQueueIntegration($organization),
|
||||
'messagingSmsReady' => $credential->hasValidSms(),
|
||||
'messagingEmailReady' => $credential->hasValidBird(),
|
||||
'facilityTypes' => [
|
||||
@@ -50,6 +54,7 @@ class SettingsController extends Controller
|
||||
$this->authorizeAbility($request, 'settings.manage');
|
||||
$organization = $this->organization($request);
|
||||
$owner = $this->ownerRef($request);
|
||||
$plans = app(PlanService::class);
|
||||
|
||||
$validated = $request->validate([
|
||||
'name' => ['required', 'string', 'max:255'],
|
||||
@@ -68,7 +73,16 @@ class SettingsController extends Controller
|
||||
$settings['onboarded'] = true;
|
||||
$settings['facility_type'] = $validated['facility_type'];
|
||||
|
||||
// Queue integration is Pro/Enterprise only — free plans cannot enable it.
|
||||
$wantsQueue = $request->boolean('queue_integration_enabled');
|
||||
if ($wantsQueue && ! $plans->canUseQueueIntegration($organization)) {
|
||||
return redirect()
|
||||
->route('care.pro.index')
|
||||
->with('upsell', 'Ladill Queue integration is part of Care Pro. Upgrade to connect service queues and counters.');
|
||||
}
|
||||
if (! $plans->canUseQueueIntegration($organization)) {
|
||||
$wantsQueue = false;
|
||||
}
|
||||
$settings['queue_integration_enabled'] = $wantsQueue;
|
||||
|
||||
$settings[AppointmentPatientNotifier::SETTING_BOOKED_SMS] = $request->boolean('notify_appointment_booked_sms');
|
||||
|
||||
Reference in New Issue
Block a user