Hide Laboratory nav from doctors who only have lab.view.
Deploy Ladill Care / deploy (push) Successful in 30s

The sidebar and dashboard linked to the lab work queue (lab.manage) while
gating on lab.view, so physio/GP doctors hit 403 on open.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-19 17:31:14 +00:00
co-authored by Cursor
parent cfa71c2c15
commit dfb66369d0
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -40,7 +40,7 @@
];
}
if ($permissions->can($member, 'lab.view')) {
if ($permissions->can($member, 'lab.manage')) {
$operationalCards[] = [
'label' => 'Pending lab',
'value' => number_format($operational['pending_lab']),
+3 -1
View File
@@ -52,7 +52,9 @@
// Lab, pharmacy, billing, and Queue service counters are Pro/Enterprise modules.
if (! empty($hasPaidPlan)) {
if ($permissions->can($member, 'lab.view') && $permissions->handlesFloorCare($member)) {
// Queue ops require lab.manage (techs/managers). Doctors only have lab.view
// for results — do not show a link that 403s on care.lab.queue.index.
if ($permissions->can($member, 'lab.manage') && $permissions->handlesFloorCare($member)) {
$nav[] = ['name' => 'Laboratory', 'route' => route('care.lab.queue.index'), 'active' => request()->routeIs('care.lab.*') && ! request()->routeIs('care.lab.catalog.*'),
'icon' => '<path stroke-linecap="round" stroke-linejoin="round" d="M9.75 3.104v5.714a2.25 2.25 0 0 1-.659 1.591L5 14.5M9.75 3.104c-.251.023-.501.05-.75.082m.75-.082a24.301 24.301 0 0 1 4.5 0m0 0v5.714a2.25 2.25 0 0 0 .659 1.591L19 14.5M14.25 3.104c.251.023.501.05.75.082M19 14.5l-2.47 2.47a2.25 2.25 0 0 1-1.59.659H9.06a2.25 2.25 0 0 1-1.591-.659L5 14.5m14 0V17a2.25 2.25 0 0 1-2.25 2.25H7.25A2.25 2.25 0 0 1 5 17v-2.5" />'];
}