gdc_cmod/app/Views/shared/dashboard_config.php
2026-01-22 17:02:47 +07:00

75 lines
2.4 KiB
PHP

<?php
/**
* Dashboard Role Configuration
*
* Defines role-specific settings for dashboard views to eliminate code duplication.
*
* Configuration Schema:
* - title: Dashboard title displayed in navbar
* - columns: Column visibility settings
* - lab: Show "No Lab" column (SP_ACCESSNUMBER)
* - resto: Show "ResTo" column (ODR_CRESULT_TO)
* - register: Show "No Register" column (HOSTORDERNUMBER)
* - sampleDialog: Sample dialog behavior
* - commentEditable: Allow editing the comment textarea
* - showCollectButtons: Show Collect/Un-Coll/Un-Recv buttons
* - menuItems: Navigation menu items
*/
return [
'admin' => [
'title' => 'Admin Dashboard',
'sampleDialog' => [
'commentEditable' => true,
'showCollectButtons' => true,
],
'menuItems' => [
['label' => 'Dashboard', 'href' => 'admin', 'icon' => 'chart-bar'],
['label' => 'Validate', 'href' => 'admin/validate', 'icon' => 'check-circle'],
],
],
'cs' => [
'title' => 'CS Dashboard',
'sampleDialog' => [
'commentEditable' => false,
'showCollectButtons' => false,
],
'menuItems' => [
['label' => 'Dashboard', 'href' => 'cs', 'icon' => 'chart-bar'],
],
],
'lab' => [
'title' => 'Lab Analyst Dashboard',
'sampleDialog' => [
'commentEditable' => true,
'showCollectButtons' => true,
],
'menuItems' => [
['label' => 'Dashboard', 'href' => 'lab', 'icon' => 'chart-bar'],
['label' => 'Validate', 'href' => 'lab/validate', 'icon' => 'check-circle'],
],
],
'phlebo' => [
'title' => 'Phlebotomist Dashboard',
'sampleDialog' => [
'commentEditable' => false,
'showCollectButtons' => false,
],
'menuItems' => [
['label' => 'Dashboard', 'href' => 'phlebo', 'icon' => 'chart-bar'],
],
],
'superuser' => [
'title' => 'Superuser Dashboard',
'sampleDialog' => [
'commentEditable' => true,
'showCollectButtons' => true,
],
'menuItems' => [
['label' => 'Dashboard', 'href' => 'superuser', 'icon' => 'chart-bar'],
['label' => 'Validate', 'href' => 'superuser/validate', 'icon' => 'check-circle'],
['label' => 'Users', 'href' => 'superuser/users', 'icon' => 'users'],
],
],
];