fix parent, teacher and admin pages

This commit is contained in:
root
2026-04-25 00:00:23 -04:00
parent 4cd98f1d30
commit eafe4eb134
30 changed files with 1566 additions and 105 deletions
@@ -20,7 +20,24 @@ class SchoolCalendarFormatterServiceTest extends TestCase
'notify_admin' => 0,
], 'parent');
$this->assertSame('#ffc107', $formatted['backgroundColor']);
$this->assertSame('#ffc107', $formatted['extendedProps']['backgroundColor']);
$this->assertSame('No School Day', $formatted['title']);
}
public function test_format_event_normalizes_iso_dates_to_plain_calendar_date(): void
{
$service = new SchoolCalendarFormatterService();
$formatted = $service->formatEvent([
'id' => 2,
'title' => 'First Day of School',
'date' => '2025-09-21T00:00:00.000000Z',
'no_school' => 0,
'notify_parent' => 0,
'notify_teacher' => 0,
'notify_admin' => 0,
], 'teacher');
$this->assertSame('2025-09-21', $formatted['start']);
}
}