Add validation user column and Reports menu items, fix phlebo routes

This commit is contained in:
mahdahar 2026-02-24 10:32:28 +07:00
parent 5d1b01c4e8
commit 4fa33194a5
4 changed files with 23 additions and 7 deletions

View File

@ -83,7 +83,8 @@ $routes->group('lab', ['filter' => 'role:2'], function ($routes) {
});
$routes->group('phlebo', ['filter' => 'role:3'], function ($routes) {
$routes->get('', 'Pages\PhlebotomistController::index');
$routes->get('', 'Pages\PhlebotomistController::collect');
$routes->get('dashboard', 'Pages\PhlebotomistController::index');
$routes->get('collect', 'Pages\PhlebotomistController::collect');
});

View File

@ -28,6 +28,7 @@ return [
'menuItems' => [
['label' => 'Dashboard', 'href' => 'admin', 'icon' => 'chart-bar'],
['label' => 'Validate', 'href' => 'admin/validate', 'icon' => 'check-circle'],
['label' => 'Reports', 'href' => 'http://glenlis/report2/', 'icon' => 'book'],
],
],
'cs' => [
@ -53,6 +54,7 @@ return [
'menuItems' => [
['label' => 'Dashboard', 'href' => 'lab', 'icon' => 'chart-bar'],
['label' => 'Validate', 'href' => 'lab/validate', 'icon' => 'check-circle'],
['label' => 'Reports', 'href' => 'http://glenlis/report2/', 'icon' => 'book'],
],
],
'phlebo' => [
@ -64,7 +66,7 @@ return [
'defaultPrinter' => 'phlebo',
],
'menuItems' => [
['label' => 'Dashboard', 'href' => 'phlebo', 'icon' => 'chart-bar'],
['label' => 'Dashboard', 'href' => 'phlebo/dashboard', 'icon' => 'chart-bar'],
['label' => 'Collect Samples', 'href' => 'phlebo/collect', 'icon' => 'vial'],
],
],
@ -80,6 +82,7 @@ return [
['label' => 'Dashboard', 'href' => 'superuser', 'icon' => 'chart-bar'],
['label' => 'Validate', 'href' => 'superuser/validate', 'icon' => 'check-circle'],
['label' => 'Users', 'href' => 'superuser/users', 'icon' => 'users'],
['label' => 'Reports', 'href' => 'http://glenlis/report2/', 'icon' => 'book'],
],
],
];

View File

@ -69,8 +69,8 @@
<th style="width: 13%;">
<div class="skeleton h-4 w-20"></div>
</th>
<th style="width: 20%;">
<div class="skeleton h-4 w-full"></div>
<th style="width: 13%;">
<div class="skeleton h-4 w-20"></div>
</th>
</tr>
</thead>
@ -137,7 +137,7 @@
:class="sortCol === 'REFF' ? (sortAsc ? 'fa-sort-up' : 'fa-sort-down') : 'fa-sort opacity-20'"></i>
</div>
</th>
<th style="width: 20%;" @click="sort('DOC')"
<th style="width: 15%;" @click="sort('DOC')"
class="cursor-pointer hover:bg-base-200 transition-colors select-none">
<div class="flex items-center gap-1">
Doctor
@ -145,6 +145,14 @@
:class="sortCol === 'DOC' ? (sortAsc ? 'fa-sort-up' : 'fa-sort-down') : 'fa-sort opacity-20'"></i>
</div>
</th>
<th style="width: 13%;" @click="sort('VAL1USER')"
class="cursor-pointer hover:bg-base-200 transition-colors select-none">
<div class="flex items-center gap-1">
Val1 By
<i class="fa text-xs"
:class="sortCol === 'VAL1USER' ? (sortAsc ? 'fa-sort-up' : 'fa-sort-down') : 'fa-sort opacity-20'"></i>
</div>
</th>
</tr>
</thead>
<tbody>
@ -160,6 +168,7 @@
<td x-text="req.HOSTORDERNUMBER" class="font-bold"></td>
<td x-text="req.REFF"></td>
<td x-text="req.DOC"></td>
<td x-text="req.VAL1USER"></td>
</tr>
</template>
</tbody>

View File

@ -61,8 +61,11 @@
<li><a @click.prevent="openDialogSetPassword()"><i class="fa fa-key mr-2"></i> Change Password</a></li>
<div class="divider my-1"></div>
<?php foreach ($roleConfig['menuItems'] ?? [] as $item): ?>
<li><a href="<?= base_url($item['href']) ?>"><i class="fa fa-<?= $item['icon'] ?> mr-2"></i>
<?= $item['label'] ?></a></li>
<li>
<a href="<?= str_starts_with($item['href'], 'http') ? $item['href'] : base_url($item['href']) ?>">
<i class="fa fa-<?= $item['icon'] ?> mr-2"></i><?= $item['label'] ?>
</a>
</li>
<?php endforeach; ?>
</ul>
</div>