feat: show campus name with lecture hall
This commit is contained in:
@ -18,6 +18,7 @@ import {AuthRoles} from "@model/authRoles";
|
||||
import {HasRoleDirective} from "@/directives/has-role.directive";
|
||||
import {TabSelectType, TabStorageService} from "@service/tab-storage.service";
|
||||
import {ScheduleRequest} from "@api/v1/scheduleRequest";
|
||||
import {CampusService} from "@api/v1/campus.service";
|
||||
|
||||
export enum TabsSelect {
|
||||
Group,
|
||||
@ -43,7 +44,14 @@ export enum TabsSelect {
|
||||
],
|
||||
templateUrl: './tabs.component.html',
|
||||
styleUrl: './tabs.component.css',
|
||||
providers: [ScheduleService, DisciplineService, LectureHallService, GroupService, ProfessorService, TabStorageService]
|
||||
providers: [
|
||||
ScheduleService,
|
||||
DisciplineService,
|
||||
LectureHallService,
|
||||
GroupService,
|
||||
ProfessorService,
|
||||
TabStorageService,
|
||||
CampusService]
|
||||
})
|
||||
|
||||
export class TabsComponent implements AfterViewInit {
|
||||
@ -55,7 +63,8 @@ export class TabsComponent implements AfterViewInit {
|
||||
private lectureApi: LectureHallService,
|
||||
private groupApi: GroupService,
|
||||
private professorApi: ProfessorService,
|
||||
private tabStorage: TabStorageService) {
|
||||
private tabStorage: TabStorageService,
|
||||
private campusApi: CampusService) {
|
||||
}
|
||||
|
||||
ngAfterViewInit(): void {
|
||||
@ -159,12 +168,14 @@ export class TabsComponent implements AfterViewInit {
|
||||
}
|
||||
|
||||
protected async loadLectureHalls() {
|
||||
this.campusApi.getCampus().subscribe(campus => {
|
||||
this.lectureApi.getLectureHalls().subscribe(data => {
|
||||
this.lectureHallEx.Data = data.map(x => ({
|
||||
id: x.id,
|
||||
name: x.name
|
||||
name: x.name + ` (${campus.find(c => c.id == x.campusId)?.codeName})`
|
||||
}) as SelectData);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
protected async loadGroups() {
|
||||
|
Reference in New Issue
Block a user