fadd column to enrollment table
This commit is contained in:
@@ -825,16 +825,12 @@ final class EnrollmentTransitionService
|
||||
private function firstEnrollmentPlacement(array $student, string $targetSchoolYear): array
|
||||
{
|
||||
$grade = $this->classBaseName((string) ($student['registration_grade'] ?? ''));
|
||||
$targetClass = $grade !== '' ? $this->classByName($grade, $targetSchoolYear) : null;
|
||||
$targetSection = is_array($targetClass)
|
||||
? $this->baseSectionForClass((int) ($targetClass['id'] ?? 0), $targetSchoolYear)
|
||||
: null;
|
||||
|
||||
return [
|
||||
'assigned_grade_id' => $targetClass['id'] ?? null,
|
||||
'assigned_grade_name' => $targetClass['class_name'] ?? ($grade !== '' ? $grade : null),
|
||||
'assigned_class_section_id' => $targetSection['class_section_id'] ?? null,
|
||||
'placement_status' => $targetSection === null ? 'manual_class_required' : 'same_class_assigned',
|
||||
'assigned_grade_id' => null,
|
||||
'assigned_grade_name' => $grade !== '' ? $grade : null,
|
||||
'assigned_class_section_id' => null,
|
||||
'placement_status' => 'manual_class_required',
|
||||
'flags' => [],
|
||||
];
|
||||
}
|
||||
|
||||
@@ -35,16 +35,17 @@
|
||||
<table id="enrollmentTable" class="table table-bordered table-striped mt-4 align-middle">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Registration Date</th>
|
||||
<th>Parent/Guardian</th>
|
||||
<th>Register Date</th>
|
||||
<th>Parent</th>
|
||||
<th>Student Name</th>
|
||||
<th>School ID</th>
|
||||
<th>Age</th>
|
||||
<th>New Student</th>
|
||||
<th>Current Class</th>
|
||||
<th>Actual Status</th>
|
||||
<th>Update Enrollment Status</th>
|
||||
<th>Assign Class</th>
|
||||
<th>Age</th>
|
||||
<th>New Student</th>
|
||||
<th>Registered Class</th>
|
||||
<th>Current Class</th>
|
||||
<th>Actual Status</th>
|
||||
<th>Update Status</th>
|
||||
<th>Assign Class</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -100,11 +101,14 @@
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
|
||||
<!-- Class -->
|
||||
<td><?= esc($student['class_section'] ?? 'Class not Assigned') ?></td>
|
||||
<!-- Registered Class -->
|
||||
<td><?= esc(trim((string)($student['registration_grade'] ?? '')) !== '' ? (string)$student['registration_grade'] : '-') ?></td>
|
||||
|
||||
<!-- Enrollment Status -->
|
||||
<td>
|
||||
<!-- Class -->
|
||||
<td><?= esc($student['class_section'] ?? 'Class not Assigned') ?></td>
|
||||
|
||||
<!-- Enrollment Status -->
|
||||
<td>
|
||||
<?php
|
||||
$status = $student['enrollment_status'] ?? 'not enrolled';
|
||||
switch ($status) {
|
||||
@@ -185,11 +189,11 @@
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php else: ?>
|
||||
<tr>
|
||||
<td colspan="10">No students available.</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<tr>
|
||||
<td colspan="11">No students available.</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@@ -383,10 +387,10 @@
|
||||
dom: "<'row mb-2'<'col-sm-6'l><'col-sm-6'f>>" + "t" +
|
||||
"<'row mt-2'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
|
||||
// Disable sort/search on interactive columns (status select, assign select)
|
||||
columnDefs: [
|
||||
{ targets: [8, 9], orderable: false, searchable: false },
|
||||
{ targets: [0, 1, 2, 3, 4, 5, 6, 7], render: function(data, type) {
|
||||
// Disable sort/search on interactive columns (status select, assign select)
|
||||
columnDefs: [
|
||||
{ targets: [9, 10], orderable: false, searchable: false },
|
||||
{ targets: [0, 1, 2, 3, 4, 5, 6, 7, 8], render: function(data, type) {
|
||||
if (type === 'filter' || type === 'sort' || type === 'type') {
|
||||
return stripHtml(data);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user