gdc_cmod/app/Views/superuser/validate.php
mahdahar 3cf4cc7f3f feat: Implement audit trail system for dual-level validation workflow
This commit adds comprehensive audit logging for specimen requests and sample collection activities across all roles.
Changes Summary:
New Features:
- Added AUDIT_EVENTS table schema for tracking validation and sample collection events
- Created ApiRequestsAuditController with /api/requests/(:any)/audit endpoint to retrieve audit history
- Added dialog_audit.php view component for displaying audit trails in UI
- Integrated audit logging into validation workflow (VAL1, VAL2, UNVAL events)
Database:
- Created AUDIT_EVENTS table with columns: ACCESSNUMBER, EVENT_TYPE, USERID, EVENT_AT, REASON
- Supports tracking validation events and sample collection actions
Controllers:
- RequestsController: Now inserts audit records for all validation operations
- ApiRequestsAuditController: New API controller returning validation and sample collection history
Routes:
- Added GET /api/requests/(:any)/audit endpoint for retrieving audit trail
- Removed DELETE /api/samples/collect/(:any) endpoint (uncollect functionality)
Views Refactoring:
- Consolidated dashboard layouts into shared components:
  - layout.php (from layout_dashboard.php)
  - script_requests.php (from script_dashboard.php)
  - script_validation.php (from script_validate.php)
  - content_requests.php (from dashboard_table.php)
  - content_validation.php (from dashboard_validate.php)
- Added content_validation_new.php for enhanced validation interface
2026-01-23 16:41:12 +07:00

19 lines
603 B
PHP

<?php
$config = include __DIR__ . '/../shared/config.php';
$roleConfig = $config['superuser'];
?>
<?= $this->extend('shared/layout', ['roleConfig' => $roleConfig]); ?>
<?= $this->section('content'); ?>
<main class="p-4 flex-1 flex flex-col gap-2" x-data="validatePage">
<?= $this->include('shared/content_validation', ['config' => $roleConfig]); ?>
</main>
<?= $this->endSection(); ?>
<?= $this->section('script'); ?>
<script type="module">
import Alpine from '<?= base_url("js/app.js"); ?>';
<?= $this->include('shared/script_validation'); ?>
Alpine.start();
</script>
<?= $this->endSection(); ?>