diff --git a/src/components/schedule-tabs/schedule-tabs-professor/schedule-tabs-professor.component.ts b/src/components/schedule-tabs/schedule-tabs-professor/schedule-tabs-professor.component.ts index 51c61ff..644efce 100644 --- a/src/components/schedule-tabs/schedule-tabs-professor/schedule-tabs-professor.component.ts +++ b/src/components/schedule-tabs/schedule-tabs-professor/schedule-tabs-professor.component.ts @@ -5,12 +5,7 @@ import {MatAutocompleteModule, MatAutocompleteSelectedEvent} from "@angular/mate import {AsyncPipe} from "@angular/common"; import {DataSpinnerComponent} from "@component/data-spinner/data-spinner.component"; import {map, Observable, startWith} from "rxjs"; - - -export interface Professors { - id: number, - name: string -} +import {ProfessorResponse} from "@model/professorResponse"; @Component({ selector: 'app-schedule-tabs-professor', @@ -28,9 +23,9 @@ export interface Professors { }) export class ScheduleTabsProfessorComponent implements OnInit { protected teacherControl = new FormControl(); - protected filteredTeachers!: Observable; + protected filteredTeachers!: Observable; - @Input() teachers: Professors[] = []; + @Input() teachers: ProfessorResponse[] = []; @Output() professorSelected = new EventEmitter(); ngOnInit(): void { @@ -40,7 +35,7 @@ export class ScheduleTabsProfessorComponent implements OnInit { ); } - private _filterTeachers(value: string | number): Professors[] { + private _filterTeachers(value: string | number): ProfessorResponse[] { if (typeof value === 'string') { if (value === '') return []; const filterValue = value.toLowerCase();