Files
ladill-care/resources/views/care/consultations/partials/actions-menu.blade.php
T
isaaccladandCursor a00a8249ad
Deploy Ladill Care / deploy (push) Successful in 40s
Improve specialty workspace actions and Call next handoff.
Move timeline into a workspace tab, surface Complete consultation and Call again in Actions, and make Call next end the current encounter then open the next called patient.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-18 16:12:30 +00:00

75 lines
2.9 KiB
PHP

{{-- Action buttons for consultation show (desktop sticky + mobile sheet). --}}
@php
$canEdit = ! $isCompleted && ($canManage || $canVitals);
$btn = 'flex w-full items-center justify-center rounded-xl px-3 py-2.5 text-sm font-semibold transition';
$btnPrimary = $btn.' bg-indigo-600 text-white hover:bg-indigo-700';
$btnSecondary = $btn.' border border-slate-200 bg-white text-slate-800 hover:bg-slate-50';
$btnAccent = $btn.' border border-sky-200 bg-sky-50 text-sky-900 hover:bg-sky-100';
$appointment = $consultation->appointment;
$ticketCalled = $appointment && $appointment->queue_ticket_status === 'called';
@endphp
@include('care.partials.queue-ops', [
'queueIntegration' => $queueIntegration ?? null,
'queueCallNextRoute' => 'care.queue.call-next',
'queueCallNextParams' => [],
'branchId' => $queueBranchId ?? null,
'currentAppointmentId' => $appointment?->id,
])
@if ($ticketCalled && $appointment)
<form method="POST" action="{{ route('care.queue.recall', $appointment) }}" class="w-full" @click.stop>
@csrf
<button type="submit" class="{{ $btnAccent }}">Call again</button>
</form>
@endif
@if ($canManage && ! $isCompleted)
<button
type="button"
class="{{ $btnPrimary }}"
@click.stop="$dispatch('open-modal', {{ \Illuminate\Support\Js::from('complete-consultation-'.$consultation->id) }})"
>
Complete consultation
</button>
@endif
@if ($canEdit)
<button type="submit" form="consultation-form" class="{{ $btnPrimary }}">Save</button>
@if ($canManage && ($canViewAssessments ?? false))
<button type="submit" form="consultation-form" name="suggest_pathways" value="1" class="{{ $btnAccent }}">
Show condition suggestions
</button>
@endif
@endif
@if ($canPrescribe)
<button
type="button"
class="{{ $btnSecondary }}"
@click.stop="$dispatch('open-modal', {{ \Illuminate\Support\Js::from('prescribe-'.$consultation->id) }})"
>
Prescribe
</button>
@endif
@if ($canRequestInvestigations && $investigationTypes->isNotEmpty() && ! $isCompleted)
<button
type="button"
class="{{ $btnSecondary }}"
@click.stop="$dispatch('open-modal', {{ \Illuminate\Support\Js::from('request-investigations-'.$consultation->id) }})"
>
Request investigations
</button>
@endif
@if ($canGenerateBill && $isCompleted && $consultation->visit)
<form method="POST" action="{{ route('care.bills.generate', $consultation->visit) }}" class="w-full" @click.stop>
@csrf
<input type="hidden" name="from_consultation" value="{{ $consultation->uuid }}">
<button type="submit" class="{{ $btn }} w-full bg-slate-800 text-white hover:bg-slate-900">Generate bill</button>
</form>
@endif
<a href="{{ route('care.queue.index') }}" class="{{ $btnSecondary }}">Back to queue</a>