Add per-customer SMS and Bird Integrations for patient messaging.
Deploy Ladill Care / deploy (push) Successful in 37s

Patient SMS/email now use encrypted tenant keys via the platform relay instead of shared platform Care API keys.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-12 17:05:54 +00:00
co-authored by Cursor
parent 2568b8a2f0
commit f1e28c7af8
17 changed files with 1084 additions and 29 deletions
+14 -3
View File
@@ -137,7 +137,18 @@
@if ($canManage)
<section class="rounded-2xl border border-slate-200 bg-white p-6" x-data="{ tab: 'sms' }">
<h2 class="text-sm font-semibold uppercase tracking-wide text-slate-500">Message patient</h2>
<p class="mt-1 text-xs text-slate-500">SMS uses Ladill SMS credits. Email uses Ladill Bird credits.</p>
<p class="mt-1 text-xs text-slate-500">Uses your connected Ladill SMS / Bird credentials. <a href="{{ route('care.integrations') }}" class="text-teal-700 underline">Manage integrations</a></p>
@if (! ($messagingSmsReady ?? false) || ! ($messagingEmailReady ?? false))
<p class="mt-3 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2 text-xs text-amber-800">
@if (! ($messagingSmsReady ?? false) && ! ($messagingEmailReady ?? false))
Connect SMS and Bird in Integrations before messaging patients.
@elseif (! ($messagingSmsReady ?? false))
Connect Ladill SMS in Integrations to enable SMS.
@else
Connect Ladill Bird in Integrations to enable email.
@endif
</p>
@endif
<div class="mt-4 flex gap-1 rounded-xl bg-slate-100 p-1 text-sm">
<button type="button" @click="tab = 'sms'" :class="tab === 'sms' ? 'bg-white shadow-sm text-slate-900' : 'text-slate-500'" class="flex-1 rounded-lg px-3 py-1.5 font-medium">SMS</button>
<button type="button" @click="tab = 'email'" :class="tab === 'email' ? 'bg-white shadow-sm text-slate-900' : 'text-slate-500'" class="flex-1 rounded-lg px-3 py-1.5 font-medium">Email</button>
@@ -148,7 +159,7 @@
<p class="text-xs text-slate-500">To: {{ $patient->phone ?: 'no phone on file' }}</p>
<textarea name="message" rows="3" maxlength="480" placeholder="Text message" required class="block w-full rounded-xl border-slate-300 text-sm focus:border-sky-500 focus:ring-sky-500">{{ old('message') }}</textarea>
<div class="text-right">
<button type="submit" class="btn-primary" @if(! $patient->phone) disabled @endif>Send SMS</button>
<button type="submit" class="btn-primary" @if(! $patient->phone || ! ($messagingSmsReady ?? false)) disabled @endif>Send SMS</button>
</div>
</form>
@@ -158,7 +169,7 @@
<input type="text" name="subject" value="{{ old('subject') }}" placeholder="Subject" required class="block w-full rounded-xl border-slate-300 text-sm focus:border-sky-500 focus:ring-sky-500">
<textarea name="body" rows="4" placeholder="Message" required class="block w-full rounded-xl border-slate-300 text-sm focus:border-sky-500 focus:ring-sky-500">{{ old('body') }}</textarea>
<div class="text-right">
<button type="submit" class="btn-primary" @if(! $patient->email) disabled @endif>Send email</button>
<button type="submit" class="btn-primary" @if(! $patient->email || ! ($messagingEmailReady ?? false)) disabled @endif>Send email</button>
</div>
</form>
</section>