Bug on synch event edit and delete and added offline synch to event to aprove REver

This commit is contained in:
Eudes Inácio
2021-11-16 13:12:25 +01:00
parent 487fe4ae6d
commit e7c3bbf3ae
6 changed files with 103 additions and 7 deletions
+2
View File
@@ -346,6 +346,7 @@ export class EventsService {
return this.http.put<Event>(`${puturl}`, event, options).pipe(
catchError(err => {
console.log('Event edit saved offline')
this.offlinemanager.storeRequestData('eventEdit', arrayReq);
throw new Error(err);
})
@@ -481,6 +482,7 @@ export class EventsService {
return this.http.delete(`${puturl}`, options).pipe(
catchError(err => {
console.log('Event edit saved offline')
this.offlinemanager.storeRequestData('eventDelete', arrayReq);
throw new Error(err);
})
+6
View File
@@ -512,4 +512,10 @@ export class SqliteService {
console.log(" Get events by id error", JSON.stringify(e));
});
}
deleteEventTable() {
this.dbInstance.executeSql("delete from "+ this.events).then((res) => {
console.log('DELETE EVENT TABLE RESULT ', res)
});
}
}