Deploy Ladill Care / deploy (push) Successful in 1m8s
Models employment as department/unit/shift placements with primary and temporary kinds so nurses are not permanently bound to a ward. Co-authored-by: Cursor <cursoragent@cursor.com>
41 lines
2.2 KiB
PHP
41 lines
2.2 KiB
PHP
<x-app-layout title="Departments">
|
|
<div class="space-y-6">
|
|
<x-care.page-hero
|
|
badge="Outpatient · Lab · Pharmacy · More"
|
|
title="Departments"
|
|
description="Define clinical and support departments within each branch to organize care delivery and staffing."
|
|
:stats="[
|
|
['value' => number_format($heroStats['total']), 'label' => 'Departments'],
|
|
['value' => number_format($heroStats['active']), 'label' => 'Active'],
|
|
['value' => number_format($heroStats['branches']), 'label' => 'Branches'],
|
|
]">
|
|
<x-slot name="actions">
|
|
<a href="{{ route('care.care-units.index') }}" class="btn-secondary">Care units</a>
|
|
<a href="{{ route('care.departments.create') }}" class="btn-primary">Add department</a>
|
|
</x-slot>
|
|
</x-care.page-hero>
|
|
|
|
<div class="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">Name</th><th class="px-4 py-3">Type</th><th class="px-4 py-3">Branch</th><th class="px-4 py-3"></th></tr>
|
|
</thead>
|
|
<tbody class="divide-y divide-slate-50">
|
|
@forelse ($departments as $department)
|
|
<tr>
|
|
<td class="px-4 py-3 font-medium">{{ $department->name }}</td>
|
|
<td class="px-4 py-3">{{ $types[$department->type] ?? $department->type }}</td>
|
|
<td class="px-4 py-3">{{ $department->branch?->name }}</td>
|
|
<td class="px-4 py-3 text-right">
|
|
<a href="{{ route('care.departments.edit', $department) }}" class="text-sky-600">Edit</a>
|
|
</td>
|
|
</tr>
|
|
@empty
|
|
<tr><td colspan="4" class="px-4 py-6 text-center text-slate-500">No departments yet.</td></tr>
|
|
@endforelse
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</x-app-layout>
|