Many changes

Edit event
This commit is contained in:
Tiago Kayaya
2020-11-24 13:46:13 +01:00
parent 4d841e765a
commit 835b0169b6
26 changed files with 880 additions and 84 deletions
+50 -1
View File
@@ -82,8 +82,10 @@ export class EventsService {
}
getEvent(eventid: string): Observable<Event>{
let geturl = environment.apiURL + 'Calendar/GetEvent';
let geturl = environment.apiURL + 'calendar/GetEvent';
let params = new HttpParams();
console.log(eventid);
params = params.set("EventId", eventid);
@@ -112,6 +114,23 @@ export class EventsService {
return this.http.put<Event>(`${puturl}`, event, options)
}
editEvent(event: Event, conflictResolutionMode:number, sendInvitationsOrCancellationsMode:number): Observable<Event>
{
const puturl = environment.apiURL + 'calendar/PutEvent';
let params = new HttpParams();
params = params.set("conflictResolutionMode", conflictResolutionMode.toString());
params = params.set("sendInvitationsOrCancellationsMode", sendInvitationsOrCancellationsMode.toString());
let options = {
headers: this.headers,
params: params
};
return this.http.put<Event>(`${puturl}`, event, options)
}
postEvent(event:Event, calendarName:string, sharedagenda:string)
{
const puturl = environment.apiURL + 'calendar/' + ((sharedagenda != '') ? sharedagenda : 'PostEvent');
@@ -126,6 +145,36 @@ export class EventsService {
return this.http.post<Event>(`${puturl}`, event, options)
}
postEventMd(event:Event, calendarName:string)
{
const puturl = environment.apiURL + 'calendar/md';
let params = new HttpParams();
params = params.set("CalendarName", calendarName);
let options = {
headers: this.headers,
params: params
};
return this.http.post<Event>(`${puturl}`, event, options)
}
postEventPr(event:Event, calendarName:string)
{
const puturl = environment.apiURL + 'calendar/pr';
let params = new HttpParams();
params = params.set("CalendarName", calendarName);
let options = {
headers: this.headers,
params: params
};
return this.http.post<Event>(`${puturl}`, event, options)
}
deleteEvent(eventid:string, deletemode:number)
{