feat: add parameters as navigation

Now there is automatic navigation on the inserted url and on localStorage
This commit is contained in:
2024-08-28 03:52:47 +03:00
parent 60218a73f2
commit 79393a39c3
7 changed files with 131 additions and 80 deletions

View File

@ -61,8 +61,18 @@ export class TabsComponent implements AfterViewInit {
let selected = TabStorageService.selected;
let index = 0;
if (selected !== null)
index = selected.type;
if (selected !== null) {
if (selected.type === null) {
if (this.groupTab.existParams(selected))
index = 0;
else if (this.professorTab.existParams(selected))
index = 1;
else if (this.lectureHallTab.existParams(selected))
index = 2;
} else
index = selected.type;
}
if (index === null || index === 0)
this.chooseTabs(0).then();