- New EntryApiController (app/Controllers/Api/EntryApiController.php)
- Centralized API for entry operations (daily/monthly data retrieval and saving)
- getControls() - Fetch controls with optional date-based expiry filtering
- getTests() - Get tests associated with a control
- getDailyData() - Retrieve daily results for a date/control
- getMonthlyData() - Retrieve monthly results with per-day data and comments
- saveDaily() - Batch save daily results with validation
- saveMonthly() - Batch save monthly results with statistics
- New Monthly Entry View (app/Views/entry/monthly.php)
- Calendar grid interface for entering monthly QC results
- Month selector with quick navigation (prev/next/current)
- Test selector to filter controls
- 31-day grid per control with inline editing
- Visual QC range indicators (green for in-range, red for out-of-range)
- Weekend highlighting
- Per-control monthly comment field
- Keyboard shortcut (Ctrl+S) for saving
- Change tracking with pending save indicator
- Route Updates (app/Config/Routes.php)
- Added /entry/monthly page route
- Added /api/entry/daily GET endpoint
- Model Updates
- ResultsModel: Added updateMonthly() for upserting monthly results
- ResultCommentsModel: Added upsertMonthly() for monthly comments
41 lines
2.1 KiB
PHP
41 lines
2.1 KiB
PHP
<?= $this->extend("layout/main_layout"); ?>
|
|
|
|
<?= $this->section("content"); ?>
|
|
<main class="flex-1 p-6 overflow-auto">
|
|
<div class="flex justify-between items-center mb-6">
|
|
<div>
|
|
<h1 class="text-2xl font-bold text-base-content tracking-tight">QC Entry</h1>
|
|
<p class="text-sm mt-1 opacity-70">Record quality control results</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="bg-base-100 rounded-xl border border-base-300 shadow-sm p-6">
|
|
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
|
<a href="<?= base_url('/entry/daily') ?>" class="block p-6 rounded-xl border-2 border-dashed border-base-300 hover:border-blue-500 hover:bg-blue-50 transition-all group">
|
|
<div class="flex items-center gap-4">
|
|
<div class="w-14 h-14 rounded-xl bg-blue-100 flex items-center justify-center group-hover:bg-blue-200 transition-colors">
|
|
<i class="fa-solid fa-calendar-day text-2xl text-blue-600"></i>
|
|
</div>
|
|
<div>
|
|
<h3 class="font-semibold text-base-content">Daily Entry</h3>
|
|
<p class="text-sm text-base-content/60 mt-1">Record daily QC test results</p>
|
|
</div>
|
|
</div>
|
|
</a>
|
|
|
|
<a href="<?= base_url('/entry/monthly') ?>" class="block p-6 rounded-xl border-2 border-dashed border-base-300 hover:border-green-500 hover:bg-green-50 transition-all group">
|
|
<div class="flex items-center gap-4">
|
|
<div class="w-14 h-14 rounded-xl bg-green-100 flex items-center justify-center group-hover:bg-green-200 transition-colors">
|
|
<i class="fa-solid fa-calendar-range text-2xl text-green-600"></i>
|
|
</div>
|
|
<div>
|
|
<h3 class="font-semibold text-base-content">Monthly Entry</h3>
|
|
<p class="text-sm text-base-content/60 mt-1">Monthly QC results & comments</p>
|
|
</div>
|
|
</div>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</main>
|
|
<?= $this->endSection(); ?>
|