Restrict care unit and department setup to admins.
Deploy Ladill Care / deploy (push) Successful in 48s
Deploy Ladill Care / deploy (push) Successful in 48s
Nurses keep Nursing Services for clinical work but can no longer browse or create structural units and departments. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -11,7 +11,9 @@
|
||||
['value' => number_format($heroStats['active']), 'label' => 'Active'],
|
||||
]">
|
||||
<x-slot name="actions">
|
||||
<a href="{{ route('care.care-units.create') }}" class="btn-primary">Add care unit</a>
|
||||
@if ($canManage ?? false)
|
||||
<a href="{{ route('care.care-units.create') }}" class="btn-primary">Add care unit</a>
|
||||
@endif
|
||||
</x-slot>
|
||||
</x-care.page-hero>
|
||||
|
||||
|
||||
@@ -11,7 +11,9 @@
|
||||
]">
|
||||
<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>
|
||||
@if ($canManage ?? false)
|
||||
<a href="{{ route('care.departments.create') }}" class="btn-primary">Add department</a>
|
||||
@endif
|
||||
</x-slot>
|
||||
</x-care.page-hero>
|
||||
|
||||
@@ -27,7 +29,9 @@
|
||||
<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>
|
||||
@if ($canManage ?? false)
|
||||
<a href="{{ route('care.departments.edit', $department) }}" class="text-sky-600">Edit</a>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
</div>
|
||||
</div>
|
||||
@empty
|
||||
<p class="text-sm text-slate-500 sm:col-span-2 lg:col-span-3">No care units yet — create units under Care units.</p>
|
||||
<p class="text-sm text-slate-500 sm:col-span-2 lg:col-span-3">No care units yet — ask an administrator to set them up.</p>
|
||||
@endforelse
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -132,9 +132,6 @@
|
||||
if ($permissions->can($member, 'admin.departments.view')) {
|
||||
$adminNav[] = ['name' => 'Care units', 'route' => route('care.care-units.index'), 'active' => request()->routeIs('care.care-units.*'),
|
||||
'icon' => '<path stroke-linecap="round" stroke-linejoin="round" d="M2.25 21h19.5m-18-18v18m10.5-18v18m6-13.5V21M6.75 6.75h.75m-.75 3h.75m-.75 3h.75m3-6h.75m-.75 3h.75m-.75 3h.75M6.75 21v-3.375c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21M3 3h12m-.75 4.5H21m-3.75 3h.008v.008h-.008v-.008Zm0 3h.008v.008h-.008v-.008Zm0 3h.008v.008h-.008v-.008Z" />'];
|
||||
} elseif ($permissions->can($member, 'nursing.services.view') && $permissions->can($member, 'inpatient.placement.view')) {
|
||||
$adminNav[] = ['name' => 'Care units', 'route' => route('care.care-units.index'), 'active' => request()->routeIs('care.care-units.*'),
|
||||
'icon' => '<path stroke-linecap="round" stroke-linejoin="round" d="M2.25 21h19.5m-18-18v18m10.5-18v18m6-13.5V21M6.75 6.75h.75m-.75 3h.75m-.75 3h.75m3-6h.75m-.75 3h.75m-.75 3h.75M6.75 21v-3.375c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21M3 3h12m-.75 4.5H21m-3.75 3h.008v.008h-.008v-.008Zm0 3h.008v.008h-.008v-.008Zm0 3h.008v.008h-.008v-.008Z" />'];
|
||||
}
|
||||
if ($permissions->can($member, 'nursing.services.view')) {
|
||||
$adminNav[] = ['name' => 'Nursing Services', 'route' => route('care.nursing.services'), 'active' => request()->routeIs('care.nursing.*') || request()->routeIs('care.shifts.*'),
|
||||
|
||||
Reference in New Issue
Block a user