feat: add import to excel
Made at the request of the customer
This commit is contained in:
@ -18,6 +18,7 @@ import {ProfessorService} from "@api/v1/professor.service";
|
||||
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";
|
||||
|
||||
export enum TabsSelect {
|
||||
Group,
|
||||
@ -48,7 +49,7 @@ export enum TabsSelect {
|
||||
})
|
||||
|
||||
export class TabsComponent implements AfterViewInit {
|
||||
@Output() eventResult = new EventEmitter<[TabsSelect, number, Observable<ScheduleResponse[]>]>();
|
||||
@Output() eventResult = new EventEmitter<[TabsSelect, number, Observable<ScheduleResponse[]>, ScheduleRequest]>();
|
||||
private currentTab: number = -1;
|
||||
|
||||
constructor(private scheduleApi: ScheduleService,
|
||||
@ -68,7 +69,8 @@ export class TabsComponent implements AfterViewInit {
|
||||
[
|
||||
TabsSelect.Group,
|
||||
event,
|
||||
this.scheduleApi.getByGroup(event)
|
||||
this.scheduleApi.getByGroup(event),
|
||||
{groups: [event]}
|
||||
]
|
||||
));
|
||||
|
||||
@ -76,7 +78,8 @@ export class TabsComponent implements AfterViewInit {
|
||||
[
|
||||
TabsSelect.Professor,
|
||||
event,
|
||||
this.scheduleApi.getByProfessor(event)
|
||||
this.scheduleApi.getByProfessor(event),
|
||||
{professors: [event]}
|
||||
]
|
||||
));
|
||||
|
||||
@ -84,7 +87,8 @@ export class TabsComponent implements AfterViewInit {
|
||||
[
|
||||
TabsSelect.LectureHall,
|
||||
event,
|
||||
this.scheduleApi.getByLectureHall(event)
|
||||
this.scheduleApi.getByLectureHall(event),
|
||||
{lectureHalls: [event]}
|
||||
]
|
||||
));
|
||||
|
||||
@ -196,16 +200,19 @@ export class TabsComponent implements AfterViewInit {
|
||||
protected readonly AuthRoles = AuthRoles;
|
||||
|
||||
protected otherFilter() {
|
||||
const data: ScheduleRequest = ({
|
||||
groups: this.groupEx.selectedIds,
|
||||
disciplines: this.disciplineEx.selectedIds,
|
||||
professors: this.professorEx.selectedIds,
|
||||
lectureHalls: this.lectureHallEx.selectedIds
|
||||
});
|
||||
|
||||
this.eventResult.emit(
|
||||
[
|
||||
TabsSelect.Other,
|
||||
0,
|
||||
this.scheduleApi.postSchedule(({
|
||||
groups: this.groupEx.selectedIds,
|
||||
disciplines: this.disciplineEx.selectedIds,
|
||||
professors: this.professorEx.selectedIds,
|
||||
lectureHalls: this.lectureHallEx.selectedIds
|
||||
}))
|
||||
this.scheduleApi.postSchedule(data),
|
||||
data
|
||||
]
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user