mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
added the edit and delete event offline
This commit is contained in:
@@ -346,7 +346,7 @@ export class EventsService {
|
||||
|
||||
return this.http.put<Event>(`${puturl}`, event, options).pipe(
|
||||
catchError(err => {
|
||||
this.offlinemanager.storeRequest(puturl, 'PUT', arrayReq);
|
||||
this.offlinemanager.storeRequestData('eventEdit', arrayReq);
|
||||
throw new Error(err);
|
||||
})
|
||||
)
|
||||
@@ -432,6 +432,13 @@ export class EventsService {
|
||||
}
|
||||
|
||||
deleteEvent(eventid: string, eventDeleteType: number, calendarName: string) {
|
||||
let arrayReq = [];
|
||||
let Object = {
|
||||
eventid: eventid,
|
||||
eventDeleteType: eventDeleteType,
|
||||
calendarName: calendarName
|
||||
}
|
||||
arrayReq.push(Object)
|
||||
const puturl = environment.apiURL + 'calendar/DeleteEvent';
|
||||
let params = new HttpParams();
|
||||
|
||||
@@ -472,7 +479,12 @@ export class EventsService {
|
||||
break;
|
||||
}
|
||||
|
||||
return this.http.delete(`${puturl}`, options)
|
||||
return this.http.delete(`${puturl}`, options).pipe(
|
||||
catchError(err => {
|
||||
this.offlinemanager.storeRequestData('eventDelete', arrayReq);
|
||||
throw new Error(err);
|
||||
})
|
||||
)
|
||||
}
|
||||
postExpedientEvent(docId: any, body: any, sharedagenda: string, serialNumber: any, applicationID: any) {
|
||||
const geturl = environment.apiURL + 'calendar/' + ((sharedagenda != '') ? sharedagenda : 'CreateEventExpediente') + '/event';
|
||||
|
||||
Reference in New Issue
Block a user