fix parent, teacher and admin pages
This commit is contained in:
@@ -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']);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user