gdc_cmod/app/Views/superuser/validate.php
mahdahar 33ccb976cc Refactor: Consolidate duplicate dashboard views into shared components
- Created shared dashboard components in app/Views/shared/:
  - dashboard_config.php, dashboard_table.php, dashboard_validate.php
  - dialog_sample.php, dialog_val.php, script_dashboard.php, script_validate.php
  - layout_dashboard.php
- Removed duplicate views from role-specific directories (admin, cs, lab, phlebo, superuser)
- Consolidated 575-line duplicate index.php files into shared components
- Updated controllers to use new shared view structure
- Added ApiValidateController for validation endpoints
- Reduced code duplication across 5 role-based dashboards

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-01-22 18:32:53 +07:00

20 lines
622 B
PHP

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