fix logo circle, start email body
Deploy to Shared Hosting / Shared hosting deploy (push) Failing after 48s
Tests / PHPUnit (push) Failing after 1m17s

This commit is contained in:
root
2026-08-21 13:28:30 -04:00
parent d3da699e55
commit 23d1cbb64c
40 changed files with 303 additions and 157 deletions
@@ -222,7 +222,6 @@ $nonOverridableCodes = ['STUDENT_NOT_LINKED', 'SOURCE_YEAR_NOT_FOUND', 'TARGET_Y
$previewStudents = is_array($preview['students'] ?? null) ? $preview['students'] : [];
$hasGrantableStudent = false;
$openFlagCount = (int) ($openFlagCount ?? 0);
$followupCount = count($enrollmentFollowups ?? []);
$activeExceptionCount = 0;
foreach (($activeExceptions ?? []) as $exceptionRow) {
if (($exceptionRow['status'] ?? '') === 'active') {
@@ -273,15 +272,9 @@ $reasonCodes = is_array($exceptionReasonCodes ?? null) ? $exceptionReasonCodes :
<span class="badge rounded-pill <?= $openFlagCount > 0 ? 'bg-primary' : 'bg-secondary' ?> tab-count"><?= $openFlagCount ?></span>
</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="followup-tab" data-bs-toggle="tab" data-bs-target="#followup-pane" type="button" role="tab">
2. Follow-up
<span class="badge rounded-pill bg-secondary tab-count"><?= $followupCount ?></span>
</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="emails-tab" data-bs-toggle="tab" data-bs-target="#emails-pane" type="button" role="tab">
3. Parent emails
2. Parent emails
<span class="badge rounded-pill <?= $launchApproved ? 'bg-success' : ($launchReady ? 'bg-info text-dark' : 'bg-danger') ?> tab-count"><?= esc($emailStepLabel) ?></span>
</button>
</li>
@@ -348,8 +341,7 @@ $reasonCodes = is_array($exceptionReasonCodes ?? null) ? $exceptionReasonCodes :
<th>School ID</th>
<th>Issue</th>
<th>Details</th>
<th>Assigned</th>
<th>Created</th>
<th>Update by</th>
<th class="no-sort" style="min-width: 280px;">What to do</th>
</tr>
</thead>
@@ -380,7 +372,6 @@ $reasonCodes = is_array($exceptionReasonCodes ?? null) ? $exceptionReasonCodes :
<?php endif; ?>
</td>
<td><?= esc($flag['assignee_name'] ?: '') ?></td>
<td><?= esc(!empty($flag['created_at']) ? local_datetime($flag['created_at'], 'm-d-Y H:i') : '') ?></td>
<td class="action-stack">
<?php if (($flag['status'] ?? '') === 'open'): ?>
<?php if ($flagTypeValue === 'CLASS_REASSIGNMENT_REQUIRED'): ?>
@@ -435,67 +426,6 @@ $reasonCodes = is_array($exceptionReasonCodes ?? null) ? $exceptionReasonCodes :
</div>
</div>
<div class="tab-pane fade" id="followup-pane" role="tabpanel">
<h3 class="h5 mb-1">Enrollments still waiting on staff</h3>
<p class="text-muted">These students already have an enrollment record. If a class or exception is needed, handle it in Work queue.</p>
<div class="table-responsive mb-4">
<table id="enrollmentFollowupTable" class="table table-bordered table-striped align-middle enrollment-admin-datatable no-mgmt-sticky no-dt-fixedheader" data-no-mgmt-sticky data-no-dt-fixedheader>
<thead>
<tr>
<th>Student</th>
<th>School ID</th>
<th>Enrollment status</th>
<th>Decision</th>
<th>Placement</th>
<th>Class</th>
<th>Exception / reason</th>
<th>Updated</th>
</tr>
</thead>
<tbody>
<?php if (!empty($enrollmentFollowups)): ?>
<?php foreach ($enrollmentFollowups as $row): ?>
<?php
$statusValue = (string) ($row['enrollment_status'] ?? '');
$placementValue = (string) ($row['placement_status'] ?? '');
$decisionValue = (string) ($row['deliberation_decision'] ?? '');
$statusClass = match (strtolower($statusValue)) {
'review & decision' => 'bg-warning text-dark',
'waitlist' => 'bg-info text-dark',
'denied' => 'bg-danger',
default => 'bg-secondary',
};
?>
<tr>
<td>
<?= esc($row['student_name'] ?? '') ?>
<?= student_enrollment_status_button($row, $schoolYear ?? null) ?>
</td>
<td><?= esc($row['school_id'] ?? '') ?></td>
<td><span class="badge <?= esc($statusClass) ?>"><?= esc($statusValue) ?></span></td>
<td><?= esc($decisionValue !== '' ? ucwords(str_replace('_', ' ', $decisionValue)) : 'Pending') ?></td>
<td><?= esc(enrollment_admin_placement_label($placementValue)) ?></td>
<td><?= esc($row['class_section_name'] ?? '') ?></td>
<td>
<?php if (!empty($row['exception_required'])): ?>
<span class="badge bg-warning text-dark">Exception</span>
<?php endif; ?>
<?php
$exceptionReason = (string) ($row['exception_reason'] ?? '');
$reasonParts = array_values(array_filter(array_map('trim', explode(',', $exceptionReason))));
$looksLikeCodes = $reasonParts !== [] && count(array_filter($reasonParts, static fn (string $part): bool => (bool) preg_match('/^[A-Z0-9_]+$/', $part))) === count($reasonParts);
?>
<div class="small"><?= esc($looksLikeCodes ? implode(', ', array_map('enrollment_admin_flag_label', $reasonParts)) : $exceptionReason) ?></div>
</td>
<td><?= esc(!empty($row['updated_at']) ? local_datetime($row['updated_at'], 'm-d-Y H:i') : '') ?></td>
</tr>
<?php endforeach; ?>
<?php endif; ?>
</tbody>
</table>
</div>
</div>
<div class="tab-pane fade" id="exceptions-pane" role="tabpanel">
<h3 class="h5 mb-1">Family exception tools</h3>
<p class="text-muted">Use the lookup to grant a family exception after reviewing the matching work queue item. Saved exceptions stay here for audit and revocation.</p>
@@ -904,7 +834,6 @@ $reasonCodes = is_array($exceptionReasonCodes ?? null) ? $exceptionReasonCodes :
var tableMessages = {
enrollmentEmailExamplesTable: 'No parent decision email examples found for this school year.',
enrollmentFollowupTable: 'No enrollment records need follow-up for this school year.',
enrollmentFlagsTable: 'No students with enrollment blockages were found for these filters.',
enrollmentFamilyEligibilityTable: 'No linked students found for this parent.',
enrollmentExceptionsTable: 'No enrollment exceptions found for this school year.',
@@ -945,11 +874,27 @@ $reasonCodes = is_array($exceptionReasonCodes ?? null) ? $exceptionReasonCodes :
});
}
function activateTabFromHash() {
if (!window.bootstrap || !window.bootstrap.Tab || !window.location.hash) {
return;
}
var target = window.location.hash;
var trigger = document.querySelector('[data-bs-toggle="tab"][data-bs-target="' + target + '"]');
if (trigger) {
window.bootstrap.Tab.getOrCreateInstance(trigger).show();
}
}
mergeExceptionPaneIntoWorkQueue();
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', initEnrollmentAdminTables);
document.addEventListener('DOMContentLoaded', function () {
activateTabFromHash();
initEnrollmentAdminTables();
});
} else {
activateTabFromHash();
initEnrollmentAdminTables();
}
})();