Files
ladill-care/resources/views/care/settings/edit.blade.php
T
isaaccladandCursor 015a4cc7fe
Deploy Ladill Care / deploy (push) Successful in 1m45s
Wire Care lists into Ladill Queue workflows instead of reception panels.
When Queue integration is on, role pages issue tickets into their own
department queues and drive Call next → Serve → Complete on the native
lists. Integration off leaves existing UI unchanged.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 16:27:48 +00:00

233 lines
16 KiB
PHP

<x-app-layout title="Settings">
<x-settings.page title="Facility settings" description="Configure facility details, locations, staff access, and messaging for {{ $organization->name }}.">
<form method="POST" action="{{ route('care.settings.update') }}" enctype="multipart/form-data" class="space-y-6">
@csrf @method('PUT')
<x-settings.card title="Organization" description="Name, facility type, timezone, and branding for your facility.">
<div class="space-y-5">
<div>
<label class="block text-sm font-medium text-slate-700">Organization name</label>
<input type="text" name="name" value="{{ old('name', $organization->name) }}" @disabled(! $canManage) required class="mt-1 w-full rounded-lg border-slate-300 text-sm">
</div>
<div>
<label class="block text-sm font-medium text-slate-700">Facility type</label>
<select name="facility_type" @disabled(! $canManage) class="mt-1 w-full rounded-lg border-slate-300 text-sm">
@foreach ($facilityTypes as $value => $label)
<option value="{{ $value }}" @selected(old('facility_type', data_get($organization->settings, 'facility_type', 'clinic')) === $value)>{{ $label }}</option>
@endforeach
</select>
</div>
<div>
<label class="block text-sm font-medium text-slate-700">Timezone</label>
<select name="timezone" @disabled(! $canManage) class="mt-1 w-full rounded-lg border-slate-300 text-sm">
@foreach (timezone_identifiers_list() as $tz)
<option value="{{ $tz }}" @selected(old('timezone', $organization->timezone) === $tz)>{{ $tz }}</option>
@endforeach
</select>
</div>
@if ($canManage)
<div>
<label class="block text-sm font-medium text-slate-700">Company logo</label>
<p class="mt-1 text-xs text-slate-500">PNG, JPG, WebP, or SVG up to 2&nbsp;MB. Shown in patient emails.</p>
@if (\App\Support\OrganizationBranding::hasCustomLogo($organization))
<img src="{{ \App\Support\OrganizationBranding::logoUrl($organization) }}"
alt="{{ $organization->name }}"
class="mt-3 h-12 w-auto max-w-xs rounded-lg border border-slate-200 bg-white object-contain p-2">
<label class="mt-3 flex items-center gap-2 text-sm text-slate-600">
<input type="checkbox" name="remove_logo" value="1" @checked(old('remove_logo'))>
Remove custom logo
</label>
@endif
<input type="file" name="logo" accept="image/png,image/jpeg,image/webp,image/svg+xml"
class="mt-3 block w-full text-sm text-slate-600 file:mr-3 file:rounded-lg file:border-0 file:bg-teal-50 file:px-3 file:py-2 file:text-sm file:font-medium file:text-teal-700">
</div>
@endif
</div>
</x-settings.card>
@if ($canViewBranches || $canViewTeam || $canViewDevices)
<x-settings.card title="Branches & team" description="Locations, staff access, and clinical hardware for this facility. Multi-branch management requires Care Pro.">
<ul class="space-y-3">
@if ($canViewBranches)
<li>
<a href="{{ route('care.branches.index') }}"
class="flex items-center justify-between rounded-xl border border-slate-100 bg-slate-50 px-4 py-3 text-sm text-slate-700 hover:text-indigo-700">
<span>
Branches
@if (! $hasBranchesFeature)
<span class="ml-2 rounded-full bg-amber-50 px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-amber-700">Pro</span>
@endif
<span class="mt-0.5 block text-xs text-slate-500">
@if ($hasBranchesFeature)
Clinic locations and sites ({{ $branchCount }} configured)
@else
Free includes one branch from setup · manage locations on Pro
@endif
</span>
</span>
<span class="text-slate-400">&rarr;</span>
</a>
</li>
@endif
@if ($canViewTeam)
<li>
<a href="{{ route('care.members.index') }}"
class="flex items-center justify-between rounded-xl border border-slate-100 bg-slate-50 px-4 py-3 text-sm text-slate-700 hover:text-indigo-700">
<span>
Team
<span class="mt-0.5 block text-xs text-slate-500">Invite colleagues and assign Care roles</span>
</span>
<span class="text-slate-400">&rarr;</span>
</a>
</li>
@endif
@if ($canViewDevices)
<li>
<a href="{{ route('care.devices.index') }}"
class="flex items-center justify-between rounded-xl border border-slate-100 bg-slate-50 px-4 py-3 text-sm text-slate-700 hover:text-indigo-700">
<span>
Devices
@if (! $hasClinicalDevicesFeature)
<span class="ml-2 rounded-full bg-amber-50 px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-amber-700">Agent · Pro</span>
@endif
<span class="mt-0.5 block text-xs text-slate-500">
Barcode scanners (browser) · agent-connected vitals / lab hardware
</span>
</span>
<span class="text-slate-400">&rarr;</span>
</a>
</li>
@endif
<li>
<a href="{{ route('care.settings.modules') }}"
class="flex items-center justify-between rounded-xl border border-slate-100 bg-slate-50 px-4 py-3 text-sm text-slate-700 hover:text-indigo-700">
<span>
Modules
@if (empty($canUseSpecialtyModules))
<span class="ml-2 rounded-full bg-amber-50 px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-amber-700">Pro</span>
@endif
<span class="mt-0.5 block text-xs text-slate-500">Dentistry, eye care, physiotherapy, maternity, radiology</span>
</span>
<span class="text-slate-400">&rarr;</span>
</a>
</li>
</ul>
</x-settings.card>
@endif
@if ($canManage)
<x-settings.card title="Clinical forms" description="Patient history checklists, condition-specific forms (stroke, diabetes, COPD, and more), and follow-up scores on visits and patient charts.">
<label class="flex items-start gap-3 text-sm">
<input type="checkbox" name="assessments_engine" value="1"
@checked(old('assessments_engine', $assessmentsEngineEnabled ?? true))
class="mt-0.5 rounded border-slate-300">
<span>
<span class="font-medium text-slate-800">Show clinical forms on consultations</span>
<span class="mt-0.5 block text-xs text-slate-500">
Adds a patient history form and condition pathways on each visit.
Find them on Queue consultations, or open a patient chart for history, pathways, and follow-up scores.
</span>
</span>
</label>
</x-settings.card>
<x-settings.card title="Messaging" description="Patient email and SMS use suite messaging by default — no Bird or SMS API keys required.">
<p class="text-sm text-slate-600">
Set a Ladill mailbox (From address) and optional SMS sender ID under Account Messaging.
Plan allowances cover included sends; Pro overage bills your wallet.
</p>
<div class="mt-3 flex flex-wrap gap-x-4 gap-y-2 text-sm font-medium">
<a href="{{ $messagingSettingsUrl ?? '#' }}" class="text-teal-700 underline" target="_blank" rel="noopener">
Account messaging settings
</a>
<a href="{{ route('care.integrations') }}" class="text-slate-500 underline">
Advanced: optional product API keys
</a>
</div>
</x-settings.card>
<x-settings.card title="Patient notifications" description="Automatically notify patients when appointments are booked or video visits are scheduled via suite messaging (mailbox + plan allowances).">
<div class="space-y-4 text-sm">
<div>
<p class="font-medium text-slate-800">When an appointment is booked</p>
<div class="mt-2 space-y-2">
<label class="flex items-start gap-2">
<input type="checkbox" name="notify_appointment_booked_sms" value="1"
@checked(old('notify_appointment_booked_sms', data_get($organization->settings, 'notify_appointment_booked_sms')))
class="mt-0.5">
<span>
Send SMS confirmation
@unless ($messagingSmsReady)
<span class="block text-xs text-amber-700">Platform SMS is not configured on this Care instance, and no product SMS key is connected.</span>
@endunless
</span>
</label>
<label class="flex items-start gap-2">
<input type="checkbox" name="notify_appointment_booked_email" value="1"
@checked(old('notify_appointment_booked_email', data_get($organization->settings, 'notify_appointment_booked_email')))
class="mt-0.5">
<span>
Send email confirmation
@unless ($messagingEmailReady)
<span class="block text-xs text-amber-700">Platform email is not configured, and no Bird key is connected. Set a mailbox under Account Messaging after platform keys are live.</span>
@endunless
</span>
</label>
</div>
</div>
<div>
<p class="font-medium text-slate-800">When a video visit is scheduled</p>
<div class="mt-2 space-y-2">
<label class="flex items-start gap-2">
<input type="checkbox" name="notify_video_scheduled_sms" value="1"
@checked(old('notify_video_scheduled_sms', data_get($organization->settings, 'notify_video_scheduled_sms')))
class="mt-0.5">
<span>
Send SMS with join link
@unless ($messagingSmsReady)
<span class="block text-xs text-amber-700">Platform SMS is not configured on this Care instance, and no product SMS key is connected.</span>
@endunless
</span>
</label>
<label class="flex items-start gap-2">
<input type="checkbox" name="notify_video_scheduled_email" value="1"
@checked(old('notify_video_scheduled_email', data_get($organization->settings, 'notify_video_scheduled_email')))
class="mt-0.5">
<span>
Send email with join link
<span class="block text-xs text-slate-500">Uses suite messaging when available; otherwise Meet may email the invite.</span>
</span>
</label>
</div>
</div>
</div>
</x-settings.card>
<x-settings.card title="Integrations" description="Connect Ladill Queue so existing Care lists (patient queue, pharmacy, lab, billing, specialties) issue ticket numbers and support Call next → Serve → Complete. Requires Care Pro or Enterprise — and Care must also be enabled in Queue settings.">
@if (! empty($canUseQueueIntegration))
<label class="flex items-center gap-2 text-sm">
<input type="checkbox" name="queue_integration_enabled" value="1" @checked(data_get($organization->settings, 'queue_integration_enabled'))>
Enable Ladill Queue integration
</label>
@else
<div class="rounded-xl border border-amber-100 bg-amber-50 px-4 py-3 text-sm text-amber-900">
<p class="font-medium">Queue integration is a Pro feature</p>
<p class="mt-1 text-amber-800">Free includes core patient records, appointments &amp; consults, and basic workflows. Upgrade to connect service queues and counters.</p>
<a href="{{ route('care.pro.index') }}" class="mt-3 inline-flex text-sm font-semibold text-indigo-700 hover:text-indigo-900">View Care Pro plans </a>
</div>
<input type="hidden" name="queue_integration_enabled" value="0">
@endif
</x-settings.card>
<div class="flex justify-end">
<button type="submit" class="btn-primary">Save settings</button>
</div>
@endif
</form>
</x-settings.page>
</x-app-layout>