apply the school year concept
Tests / PHPUnit (push) Failing after 1m19s

This commit is contained in:
root
2026-07-14 00:59:00 -04:00
parent 504c3bc9f9
commit feb1b29a32
73 changed files with 4288 additions and 620 deletions
+10 -1
View File
@@ -62,7 +62,7 @@ class EventController extends ResourceController
$this->parentModel = new ParentModel();
$this->emailService = new EmailService();
$this->schoolYear = $this->configModel->getConfig('school_year');
$this->schoolYear = $this->currentSchoolYearName();
$this->semester = $this->configModel->getConfig('semester');
$this->categories = [
'workshops',
@@ -88,6 +88,15 @@ class EventController extends ResourceController
return $this->eventChargesHasCreatedBy;
}
private function currentSchoolYearName(): string
{
try {
return service('schoolYearContext')->resolve(service('request'))->yearName();
} catch (\Throwable $e) {
return (string) ($this->configModel->getConfig('school_year') ?? '');
}
}
private function eventChargesSupportsWaiverSigned(): bool
{
if ($this->eventChargesHasWaiverSigned !== null) {