fix: set field before using

This commit is contained in:
Polianin Nikita 2024-08-27 21:53:39 +03:00
parent 660f251b40
commit 8c9b798bff

View File

@ -45,13 +45,13 @@ export class ScheduleComponent {
@ViewChild('tableHeader') childComponent!: TableHeaderComponent;
constructor(api: ScheduleService) {
this.calculateCurrentWeek();
this.startTerm = new Date(1, 1, 1);
api.pairPeriod().subscribe(date => {
this.pairPeriods = date;
});
api.startTerm().subscribe(date => {
this.startTerm = date.date;
this.calculateCurrentWeek();
});
}