refactor: replace timetable event modal with route

This commit is contained in:
2023-02-17 16:51:52 +01:00
committed by Rainer Killinger
parent 22e70ae92b
commit 3e5724d9be
12 changed files with 176 additions and 145 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2022 StApps
* Copyright (C) 2023 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.
@@ -15,12 +15,13 @@
import {AfterViewInit, Component, HostListener, Input, OnInit, ViewChild} from '@angular/core';
import {Location} from '@angular/common';
import {ActivatedRoute, Router} from '@angular/router';
import {IonRouterOutlet} from '@ionic/angular';
import {AnimationController, IonRouterOutlet} from '@ionic/angular';
import {SharedAxisChoreographer} from '../../../animation/animation-choreographer';
import {materialSharedAxisX} from '../../../animation/material-motion';
import {ScheduleResponsiveBreakpoint} from './schema/schema';
import {CalendarService} from '../../calendar/calendar.service';
import moment from 'moment';
import {fabExpand} from '../../../animation/fab-expand';
/**
* This needs to be sorted by break point low -> high
@@ -93,6 +94,8 @@ export class SchedulePageComponent implements OnInit, AfterViewInit {
isModalOpen = false;
fabAnimation = fabExpand(this.animationController);
/**
* Amount of days that should be shown according to current display width
*/
@@ -111,6 +114,7 @@ export class SchedulePageComponent implements OnInit, AfterViewInit {
private calendarService: CalendarService,
readonly routerOutlet: IonRouterOutlet,
private router: Router,
private animationController: AnimationController,
private location: Location,
) {}
@@ -168,12 +172,4 @@ export class SchedulePageComponent implements OnInit, AfterViewInit {
onTodayClick() {
this.calendarService.emitGoToDate(moment().startOf('day'));
}
onFABClick() {
this.isModalOpen = true;
}
onModalDismiss() {
this.isModalOpen = false;
}
}