Files
ladill-care/resources/views/care/settings/edit.blade.php
T
isaacclad 85eb04d2a3
Deploy Ladill Care / deploy (push) Successful in 1m25s
Gate Care branch management behind Pro like Frontdesk.
Free plans keep a single setup branch but get an upgrade screen for Branches; Pro/Enterprise unlock multi-branch management via plan features.
2026-07-16 09:14:58 +00:00

177 lines
12 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)
<x-settings.card title="Branches & team" description="Locations and staff access 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
</ul>
</x-settings.card>
@endif
@if ($canManage)
<x-settings.card title="Messaging" description="Configure SMS and email credentials for outbound messages.">
<a href="{{ route('care.integrations') }}" class="text-sm font-medium text-teal-700 underline">Open messaging integrations </a>
</x-settings.card>
<x-settings.card title="Patient notifications" description="Automatically notify patients when appointments are booked or video visits are scheduled. Requires connected SMS / Bird credentials.">
<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">Connect SMS in Integrations before this can send.</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">Connect Bird email in Integrations before this can send.</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">Connect SMS in Integrations before this can send.</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 Bird when connected; otherwise Meet emails the invite.</span>
</span>
</label>
</div>
</div>
</div>
</x-settings.card>
<x-settings.card title="Integrations" description="Connect Ladill Queue for service counters. 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>