tinyqc/app/Config/Routes.php
mahdahar 0a96b04bdf feat: Implement Monthly Entry interface and consolidate Entry API controller
- Implement Monthly Entry interface with full data entry grid
    - Add batch save with validation and statistics for monthly results
    - Support daily comments per day per test
    - Add result status indicators and validation summaries
  - Consolidate Entry API controller
    - Refactor EntryApiController to handle both daily/monthly operations
    - Add batch save endpoints with comprehensive validation
    - Implement statistics calculation for result entries
  - Add Control Test master data management
    - Create MasterControlsController for CRUD operations
    - Add dialog forms for control test configuration
    - Implement control-test associations with QC parameters
  - Refactor Report API and views
    - Implement new report index with Levey-Jennings charts placeholder
    - Add monthly report functionality with result statistics
    - Include QC summary with mean, SD, and CV calculations
  - UI improvements
    - Overhaul dashboard with improved layout
    - Update daily entry interface with inline editing
    - Enhance master data management with DaisyUI components
    - Add proper modal dialogs and form validation
  - Database and seeding
    - Update migration for control_tests table schema
    - Remove redundant migration and seed files
    - Update seeders with comprehensive test data
  - Documentation
    - Update CLAUDE.md with comprehensive project documentation
    - Add architecture overview and conventions

  BREAKING CHANGES:
  - Refactored Entry API endpoints structure
  - Removed ReportApiController::view() - consolidated into new report index
2026-01-21 13:41:37 +07:00

92 lines
4.8 KiB
PHP

<?php
use CodeIgniter\Router\RouteCollection;
/**
* @var RouteCollection $routes
*/
$routes->get('/', 'PageController::dashboard');
$routes->get('/master/dept', 'PageController::masterDept');
$routes->get('/master/test', 'PageController::masterTest');
$routes->get('/master/control', 'PageController::masterControl');
$routes->get('/master/control-tests', 'PageController::controlTests');
$routes->get('/dept', 'PageController::dept');
$routes->get('/test', 'PageController::test');
$routes->get('/control', 'PageController::control');
$routes->get('/entry', 'PageController::entry');
$routes->get('/entry/daily', 'PageController::entryDaily');
$routes->get('/entry/monthly', 'PageController::entryMonthly');
$routes->get('/report', 'PageController::report');
$routes->get('/report/view', 'PageController::reportView');
$routes->group('api', function ($routes) {
$routes->get('dashboard/recent', 'Api\DashboardApiController::getRecent');
$routes->get('dept', 'Api\DeptApiController::index');
$routes->get('dept/(:num)', 'Api\DeptApiController::show/$1');
$routes->post('dept', 'Api\DeptApiController::store');
$routes->patch('dept/(:num)', 'Api\DeptApiController::update/$1');
$routes->delete('dept/(:num)', 'Api\DeptApiController::delete/$1');
$routes->get('test', 'Api\TestApiController::index');
$routes->get('test/(:num)', 'Api\TestApiController::show/$1');
$routes->post('test', 'Api\TestApiController::create');
$routes->patch('test/(:num)', 'Api\TestApiController::update/$1');
$routes->delete('test/(:num)', 'Api\TestApiController::delete/$1');
$routes->get('control', 'Api\ControlApiController::index');
$routes->get('control/(:num)', 'Api\ControlApiController::show/$1');
$routes->get('control/(:num)/tests', 'Api\ControlApiController::getTests/$1');
$routes->post('control', 'Api\ControlApiController::create');
$routes->patch('control/(:num)', 'Api\ControlApiController::update/$1');
$routes->delete('control/(:num)', 'Api\ControlApiController::delete/$1');
$routes->get('entry/controls', 'Api\EntryApiController::getControls');
$routes->get('entry/tests', 'Api\EntryApiController::getTests');
$routes->get('entry/daily', 'Api\EntryApiController::getDailyData');
$routes->get('entry/monthly', 'Api\EntryApiController::getMonthlyData');
$routes->post('entry/daily', 'Api\EntryApiController::saveDaily');
$routes->post('entry/monthly', 'Api\EntryApiController::saveMonthly');
$routes->post('entry/comment', 'Api\EntryApiController::saveComment');
});
$routes->group('api/master', function ($routes) {
$routes->get('depts', 'Master\MasterDeptsController::index');
$routes->get('depts/(:num)', 'Master\MasterDeptsController::show/$1');
$routes->post('depts', 'Master\MasterDeptsController::create');
$routes->patch('depts/(:num)', 'Master\MasterDeptsController::update/$1');
$routes->delete('depts/(:num)', 'Master\MasterDeptsController::delete/$1');
$routes->get('controls', 'Master\MasterControlsController::index');
$routes->get('controls/(:num)', 'Master\MasterControlsController::show/$1');
$routes->post('controls', 'Master\MasterControlsController::create');
$routes->patch('controls/(:num)', 'Master\MasterControlsController::update/$1');
$routes->delete('controls/(:num)', 'Master\MasterControlsController::delete/$1');
$routes->get('tests', 'Master\MasterTestsController::index');
$routes->get('tests/(:num)', 'Master\MasterTestsController::show/$1');
$routes->post('tests', 'Master\MasterTestsController::create');
$routes->patch('tests/(:num)', 'Master\MasterTestsController::update/$1');
$routes->delete('tests/(:num)', 'Master\MasterTestsController::delete/$1');
});
$routes->group('api/qc', function ($routes) {
$routes->get('control-tests', 'Qc\ControlTestsController::index');
$routes->get('control-tests/(:num)', 'Qc\ControlTestsController::show/$1');
$routes->post('control-tests', 'Qc\ControlTestsController::create');
$routes->patch('control-tests/(:num)', 'Qc\ControlTestsController::update/$1');
$routes->delete('control-tests/(:num)', 'Qc\ControlTestsController::delete/$1');
$routes->get('results', 'Qc\ResultsController::index');
$routes->get('results/(:num)', 'Qc\ResultsController::show/$1');
$routes->post('results', 'Qc\ResultsController::create');
$routes->patch('results/(:num)', 'Qc\ResultsController::update/$1');
$routes->delete('results/(:num)', 'Qc\ResultsController::delete/$1');
$routes->get('result-comments', 'Qc\ResultCommentsController::index');
$routes->get('result-comments/(:num)', 'Qc\ResultCommentsController::show/$1');
$routes->post('result-comments', 'Qc\ResultCommentsController::create');
$routes->patch('result-comments/(:num)', 'Qc\ResultCommentsController::update/$1');
$routes->delete('result-comments/(:num)', 'Qc\ResultCommentsController::delete/$1');
});