Deploy Ladill Care / deploy (push) Failing after 36s
Replace placeholder clinical forms with patient-level FDI charting, multi-visit plans, procedure-to-bill linking, imaging, reports, and demo seed data. Co-authored-by: Cursor <cursoragent@cursor.com>
93 lines
4.8 KiB
PHP
93 lines
4.8 KiB
PHP
@php
|
|
$plan = $dentalPlan;
|
|
@endphp
|
|
|
|
<section class="rounded-2xl border border-slate-200 bg-white p-5">
|
|
<div class="flex flex-wrap items-start justify-between gap-3">
|
|
<div>
|
|
<h3 class="text-sm font-semibold text-slate-900">Treatment plan</h3>
|
|
<p class="mt-0.5 text-xs text-slate-500">
|
|
@if ($plan)
|
|
Status: <span class="font-medium">{{ ucfirst(str_replace('_', ' ', $plan->status)) }}</span>
|
|
· Estimate {{ $currency ?? 'GHS' }} {{ number_format($plan->estimate_minor / 100, 2) }}
|
|
@else
|
|
Create a plan by adding the first item.
|
|
@endif
|
|
</p>
|
|
</div>
|
|
@if ($plan && $plan->status === 'draft')
|
|
<form method="POST" action="{{ route('care.specialty.dentistry.plan.accept', $workspaceVisit) }}">
|
|
@csrf
|
|
<button type="submit" class="rounded-lg border border-emerald-200 bg-emerald-50 px-3 py-1.5 text-sm font-medium text-emerald-800 hover:bg-emerald-100">Accept plan</button>
|
|
</form>
|
|
@endif
|
|
</div>
|
|
|
|
<ul class="mt-4 space-y-2 text-sm">
|
|
@forelse ($plan?->items ?? [] as $item)
|
|
<li class="flex flex-wrap items-center justify-between gap-2 rounded-xl border border-slate-100 bg-slate-50 px-3 py-2">
|
|
<div>
|
|
<p class="font-medium text-slate-800">
|
|
{{ $item->label }}
|
|
@if ($item->tooth_code)
|
|
<span class="text-slate-500">· {{ $item->tooth_code }}</span>
|
|
@endif
|
|
@if (! empty($item->surfaces))
|
|
<span class="text-slate-400">({{ implode('', $item->surfaces) }})</span>
|
|
@endif
|
|
</p>
|
|
<p class="text-xs text-slate-500">Priority {{ $item->priority }} · {{ ucfirst($item->status) }}</p>
|
|
</div>
|
|
<span class="tabular-nums text-slate-600">{{ number_format($item->estimate_minor / 100, 2) }}</span>
|
|
</li>
|
|
@empty
|
|
<li class="text-slate-500">No plan items yet.</li>
|
|
@endforelse
|
|
</ul>
|
|
|
|
<form method="POST" action="{{ route('care.specialty.dentistry.plan-items', $workspaceVisit) }}" class="mt-6 space-y-3 border-t border-slate-100 pt-4">
|
|
@csrf
|
|
<h4 class="text-sm font-semibold text-slate-900">Add item</h4>
|
|
<div class="grid gap-3 sm:grid-cols-2">
|
|
<div>
|
|
<label class="block text-xs font-medium text-slate-600">Procedure</label>
|
|
<select name="procedure_code" required class="mt-1 w-full rounded-xl border border-slate-200 px-3 py-2 text-sm">
|
|
<option value="">Select…</option>
|
|
@foreach ($dentalCatalog as $service)
|
|
<option value="{{ $service['code'] }}">{{ $service['label'] }} — {{ number_format(((int) $service['amount_minor']) / 100, 2) }}</option>
|
|
@endforeach
|
|
</select>
|
|
</div>
|
|
<div>
|
|
<label class="block text-xs font-medium text-slate-600">Tooth (FDI)</label>
|
|
<select name="tooth_code" class="mt-1 w-full rounded-xl border border-slate-200 px-3 py-2 text-sm">
|
|
<option value="">—</option>
|
|
@foreach (array_merge($dentalRows['upper'] ?? [], $dentalRows['lower'] ?? []) as $code)
|
|
<option value="{{ $code }}">{{ $code }}</option>
|
|
@endforeach
|
|
</select>
|
|
</div>
|
|
<div>
|
|
<label class="block text-xs font-medium text-slate-600">Priority (1 = highest)</label>
|
|
<input type="number" name="priority" value="50" min="1" max="100" class="mt-1 w-full rounded-xl border border-slate-200 px-3 py-2 text-sm">
|
|
</div>
|
|
<div class="sm:col-span-2">
|
|
<p class="text-xs font-medium text-slate-600">Surfaces</p>
|
|
<div class="mt-2 flex flex-wrap gap-3">
|
|
@foreach ($dentalSurfaces as $surface)
|
|
<label class="inline-flex items-center gap-1.5 text-sm">
|
|
<input type="checkbox" name="surfaces[]" value="{{ $surface }}" class="rounded border-slate-300 text-indigo-600">
|
|
{{ $surface }}
|
|
</label>
|
|
@endforeach
|
|
</div>
|
|
</div>
|
|
<div class="sm:col-span-2">
|
|
<label class="block text-xs font-medium text-slate-600">Notes</label>
|
|
<input type="text" name="notes" class="mt-1 w-full rounded-xl border border-slate-200 px-3 py-2 text-sm">
|
|
</div>
|
|
</div>
|
|
<button type="submit" class="btn-primary">Add to plan</button>
|
|
</form>
|
|
</section>
|