Fix semester context, attendance rosters, and billing workflows
- load global semester helpers consistently and use date-based semester defaults - fix grading and daily attendance duplicate student/section rows - keep attendance violations scoped to the current semester by default - update invoice, refund, discount, payment, and financial aid flows - add configuration cleanup migrations for duplicate calendar/semester keys - refresh parent registration/report-card and print request handling - update related models, services, views, cron notes, and test coverage
This commit is contained in:
@@ -1,4 +1,81 @@
|
||||
<?= $this->extend('layout/main_layout') ?>
|
||||
<?= $this->section('styles') ?>
|
||||
<style>
|
||||
@media (max-width: 575.98px) {
|
||||
.parent-report-cards-table {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.parent-report-cards-table thead {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.parent-report-cards-table tbody,
|
||||
.parent-report-cards-table tr,
|
||||
.parent-report-cards-table td {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.parent-report-cards-table tr {
|
||||
border: 1px solid #dee2e6;
|
||||
border-radius: 8px;
|
||||
margin-bottom: .85rem;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.parent-report-cards-table td {
|
||||
align-items: flex-start;
|
||||
border-bottom: 1px solid #eef1f3;
|
||||
display: flex;
|
||||
gap: .75rem;
|
||||
justify-content: space-between;
|
||||
padding: .75rem;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.parent-report-cards-table td:last-child {
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
.parent-report-cards-table td::before {
|
||||
color: #6c757d;
|
||||
content: attr(data-label);
|
||||
flex: 0 0 38%;
|
||||
font-size: .8rem;
|
||||
font-weight: 700;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.parent-report-cards-table td > * {
|
||||
max-width: 62%;
|
||||
}
|
||||
|
||||
.parent-report-cards-table td[data-label="Action"] {
|
||||
display: block;
|
||||
text-align: left !important;
|
||||
}
|
||||
|
||||
.parent-report-cards-table td[data-label="Action"]::before {
|
||||
display: block;
|
||||
margin-bottom: .5rem;
|
||||
}
|
||||
|
||||
.parent-report-cards-table td[data-label="Action"] > * {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.parent-report-cards-table td[data-label="Action"] form {
|
||||
align-items: stretch !important;
|
||||
display: flex !important;
|
||||
flex-direction: column;
|
||||
margin-left: 0 !important;
|
||||
margin-top: .5rem;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<?= $this->endSection() ?>
|
||||
<?= $this->section('content') ?>
|
||||
<?php
|
||||
$isEditable = (bool) ($isEditable ?? true);
|
||||
@@ -30,7 +107,7 @@
|
||||
<div class="alert alert-info">No students available for report cards.</div>
|
||||
<?php else: ?>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered align-middle">
|
||||
<table class="table table-striped table-bordered align-middle parent-report-cards-table">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th>Student</th>
|
||||
@@ -51,10 +128,10 @@
|
||||
$hasReport = !empty(($reportAvailableMap ?? [])[$sid]);
|
||||
?>
|
||||
<tr>
|
||||
<td><?= esc(trim(($student['firstname'] ?? '') . ' ' . ($student['lastname'] ?? ''))) ?></td>
|
||||
<td><?= esc($student['class_section_name'] ?? 'N/A') ?></td>
|
||||
<td><?= $viewedAt ? esc(local_datetime($viewedAt, 'm-d-Y H:i')) : 'Not viewed' ?></td>
|
||||
<td>
|
||||
<td data-label="Student"><?= esc(trim(($student['firstname'] ?? '') . ' ' . ($student['lastname'] ?? ''))) ?></td>
|
||||
<td data-label="Class Section"><?= esc($student['class_section_name'] ?? 'N/A') ?></td>
|
||||
<td data-label="Viewed"><?= $viewedAt ? esc(local_datetime($viewedAt, 'm-d-Y H:i')) : 'Not viewed' ?></td>
|
||||
<td data-label="Signature">
|
||||
<?php if ($signedAt): ?>
|
||||
<?= esc($signedName ?: 'Signed') ?><br>
|
||||
<small class="text-muted"><?= esc(local_datetime($signedAt, 'm-d-Y H:i')) ?></small>
|
||||
@@ -62,7 +139,7 @@
|
||||
<span class="text-muted">Not signed</span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class="text-end">
|
||||
<td class="text-end" data-label="Action">
|
||||
<?php if ($hasReport): ?>
|
||||
<a class="btn btn-sm btn-outline-primary" target="_blank" href="<?= base_url('parent/report-cards/view/' . $sid) ?>">View Report</a>
|
||||
<?php else: ?>
|
||||
|
||||
Reference in New Issue
Block a user