mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-20 00:23:03 +00:00
feat: separate prettier from eslint
This commit is contained in:
committed by
Thea Schöbl
parent
939fb6ef0f
commit
a88d000ccd
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2022 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {Component, OnInit, OnDestroy} from '@angular/core';
|
||||
import {Router, ActivatedRoute} from '@angular/router';
|
||||
@@ -121,12 +121,8 @@ export class CatalogComponent implements OnInit, OnDestroy {
|
||||
this.activeSemester = this.availableSemesters[0];
|
||||
this.activeSemester =
|
||||
this.selectedSemesterUID === ''
|
||||
? this.availableSemesters.find(
|
||||
semester => semester.startDate <= today && semester.endDate > today,
|
||||
)
|
||||
: this.availableSemesters.find(
|
||||
semester => semester.uid === this.selectedSemesterUID,
|
||||
);
|
||||
? this.availableSemesters.find(semester => semester.startDate <= today && semester.endDate > today)
|
||||
: this.availableSemesters.find(semester => semester.uid === this.selectedSemesterUID);
|
||||
if (this.activeSemester && this.selectedSemesterUID === '') {
|
||||
this.selectedSemesterUID = this.activeSemester.uid;
|
||||
}
|
||||
@@ -134,10 +130,7 @@ export class CatalogComponent implements OnInit, OnDestroy {
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
segmentChanged(event: any) {
|
||||
if (
|
||||
this.activeSemester &&
|
||||
this.activeSemester.uid !== (event.detail.value as string)
|
||||
) {
|
||||
if (this.activeSemester && this.activeSemester.uid !== (event.detail.value as string)) {
|
||||
this.updateLocation(event.detail.value as string);
|
||||
}
|
||||
|
||||
@@ -149,9 +142,7 @@ export class CatalogComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
updateLocation(semesterUID: string) {
|
||||
const url = this.router
|
||||
.createUrlTree(['/catalog/', semesterUID])
|
||||
.toString();
|
||||
const url = this.router.createUrlTree(['/catalog/', semesterUID]).toString();
|
||||
this.location.go(url);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user