mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
remove sqlite and unused import
This commit is contained in:
@@ -138,23 +138,23 @@ export class ViewEventPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
getEventsFromDB () {
|
||||
// getEventsFromDB () {
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
||||
this.storage.get('agendaResponse').then((events) => {
|
||||
resolve(events)
|
||||
})
|
||||
} else {
|
||||
this.sqliteservice.getAllEvents().then((events: any[] = []) => {
|
||||
resolve(events)
|
||||
// return new Promise((resolve, reject) => {
|
||||
// if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
||||
// this.storage.get('agendaResponse').then((events) => {
|
||||
// resolve(events)
|
||||
// })
|
||||
// } else {
|
||||
// this.sqliteservice.getAllEvents().then((events: any[] = []) => {
|
||||
// resolve(events)
|
||||
|
||||
})
|
||||
}
|
||||
}).catch ((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
}
|
||||
// })
|
||||
// }
|
||||
// }).catch ((error) => {
|
||||
// console.error(error);
|
||||
// });
|
||||
// }
|
||||
|
||||
|
||||
close() {
|
||||
@@ -193,7 +193,7 @@ export class ViewEventPage implements OnInit {
|
||||
this.eventsService.getEvent(this.eventId).subscribe(res => {
|
||||
|
||||
this.loadedEvent = res;
|
||||
this.addEventToDb(res);
|
||||
// this.addEventToDb(res);
|
||||
|
||||
loader.remove()
|
||||
}, (error) => {
|
||||
@@ -220,7 +220,7 @@ export class ViewEventPage implements OnInit {
|
||||
res.Body.Text = div.innerText
|
||||
this.loadedEvent = res;
|
||||
|
||||
this.addEventToDb(res);
|
||||
// this.addEventToDb(res);
|
||||
|
||||
loader.remove()
|
||||
}, (error) => {
|
||||
@@ -511,36 +511,36 @@ export class ViewEventPage implements OnInit {
|
||||
}
|
||||
|
||||
|
||||
addEventToDb(data) {
|
||||
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
||||
this.ionicStorage.set('eventDetails', data).then(() => {
|
||||
// addEventToDb(data) {
|
||||
// if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
||||
// this.ionicStorage.set('eventDetails', data).then(() => {
|
||||
|
||||
})
|
||||
} else {
|
||||
let event = {
|
||||
Attendees: JSON.stringify(data.Attendees) || JSON.stringify(''),
|
||||
Body: JSON.stringify(data.Body) || JSON.stringify(''),
|
||||
CalendarId: data.CalendarId,
|
||||
CalendarName: data.CalendarName,
|
||||
Category: data.Category,
|
||||
EndDate: data.EndDate,
|
||||
EventId: data.EventId,
|
||||
EventRecurrence: JSON.stringify(data.EventRecurrence) || JSON.stringify(''),
|
||||
EventType: data.EventType,
|
||||
HasAttachments: data.HasAttachments,
|
||||
IsAllDayEvent: data.IsAllDayEvent,
|
||||
IsMeeting: data.IsMeeting,
|
||||
IsRecurring: data.IsRecurring,
|
||||
Location: data.Location,
|
||||
Organizer: JSON.stringify(data.Organizer) || JSON.stringify(''),
|
||||
StartDate: data.StartDate,
|
||||
Subject: data.Subject,
|
||||
TimeZone: data.TimeZone
|
||||
}
|
||||
// })
|
||||
// } else {
|
||||
// let event = {
|
||||
// Attendees: JSON.stringify(data.Attendees) || JSON.stringify(''),
|
||||
// Body: JSON.stringify(data.Body) || JSON.stringify(''),
|
||||
// CalendarId: data.CalendarId,
|
||||
// CalendarName: data.CalendarName,
|
||||
// Category: data.Category,
|
||||
// EndDate: data.EndDate,
|
||||
// EventId: data.EventId,
|
||||
// EventRecurrence: JSON.stringify(data.EventRecurrence) || JSON.stringify(''),
|
||||
// EventType: data.EventType,
|
||||
// HasAttachments: data.HasAttachments,
|
||||
// IsAllDayEvent: data.IsAllDayEvent,
|
||||
// IsMeeting: data.IsMeeting,
|
||||
// IsRecurring: data.IsRecurring,
|
||||
// Location: data.Location,
|
||||
// Organizer: JSON.stringify(data.Organizer) || JSON.stringify(''),
|
||||
// StartDate: data.StartDate,
|
||||
// Subject: data.Subject,
|
||||
// TimeZone: data.TimeZone
|
||||
// }
|
||||
|
||||
this.sqliteservice.updateEvent(event);
|
||||
}
|
||||
}
|
||||
// this.sqliteservice.updateEvent(event);
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
getFromDb() {
|
||||
|
||||
Reference in New Issue
Block a user