more filtering

This commit is contained in:
Dr Masroor Ehsan 2025-01-21 00:21:45 +06:00
parent c84897d021
commit 040b2fba55
3 changed files with 13 additions and 4 deletions

View File

@ -311,6 +311,12 @@ private function filterStatus(QueryBuilder $query, ?string $status): void
case 'progress':
$query->whereNotNull('locked_at');
break;
case 'assigned':
$query->whereNotNull('assigned_at');
break;
case 'orphan':
$query->whereNull('assigned_at');
break;
}
}

View File

@ -1,5 +1,6 @@
<li class="nav-item">
<a href="#" type="button" class="nav-link {{ $active }}" role="tab" data-bs-toggle="tab" id="{{ $id }}">
<i class="me-2 fa-regular fa-{{ $icon ?? 'star' }}"></i>
{{ $text }}
</a>
</li>

View File

@ -1,8 +1,10 @@
<div class="nav-align-top">
<ul class="nav nav-tabs" role="tablist">
@include('staff.worklist.partials._nav-item', ['id' => 'nav-unread', 'text' => 'Pending', 'active' => 'active'])
@include('staff.worklist.partials._nav-item', ['id' => 'nav-progress', 'text' => 'Read in Progress', 'active' => ''])
@include('staff.worklist.partials._nav-item', ['id' => 'nav-read', 'text' => 'Complete', 'active' => ''])
@include('staff.worklist.partials._nav-item', ['id' => 'nav-all', 'text' => 'All', 'active' => ''])
@include('staff.worklist.partials._nav-item', ['id' => 'nav-unread', 'text' => 'Pending', 'active' => 'active', 'icon' => 'hourglass'])
@include('staff.worklist.partials._nav-item', ['id' => 'nav-progress', 'text' => 'Read in Progress', 'active' => '', 'icon' => 'pen-to-square'])
@include('staff.worklist.partials._nav-item', ['id' => 'nav-read', 'text' => 'Complete', 'active' => '', 'icon' => 'flag-checkered'])
@include('staff.worklist.partials._nav-item', ['id' => 'nav-all', 'text' => 'All', 'active' => '', 'icon' => 'layer-group'])
@include('staff.worklist.partials._nav-item', ['id' => 'nav-orphan', 'text' => 'Unassigned', 'active' => '', 'icon' => 'bookmark'])
@include('staff.worklist.partials._nav-item', ['id' => 'nav-assigned', 'text' => 'Assigned', 'active' => '', 'icon' => 'user-plus'])
</ul>
</div>