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>
61 lines
3.7 KiB
PHP
61 lines
3.7 KiB
PHP
<x-app-layout title="Modules · Settings">
|
|
<x-settings.page title="Specialty modules" description="Activate specialty practice surfaces for {{ $organization->name }}. Departments and queues are provisioned per branch; deactivating hides UI without deleting clinical history.">
|
|
<p class="text-sm">
|
|
<a href="{{ route('care.settings') }}" class="font-medium text-indigo-600 hover:text-indigo-800">← Facility settings</a>
|
|
</p>
|
|
|
|
@if (session('success'))
|
|
<p class="rounded-lg bg-emerald-50 px-3 py-2 text-sm text-emerald-800">{{ session('success') }}</p>
|
|
@endif
|
|
@if (session('error'))
|
|
<p class="rounded-lg bg-rose-50 px-3 py-2 text-sm text-rose-800">{{ session('error') }}</p>
|
|
@endif
|
|
|
|
@if (! $canUseSpecialtyModules)
|
|
<x-settings.card title="Pro feature" description="Specialty modules require Care Pro or Enterprise.">
|
|
<p class="text-sm text-slate-600">Unlock specialty practice pages with matching departments and queue stubs. Emergency and Blood Bank are included by default on Pro and Enterprise.</p>
|
|
<a href="{{ route('care.pro.index') }}" class="btn-primary mt-4 inline-flex text-sm">View plans</a>
|
|
</x-settings.card>
|
|
@else
|
|
<form method="POST" action="{{ route('care.settings.modules.update') }}" class="space-y-6">
|
|
@csrf
|
|
@method('PUT')
|
|
|
|
<div class="grid gap-4 sm:grid-cols-2 lg:grid-cols-3">
|
|
@foreach ($catalog as $key => $module)
|
|
@php $isDefault = ! empty($module['default_on_paid_plans']); @endphp
|
|
<label class="flex flex-col rounded-2xl border border-slate-200 bg-white p-5 shadow-sm transition {{ $isDefault ? '' : 'cursor-pointer hover:border-indigo-200' }} {{ ! empty($enabled[$key]) || $isDefault ? 'ring-1 ring-indigo-200' : '' }}">
|
|
<div class="flex items-start justify-between gap-3">
|
|
<div>
|
|
<p class="text-sm font-semibold text-slate-900">{{ $module['label'] }}</p>
|
|
<p class="mt-1 text-xs text-slate-500">{{ $module['description'] }}</p>
|
|
@if ($isDefault)
|
|
<p class="mt-2 text-[11px] font-medium uppercase tracking-wide text-indigo-600">Included on Pro / Enterprise</p>
|
|
@endif
|
|
</div>
|
|
<input type="checkbox" name="modules[{{ $key }}]" value="1"
|
|
@checked(old("modules.{$key}", ! empty($enabled[$key]) || $isDefault))
|
|
@disabled(! $canManage || $isDefault)
|
|
class="mt-0.5 rounded border-slate-300">
|
|
@if ($isDefault)
|
|
<input type="hidden" name="modules[{{ $key }}]" value="1">
|
|
@endif
|
|
</div>
|
|
<p class="mt-3 text-[11px] uppercase tracking-wide text-slate-400">
|
|
Dept · {{ $module['department_name'] ?? $module['label'] }}
|
|
· Queue · {{ $module['queue_name'] ?? $module['label'] }}
|
|
</p>
|
|
</label>
|
|
@endforeach
|
|
</div>
|
|
|
|
@if ($canManage)
|
|
<div class="flex justify-end">
|
|
<button type="submit" class="btn-primary">Save modules</button>
|
|
</div>
|
|
@endif
|
|
</form>
|
|
@endif
|
|
</x-settings.page>
|
|
</x-app-layout>
|