This commit is contained in:
4 files changed
+92
No files matched your search
@@ -0,0 +1,33 @@
|
||||
import {Component, Inject} from '@angular/core';
|
||||
import {MAT_DIALOG_DATA, MatDialogRef} from "@angular/material/dialog";
|
||||
import {Event} from "../../models/event";
|
||||
import {log} from "@angular-devkit/build-angular/src/builders/ssr-dev-server";
|
||||
|
||||
@Component({
|
||||
selector: 'app-event-move-popup',
|
||||
templateUrl: './event-move-popup.component.html',
|
||||
styleUrls: ['./event-move-popup.component.css']
|
||||
})
|
||||
export class EventMovePopupComponent {
|
||||
selectedCalendar = 'public';
|
||||
calendars = ['', 'public', 'members', 'management', 'choir'];
|
||||
|
||||
constructor(
|
||||
public dialogRef: MatDialogRef<EventMovePopupComponent>,
|
||||
@Inject(MAT_DIALOG_DATA) public data: DialogData
|
||||
) {
|
||||
this.selectedCalendar = this.calendars[data.event.calendarId];
|
||||
}
|
||||
|
||||
onNoClick(): void {
|
||||
this.dialogRef.close();
|
||||
}
|
||||
|
||||
handleCalendarChange() {
|
||||
this.data.event.calendarId = this.calendars.indexOf(this.selectedCalendar);
|
||||
}
|
||||
}
|
||||
|
||||
export interface DialogData {
|
||||
event: Event;
|
||||
}
|
||||
Reference in new issue
Block a user