Add comprehensive printer configuration support: - New Printers.php config with role-based printer defaults (lab, phlebo, reception) - Update LabelController for configurable printer routing with error handling - Add ResponseTrait for proper JSON responses (success/error status) - Update routes to accept optional printer parameter for label printing - Add default printer configuration per role in shared config Enhance report generation workflow: - Support REPORT_LANG from CM_REQUESTS table for language preference - Prioritize URL parameter, then database value, then default - Add language info to PDF generation response (Indonesian/English) - Update all report methods (view, eng, preview, generate) with unified logic Improve UI and user experience: - Add dialog_results_generate to all role dashboards (superuser, admin, lab, phlebo, cs) - Update skeleton loading states widths in content requests - Add printer selection capability in sample collection flow Add comprehensive UAT documentation: - New UAT_GDC_CMOD_Checklist.md with 150+ test cases - Cover all roles: superuser, admin, lab, phlebo, cs, and cross-role scenarios - Include acceptance criteria (functional, security, performance, usability, data integrity) - Test categories: authentication, user management, validation, sample management, audit trail, reporting - Detailed sign-off structure for stakeholders Add barcode printing documentation: - docs/barcode_print_all.php - all labels printing implementation - docs/barcode_print_coll.php - collection label implementation - docs/barcode_print_disp.php - dispatch label implementation Update TODO tracking: - Mark Reprint Label and PDF Generation as completed - Update pending tasks for testing and audit trails
80 lines
2.6 KiB
PHP
80 lines
2.6 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,
|
|
'defaultPrinter' => 'lab',
|
|
],
|
|
'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,
|
|
'defaultPrinter' => 'reception',
|
|
],
|
|
'menuItems' => [
|
|
['label' => 'Dashboard', 'href' => 'cs', 'icon' => 'chart-bar'],
|
|
],
|
|
],
|
|
'lab' => [
|
|
'title' => 'Lab Analyst Dashboard',
|
|
'sampleDialog' => [
|
|
'commentEditable' => true,
|
|
'showCollectButtons' => true,
|
|
'defaultPrinter' => 'lab',
|
|
],
|
|
'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,
|
|
'defaultPrinter' => 'phlebo',
|
|
],
|
|
'menuItems' => [
|
|
['label' => 'Dashboard', 'href' => 'phlebo', 'icon' => 'chart-bar'],
|
|
],
|
|
],
|
|
'superuser' => [
|
|
'title' => 'Superuser Dashboard',
|
|
'sampleDialog' => [
|
|
'commentEditable' => true,
|
|
'showCollectButtons' => true,
|
|
'defaultPrinter' => 'lab',
|
|
],
|
|
'menuItems' => [
|
|
['label' => 'Dashboard', 'href' => 'superuser', 'icon' => 'chart-bar'],
|
|
['label' => 'Validate', 'href' => 'superuser/validate', 'icon' => 'check-circle'],
|
|
['label' => 'Users', 'href' => 'superuser/users', 'icon' => 'users'],
|
|
],
|
|
],
|
|
];
|