Initial commit: Add CodeIgniter 4 QC application with full MVC structure
- CodeIgniter 4 framework setup with SQL Server database config
- Models: Control, Test, Dept, Result, Daily/ Monthly entry models
- Controllers: Dashboard, Control, Test, Dept, Entry, Report, API endpoints
- Views: CRUD pages with modal dialogs, dashboard, reports
- Database: Migrations for control test and daily/monthly result tables
- Legacy v1 PHP application preserved in /v1 directory
- Documentation: AGENTS.md, VIEWS_RULES.md for development guidelines
2026-01-14 16:49:27 +07:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
use CodeIgniter\Router\RouteCollection;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @var RouteCollection $routes
|
|
|
|
|
*/
|
|
|
|
|
$routes->get('/', 'PageController::dashboard');
|
|
|
|
|
|
|
|
|
|
$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('/report', 'PageController::report');
|
|
|
|
|
$routes->get('/report/view', 'PageController::reportView');
|
|
|
|
|
|
|
|
|
|
$routes->group('api', function ($routes) {
|
|
|
|
|
$routes->get('dept', 'Api\DeptApiController::index');
|
|
|
|
|
$routes->get('dept/(:num)', 'Api\DeptApiController::show/$1');
|
|
|
|
|
$routes->post('dept', 'Api\DeptApiController::store');
|
2026-01-15 10:44:09 +07:00
|
|
|
$routes->patch('dept/(:num)', 'Api\DeptApiController::update/$1');
|
Initial commit: Add CodeIgniter 4 QC application with full MVC structure
- CodeIgniter 4 framework setup with SQL Server database config
- Models: Control, Test, Dept, Result, Daily/ Monthly entry models
- Controllers: Dashboard, Control, Test, Dept, Entry, Report, API endpoints
- Views: CRUD pages with modal dialogs, dashboard, reports
- Database: Migrations for control test and daily/monthly result tables
- Legacy v1 PHP application preserved in /v1 directory
- Documentation: AGENTS.md, VIEWS_RULES.md for development guidelines
2026-01-14 16:49:27 +07:00
|
|
|
$routes->delete('dept/(:num)', 'Api\DeptApiController::delete/$1');
|
|
|
|
|
|
|
|
|
|
$routes->get('test', 'Api\TestApiController::index');
|
|
|
|
|
$routes->get('test/(:num)', 'Api\TestApiController::show/$1');
|
2026-01-16 16:31:50 +07:00
|
|
|
$routes->post('test', 'Api\TestApiController::create');
|
2026-01-15 10:44:09 +07:00
|
|
|
$routes->patch('test/(:num)', 'Api\TestApiController::update/$1');
|
Initial commit: Add CodeIgniter 4 QC application with full MVC structure
- CodeIgniter 4 framework setup with SQL Server database config
- Models: Control, Test, Dept, Result, Daily/ Monthly entry models
- Controllers: Dashboard, Control, Test, Dept, Entry, Report, API endpoints
- Views: CRUD pages with modal dialogs, dashboard, reports
- Database: Migrations for control test and daily/monthly result tables
- Legacy v1 PHP application preserved in /v1 directory
- Documentation: AGENTS.md, VIEWS_RULES.md for development guidelines
2026-01-14 16:49:27 +07:00
|
|
|
$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');
|
2026-01-16 16:38:27 +07:00
|
|
|
$routes->post('control', 'Api\ControlApiController::create');
|
2026-01-15 10:44:09 +07:00
|
|
|
$routes->patch('control/(:num)', 'Api\ControlApiController::update/$1');
|
Initial commit: Add CodeIgniter 4 QC application with full MVC structure
- CodeIgniter 4 framework setup with SQL Server database config
- Models: Control, Test, Dept, Result, Daily/ Monthly entry models
- Controllers: Dashboard, Control, Test, Dept, Entry, Report, API endpoints
- Views: CRUD pages with modal dialogs, dashboard, reports
- Database: Migrations for control test and daily/monthly result tables
- Legacy v1 PHP application preserved in /v1 directory
- Documentation: AGENTS.md, VIEWS_RULES.md for development guidelines
2026-01-14 16:49:27 +07:00
|
|
|
$routes->delete('control/(:num)', 'Api\ControlApiController::delete/$1');
|
|
|
|
|
|
|
|
|
|
$routes->get('entry/controls', 'Api\EntryApiController::getControls');
|
|
|
|
|
$routes->get('entry/tests', 'Api\EntryApiController::getTests');
|
2026-01-16 16:51:34 +07:00
|
|
|
$routes->get('entry/monthly', 'Api\EntryApiController::getMonthlyData');
|
Initial commit: Add CodeIgniter 4 QC application with full MVC structure
- CodeIgniter 4 framework setup with SQL Server database config
- Models: Control, Test, Dept, Result, Daily/ Monthly entry models
- Controllers: Dashboard, Control, Test, Dept, Entry, Report, API endpoints
- Views: CRUD pages with modal dialogs, dashboard, reports
- Database: Migrations for control test and daily/monthly result tables
- Legacy v1 PHP application preserved in /v1 directory
- Documentation: AGENTS.md, VIEWS_RULES.md for development guidelines
2026-01-14 16:49:27 +07:00
|
|
|
$routes->post('entry/daily', 'Api\EntryApiController::saveDaily');
|
|
|
|
|
$routes->post('entry/monthly', 'Api\EntryApiController::saveMonthly');
|
|
|
|
|
$routes->post('entry/comment', 'Api\EntryApiController::saveComment');
|
|
|
|
|
});
|