edit actions and video stop

This commit is contained in:
Peter Maquiran
2023-12-13 16:44:29 +01:00
parent 5e8c4187fa
commit d2c1e100cc
13 changed files with 251 additions and 19 deletions
+17
View File
@@ -0,0 +1,17 @@
import { HttpHeaders } from "@angular/common/http";
import { calendarInterface } from "src/app/models/user.model";
import { SessionStore } from "src/app/store/session.service";
export function DetectCalendars(CalendarId) {
const calendars = SessionStore.user.OwnerCalendars.concat(SessionStore.user.SharedCalendars)
return calendars.find((e) => e.CalendarId == CalendarId)
}
export function makeHeaderForCalendar(calendar: calendarInterface) {
let header = new HttpHeaders();;
header = header.set('Authorization', 'Bearer ' + SessionStore.user.Authorization);
header = header.set('CalendarId', calendar.CalendarId);
header = header.set('CalendarRoleId', calendar.CalendarRoleId);
header = header.set('CalendarName', calendar.CalendarName);
return header
}