2021-08-20 12:02:27 +01:00
|
|
|
import { Injectable } from '@angular/core';
|
|
|
|
|
import { AttachmentsService } from '../attachments.service';
|
|
|
|
|
import { EventsService } from '../events.service';
|
2022-03-28 15:46:07 +01:00
|
|
|
import { PermissionService } from '../permission.service';
|
2021-09-30 15:56:04 +01:00
|
|
|
|
|
|
|
|
|
2021-08-20 12:02:27 +01:00
|
|
|
|
|
|
|
|
@Injectable({
|
|
|
|
|
providedIn: 'root'
|
|
|
|
|
})
|
|
|
|
|
export class EventService {
|
|
|
|
|
|
|
|
|
|
constructor(
|
|
|
|
|
private eventService: EventsService,
|
|
|
|
|
public p: PermissionService,
|
|
|
|
|
private attachmentsService: AttachmentsService,
|
|
|
|
|
) { }
|
|
|
|
|
|
|
|
|
|
|
2024-10-17 13:01:24 +01:00
|
|
|
// create({body, calendar}) {
|
2022-03-28 15:46:07 +01:00
|
|
|
|
2021-08-20 12:02:27 +01:00
|
|
|
|
2024-10-17 13:01:24 +01:00
|
|
|
// if(this.p.userRole(['PR'])) {
|
|
|
|
|
// return this.eventService.postEventPr(body, calendar)
|
|
|
|
|
// } else if(this.p.userRole(['MDGPR'])) {
|
|
|
|
|
// return this.eventService.postEventMd(body, calendar)
|
|
|
|
|
// } else {
|
|
|
|
|
// return this.eventService.postEventGeneric(body, calendar, body.CalendarId)
|
|
|
|
|
// }
|
2021-08-20 12:02:27 +01:00
|
|
|
|
2024-10-17 13:01:24 +01:00
|
|
|
// }
|
2021-08-20 12:02:27 +01:00
|
|
|
|
|
|
|
|
addAttachment(attachment: addAttachment) {
|
|
|
|
|
return this.attachmentsService.setEventAttachmentById(attachment)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|