You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Ombi/src/Ombi/ClientApp/src/app/calendar/components/calendar.component.ts

47 lines
1.1 KiB

import { Component, OnInit } from "@angular/core";
import { CalendarService } from "../../services/calendar.service";
import { ICalendarModel } from "../../interfaces/ICalendar";
@Component({
templateUrl: "./calendar.component.html",
styleUrls: ["./calendar.component.scss"],
})
export class CalendarComponent implements OnInit {
public loadingFlag: boolean;
events: any[];
options: any;
entries: ICalendarModel[];
constructor(private calendarService: CalendarService) { }
public async ngOnInit() {
debugger;
this.loading()
this.entries = await this.calendarService.getCalendarEntries();
this.options = {
defaultDate: new Date(),
header: {
left: 'prev,next',
center: 'title',
right: 'month,agendaWeek'
},
eventClick: (e: any) => {
debugger;
e.preventDefault();
}
};
this.finishLoading();
}
private loading() {
this.loadingFlag = true;
}
private finishLoading() {
this.loadingFlag = false;
}
}