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']);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ class TeacherDashboardServiceTest extends TestCase
|
||||
$data = $service->classView($teacherId, $classSectionId);
|
||||
|
||||
$this->assertSame($classSectionId, $data['active_class_section_id']);
|
||||
$this->assertSame('1A', $data['class_section_name']);
|
||||
$this->assertNotEmpty($data['classes']);
|
||||
$this->assertNotEmpty($data['students']);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user