mahdahar 0fad3baab7 feat: add PDF batch generation page for superuser
- Add /superuser/pdf-batch page with textarea input for access numbers
- Create API endpoint /api/superuser/pdf-batch to process batch PDF generation
- Use report/{id}/pdf endpoint for authenticated PDF generation
- Show results table with success/failed status, language, and type (new/regen)
- Remove deprecated /batch/pdf endpoint
- Add PDF Batch menu item to superuser navigation
2026-03-11 09:34:11 +07:00

90 lines
3.3 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',
'previewEnabled' => true,
'sampleDialog' => [
'commentEditable' => true,
'showCollectButtons' => true,
'defaultPrinter' => 'lab',
],
'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' => [
'title' => 'CS Dashboard',
'previewEnabled' => false,
'sampleDialog' => [
'commentEditable' => false,
'showCollectButtons' => false,
'defaultPrinter' => 'reception',
],
'menuItems' => [
['label' => 'Dashboard', 'href' => 'cs', 'icon' => 'chart-bar'],
],
],
'lab' => [
'title' => 'Lab Analyst Dashboard',
'previewEnabled' => true,
'sampleDialog' => [
'commentEditable' => true,
'showCollectButtons' => true,
'defaultPrinter' => 'lab',
],
'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' => [
'title' => 'Phlebotomist Dashboard',
'previewEnabled' => false,
'sampleDialog' => [
'commentEditable' => false,
'showCollectButtons' => true,
'defaultPrinter' => 'phlebo',
],
'menuItems' => [
['label' => 'Dashboard', 'href' => 'phlebo/dashboard', 'icon' => 'chart-bar'],
['label' => 'Collect Samples', 'href' => 'phlebo/collect', 'icon' => 'vial'],
],
],
'superuser' => [
'title' => 'Superuser Dashboard',
'previewEnabled' => true,
'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'],
['label' => 'PDF Batch', 'href' => 'superuser/pdf-batch', 'icon' => 'file-pdf'],
['label' => 'Reports', 'href' => 'http://glenlis/report2/', 'icon' => 'book'],
],
],
];