Deploy Ladill Care / deploy (push) Failing after 13s
Healthcare management app: patients, appointments, consultations, lab, pharmacy inventory, billing, and reports at care.ladill.com. Co-authored-by: Cursor <cursoragent@cursor.com>
77 lines
4.4 KiB
PHP
77 lines
4.4 KiB
PHP
<x-app-layout title="Appointments">
|
|
<div class="flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between">
|
|
<div>
|
|
<h1 class="text-xl font-semibold text-slate-900">Appointments</h1>
|
|
<p class="mt-1 text-sm text-slate-500">Schedule and manage patient appointments</p>
|
|
</div>
|
|
@if (app(\App\Services\Care\CarePermissions::class)->can(auth()->user() ? app(\App\Services\Care\OrganizationResolver::class)->memberFor(auth()->user(), $organization) : null, 'appointments.manage'))
|
|
<div class="flex gap-2">
|
|
<a href="{{ route('care.appointments.walk-in.create') }}" class="rounded-lg border border-slate-200 bg-white px-4 py-2 text-sm font-medium text-slate-700 hover:bg-slate-50">Walk-in</a>
|
|
<a href="{{ route('care.appointments.create') }}" class="btn-primary">Book appointment</a>
|
|
</div>
|
|
@endif
|
|
</div>
|
|
|
|
<form method="GET" class="mt-4 flex flex-wrap gap-3 rounded-2xl border border-slate-200 bg-white p-4">
|
|
<input type="date" name="date" value="{{ request('date') }}" class="rounded-lg border-slate-300 text-sm">
|
|
<select name="status" class="rounded-lg border-slate-300 text-sm">
|
|
<option value="">All statuses</option>
|
|
@foreach ($statuses as $value => $label)
|
|
<option value="{{ $value }}" @selected(request('status') === $value)>{{ $label }}</option>
|
|
@endforeach
|
|
</select>
|
|
<select name="practitioner_id" class="rounded-lg border-slate-300 text-sm">
|
|
<option value="">All practitioners</option>
|
|
@foreach ($practitioners as $practitioner)
|
|
<option value="{{ $practitioner->id }}" @selected((string) request('practitioner_id') === (string) $practitioner->id)>{{ $practitioner->name }}</option>
|
|
@endforeach
|
|
</select>
|
|
<button type="submit" class="btn-primary">Filter</button>
|
|
@if (request()->hasAny(['date', 'status', 'practitioner_id']))
|
|
<a href="{{ route('care.appointments.index') }}" class="rounded-lg border border-slate-200 px-4 py-2 text-sm text-slate-600">Clear</a>
|
|
@endif
|
|
</form>
|
|
|
|
<div class="mt-4 overflow-hidden rounded-2xl border border-slate-200 bg-white">
|
|
<table class="min-w-full text-sm">
|
|
<thead class="bg-slate-50 text-left text-xs uppercase text-slate-500">
|
|
<tr>
|
|
<th class="px-4 py-3">Patient</th>
|
|
<th class="px-4 py-3">Scheduled</th>
|
|
<th class="px-4 py-3">Practitioner</th>
|
|
<th class="px-4 py-3">Type</th>
|
|
<th class="px-4 py-3">Status</th>
|
|
<th class="px-4 py-3"></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="divide-y divide-slate-50">
|
|
@forelse ($appointments as $appointment)
|
|
<tr>
|
|
<td class="px-4 py-3">
|
|
<p class="font-medium text-slate-900">{{ $appointment->patient->fullName() }}</p>
|
|
<p class="text-xs text-slate-500">{{ $appointment->patient->patient_number }}</p>
|
|
</td>
|
|
<td class="px-4 py-3">{{ $appointment->scheduled_at?->format('d M Y H:i') ?? '—' }}</td>
|
|
<td class="px-4 py-3">{{ $appointment->practitioner?->name ?? '—' }}</td>
|
|
<td class="px-4 py-3 capitalize">{{ str_replace('_', ' ', $appointment->type) }}</td>
|
|
<td class="px-4 py-3">
|
|
<span class="rounded-full bg-slate-100 px-2 py-0.5 text-xs font-medium text-slate-700">
|
|
{{ $statuses[$appointment->status] ?? $appointment->status }}
|
|
</span>
|
|
</td>
|
|
<td class="px-4 py-3 text-right">
|
|
<a href="{{ route('care.appointments.show', $appointment) }}" class="text-sky-600 hover:text-sky-700">View</a>
|
|
</td>
|
|
</tr>
|
|
@empty
|
|
<tr>
|
|
<td colspan="6" class="px-4 py-8 text-center text-slate-500">No appointments found.</td>
|
|
</tr>
|
|
@endforelse
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="mt-4">{{ $appointments->links() }}</div>
|
|
</x-app-layout>
|