Compare commits
No commits in common. "ebf1066610703372ac3f2015dbbe15c690a92254" and "660f251b407151049db1258506b4b7978110fd64" have entirely different histories.
ebf1066610
...
660f251b40
@ -3,29 +3,34 @@
|
|||||||
(selectedTabChange)="chooseTabs($event.index)">
|
(selectedTabChange)="chooseTabs($event.index)">
|
||||||
<mat-tab label="Группа">
|
<mat-tab label="Группа">
|
||||||
<div>
|
<div>
|
||||||
<app-group #groupTab (eventResult)="groupSelected($event)"/>
|
<app-group #groupTab (eventResult)="groupSelected($event)"/>
|
||||||
</div>
|
</div>
|
||||||
</mat-tab>
|
</mat-tab>
|
||||||
<mat-tab label="Преподаватель">
|
<mat-tab label="Преподаватель">
|
||||||
<div>
|
<div>
|
||||||
<app-professor #professorTab (eventResult)="professorSelected($event)"/>
|
<app-professor #professorTab (eventResult)="professorSelected($event)"/>
|
||||||
</div>
|
</div>
|
||||||
</mat-tab>
|
</mat-tab>
|
||||||
<mat-tab label="Кабинет">
|
<mat-tab label="Кабинет">
|
||||||
<div>
|
<div>
|
||||||
<app-lecture-hall #lectureHallTab (eventResult)="lectureHallSelected($event)"/>
|
<app-lecture-hall #lectureHallTab (eventResult)="lectureHallSelected($event)"/>
|
||||||
</div>
|
</div>
|
||||||
</mat-tab>
|
</mat-tab>
|
||||||
|
<!--
|
||||||
<mat-tab label="Другое" *appHasRole="AuthRoles.Admin">
|
<mat-tab label="Другое">
|
||||||
<div class="margin-other-button">
|
<div class="margin-other-button">
|
||||||
<app-other idButton="disciplines-button" textButton="Дисциплины" #discipline (retryLoadData)="loadDisciplines()"/>
|
<app-other idButton="disciplines-button" textButton="Дисциплины" #discipline [dataLoaded]="disciplinesLoaded"
|
||||||
<app-other idButton="lecture-button" textButton="Кабинеты" #lecture (retryLoadData)="loadLectureHalls()"/>
|
(retryLoadData)="loadDisciplines()"/>
|
||||||
<app-other idButton="group-button" textButton="Группы" #group (retryLoadData)="loadGroups()"/>
|
<app-other idButton="lecture-button" textButton="Кабинеты" #lecture
|
||||||
<app-other idButton="professor-button" textButton="Профессоры" #professor (retryLoadData)="loadProfessors()"/>
|
[dataLoaded]="campusesLoaded && lectureHallsLoaded" (retryLoadData)="loadLectureHalls()"/>
|
||||||
|
<app-other idButton="group-button" textButton="Группы" #group [dataLoaded]="facultiesLoaded && groupLoaded"
|
||||||
|
(retryLoadData)="loadGroups()"/>
|
||||||
|
<app-other idButton="professor-button" textButton="Профессоры" #professor [dataLoaded]="professorsLoaded"
|
||||||
|
(retryLoadData)="professorsLoad()"/>
|
||||||
<section>
|
<section>
|
||||||
<button mat-flat-button (click)="otherFilter()">Отфильтровать</button>
|
<button mat-flat-button>Отфильтровать</button>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
</mat-tab>
|
</mat-tab>
|
||||||
|
-->
|
||||||
</mat-tab-group>
|
</mat-tab-group>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {AfterViewInit, Component, EventEmitter, Output, ViewChild} from '@angular/core';
|
import {AfterViewInit, Component, EventEmitter, Output, ViewChild} from '@angular/core';
|
||||||
import {OtherComponent, SelectData} from "@component/schedule/tabs/other/other.component";
|
import {OtherComponent, SelectData} from "@component/schedule/tabs/other/other.component";
|
||||||
import {MatTab, MatTabGroup} from "@angular/material/tabs";
|
import {MatTab, MatTabGroup} from "@angular/material/tabs";
|
||||||
import {Observable} from "rxjs";
|
import {map, Observable} from "rxjs";
|
||||||
import {FormsModule, ReactiveFormsModule} from "@angular/forms";
|
import {FormsModule, ReactiveFormsModule} from "@angular/forms";
|
||||||
import {MatButton} from "@angular/material/button";
|
import {MatButton} from "@angular/material/button";
|
||||||
import {DataSpinnerComponent} from "@component/common/data-spinner/data-spinner.component";
|
import {DataSpinnerComponent} from "@component/common/data-spinner/data-spinner.component";
|
||||||
@ -74,6 +74,30 @@ export class TabsComponent implements AfterViewInit {
|
|||||||
TabsSelect.Group,
|
TabsSelect.Group,
|
||||||
id,
|
id,
|
||||||
this.scheduleApi.getByGroup(id)
|
this.scheduleApi.getByGroup(id)
|
||||||
|
.pipe(
|
||||||
|
map(g =>
|
||||||
|
g.map(data =>
|
||||||
|
({
|
||||||
|
dayOfWeek: data.dayOfWeek,
|
||||||
|
pairNumber: data.pairNumber,
|
||||||
|
isEven: data.isEven,
|
||||||
|
discipline: data.discipline,
|
||||||
|
disciplineId: data.disciplineId,
|
||||||
|
isExcludedWeeks: data.isExcludedWeeks,
|
||||||
|
weeks: data.weeks,
|
||||||
|
typeOfOccupations: data.typeOfOccupations,
|
||||||
|
group: data.group,
|
||||||
|
groupId: data.groupId,
|
||||||
|
lectureHalls: data.lectureHalls,
|
||||||
|
lectureHallsId: data.lectureHallsId,
|
||||||
|
professors: data.professors,
|
||||||
|
professorsId: data.professorsId,
|
||||||
|
campus: data.campus,
|
||||||
|
campusId: data.campusId,
|
||||||
|
linkToMeet: data.linkToMeet
|
||||||
|
}))
|
||||||
|
)
|
||||||
|
)
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -84,6 +108,30 @@ export class TabsComponent implements AfterViewInit {
|
|||||||
TabsSelect.Professor,
|
TabsSelect.Professor,
|
||||||
id,
|
id,
|
||||||
this.scheduleApi.getByProfessor(id)
|
this.scheduleApi.getByProfessor(id)
|
||||||
|
.pipe(
|
||||||
|
map(p =>
|
||||||
|
p.map(data =>
|
||||||
|
({
|
||||||
|
dayOfWeek: data.dayOfWeek,
|
||||||
|
pairNumber: data.pairNumber,
|
||||||
|
isEven: data.isEven,
|
||||||
|
discipline: data.discipline,
|
||||||
|
disciplineId: data.disciplineId,
|
||||||
|
isExcludedWeeks: data.isExcludedWeeks,
|
||||||
|
weeks: data.weeks,
|
||||||
|
typeOfOccupations: data.typeOfOccupations,
|
||||||
|
group: data.group,
|
||||||
|
groupId: data.groupId,
|
||||||
|
lectureHalls: data.lectureHalls,
|
||||||
|
lectureHallsId: data.lectureHallsId,
|
||||||
|
professors: data.professors,
|
||||||
|
professorsId: data.professorsId,
|
||||||
|
campus: data.campus,
|
||||||
|
campusId: data.campusId,
|
||||||
|
linkToMeet: data.linkToMeet
|
||||||
|
}))
|
||||||
|
)
|
||||||
|
)
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -94,6 +142,30 @@ export class TabsComponent implements AfterViewInit {
|
|||||||
TabsSelect.LectureHall,
|
TabsSelect.LectureHall,
|
||||||
id,
|
id,
|
||||||
this.scheduleApi.getByLectureHall(id)
|
this.scheduleApi.getByLectureHall(id)
|
||||||
|
.pipe(
|
||||||
|
map(lh =>
|
||||||
|
lh.map(data =>
|
||||||
|
({
|
||||||
|
dayOfWeek: data.dayOfWeek,
|
||||||
|
pairNumber: data.pairNumber,
|
||||||
|
isEven: data.isEven,
|
||||||
|
discipline: data.discipline,
|
||||||
|
disciplineId: data.disciplineId,
|
||||||
|
isExcludedWeeks: data.isExcludedWeeks,
|
||||||
|
weeks: data.weeks,
|
||||||
|
typeOfOccupations: data.typeOfOccupations,
|
||||||
|
group: data.group,
|
||||||
|
groupId: data.groupId,
|
||||||
|
lectureHalls: data.lectureHalls,
|
||||||
|
lectureHallsId: data.lectureHallsId,
|
||||||
|
professors: data.professors,
|
||||||
|
professorsId: data.professorsId,
|
||||||
|
campus: data.campus,
|
||||||
|
campusId: data.campusId,
|
||||||
|
linkToMeet: data.linkToMeet
|
||||||
|
}))
|
||||||
|
)
|
||||||
|
)
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -168,19 +240,4 @@ export class TabsComponent implements AfterViewInit {
|
|||||||
|
|
||||||
@ViewChild('tabGroup') tabs!: MatTabGroup;
|
@ViewChild('tabGroup') tabs!: MatTabGroup;
|
||||||
protected readonly AuthRoles = AuthRoles;
|
protected readonly AuthRoles = AuthRoles;
|
||||||
|
|
||||||
protected otherFilter() {
|
|
||||||
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
|
|
||||||
}))
|
|
||||||
]
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -45,13 +45,13 @@ export class ScheduleComponent {
|
|||||||
@ViewChild('tableHeader') childComponent!: TableHeaderComponent;
|
@ViewChild('tableHeader') childComponent!: TableHeaderComponent;
|
||||||
|
|
||||||
constructor(api: ScheduleService) {
|
constructor(api: ScheduleService) {
|
||||||
|
this.calculateCurrentWeek();
|
||||||
this.startTerm = new Date(1, 1, 1);
|
this.startTerm = new Date(1, 1, 1);
|
||||||
api.pairPeriod().subscribe(date => {
|
api.pairPeriod().subscribe(date => {
|
||||||
this.pairPeriods = date;
|
this.pairPeriods = date;
|
||||||
});
|
});
|
||||||
api.startTerm().subscribe(date => {
|
api.startTerm().subscribe(date => {
|
||||||
this.startTerm = date.date;
|
this.startTerm = date.date;
|
||||||
this.calculateCurrentWeek();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,25 +13,25 @@
|
|||||||
/**
|
/**
|
||||||
* Represents a request object for retrieving schedules based on various filters.
|
* Represents a request object for retrieving schedules based on various filters.
|
||||||
*/
|
*/
|
||||||
export interface ScheduleRequest {
|
export interface ScheduleRequest {
|
||||||
/**
|
/**
|
||||||
* Gets or sets an array of group IDs.
|
* Gets or sets an array of group IDs.
|
||||||
*/
|
*/
|
||||||
groups?: Array<number>;
|
groups?: Array<number>;
|
||||||
/**
|
/**
|
||||||
* Gets or sets a value indicating whether to retrieve schedules for even weeks.
|
* Gets or sets a value indicating whether to retrieve schedules for even weeks.
|
||||||
*/
|
*/
|
||||||
isEven?: boolean;
|
isEven?: boolean;
|
||||||
/**
|
/**
|
||||||
* Gets or sets an array of discipline IDs.
|
* Gets or sets an array of discipline IDs.
|
||||||
*/
|
*/
|
||||||
disciplines?: Array<number>;
|
disciplines?: Array<number>;
|
||||||
/**
|
/**
|
||||||
* Gets or sets an array of professor IDs.
|
* Gets or sets an array of professor IDs.
|
||||||
*/
|
*/
|
||||||
professors?: Array<number>;
|
professors?: Array<number>;
|
||||||
/**
|
/**
|
||||||
* Gets or sets an array of lecture hall IDs.
|
* Gets or sets an array of lecture hall IDs.
|
||||||
*/
|
*/
|
||||||
lectureHalls?: Array<number>;
|
lectureHalls?: Array<number>;
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user