- 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)
23 lines
785 B
PHP
23 lines
785 B
PHP
<?php
|
|
$config = include __DIR__ . '/../shared/dashboard_config.php';
|
|
$roleConfig = $config['phlebo'];
|
|
?>
|
|
<?= $this->extend('shared/layout_dashboard', ['roleConfig' => $roleConfig]); ?>
|
|
|
|
<?= $this->section('content'); ?>
|
|
<main class="p-4 flex-1 flex flex-col gap-2" x-data="dashboard">
|
|
<?= $this->include('shared/dashboard_table', ['config' => $roleConfig]); ?>
|
|
<?= $this->include('shared/dialog_sample', ['config' => $roleConfig]); ?>
|
|
<?= $this->include('shared/dialog_unval'); ?>
|
|
<?= $this->include('shared/dialog_preview'); ?>
|
|
</main>
|
|
<?= $this->endSection(); ?>
|
|
|
|
<?= $this->section('script'); ?>
|
|
<script type="module">
|
|
import Alpine from '<?= base_url("js/app.js"); ?>';
|
|
<?= $this->include('shared/script_dashboard'); ?>
|
|
Alpine.start();
|
|
</script>
|
|
<?= $this->endSection(); ?>
|