mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
improve
This commit is contained in:
@@ -250,7 +250,6 @@ export class ViewEventPage implements OnInit {
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then((res) => {
|
||||
console.log(res);
|
||||
|
||||
if (res) {
|
||||
setTimeout(() => {
|
||||
|
||||
@@ -303,8 +303,6 @@ export class AgendaPage implements OnInit {
|
||||
/* console.log('Event clicked', event); */
|
||||
//clear
|
||||
|
||||
console.log(event)
|
||||
|
||||
this.setIntervenient([]);
|
||||
this.setIntervenientCC([]);
|
||||
this.clearPostEvent();
|
||||
@@ -523,7 +521,7 @@ export class AgendaPage implements OnInit {
|
||||
this.eventService.getAllMdEvents(momentG(new Date(startTime), 'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime), 'yyyy-MM-dd 23:59:59')).then(
|
||||
|
||||
(response: any) => {
|
||||
console.log('ALL MD EVENTS', response);
|
||||
// console.log('ALL MD EVENTS', response);
|
||||
|
||||
this.addEventToDB(response, "md");
|
||||
|
||||
@@ -533,7 +531,7 @@ export class AgendaPage implements OnInit {
|
||||
// loop
|
||||
this.CalendarStore.pushEvent(response, 'md');
|
||||
|
||||
console.log('CALENDAR STORE', this.CalendarStore.eventSource)
|
||||
// console.log('CALENDAR STORE', this.CalendarStore.eventSource)
|
||||
this.listToPresent = this.CalendarStore.eventSource
|
||||
this.trasnformData(response, 'md');
|
||||
|
||||
@@ -586,7 +584,7 @@ export class AgendaPage implements OnInit {
|
||||
else if (this.loggeduser.Profile == 'PR') {
|
||||
this.eventService.getAllPrEvents(momentG(new Date(startTime), 'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime), 'yyyy-MM-dd 23:59:59')).then(
|
||||
(response: any) => {
|
||||
console.log('ALL EVENT PR', response)
|
||||
// console.log('ALL EVENT PR', response)
|
||||
this.addEventToDB(response, "pr");
|
||||
|
||||
// clear the current month only
|
||||
@@ -621,7 +619,7 @@ export class AgendaPage implements OnInit {
|
||||
this.eventService.getAllOwnEvents(momentG(new Date(startTime), 'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime), 'yyyy-MM-dd 23:59:59')).then(
|
||||
|
||||
(response: any) => {
|
||||
console.log('ALL MD EVENTS', response);
|
||||
// ('ALL MD EVENTS', response);
|
||||
|
||||
this.addEventToDB(response, "md");
|
||||
|
||||
@@ -631,7 +629,7 @@ export class AgendaPage implements OnInit {
|
||||
// loop
|
||||
this.CalendarStore.pushEvent(response, 'md');
|
||||
|
||||
console.log('CALENDAR STORE', this.CalendarStore.eventSource)
|
||||
// console.log('CALENDAR STORE', this.CalendarStore.eventSource)
|
||||
this.listToPresent = this.CalendarStore.eventSource
|
||||
this.trasnformData(response, 'md');
|
||||
|
||||
@@ -847,7 +845,7 @@ export class AgendaPage implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
console.log(this.loggeduser.SharedCalendars)
|
||||
// console.log(this.loggeduser.SharedCalendars)
|
||||
|
||||
if(this.loggeduser.SharedCalendars.length != 0) {
|
||||
|
||||
@@ -902,7 +900,7 @@ export class AgendaPage implements OnInit {
|
||||
}
|
||||
|
||||
trasnformData(response, profile) {
|
||||
console.log('Transform ', response)
|
||||
// console.log('Transform ', response)
|
||||
response.forEach(element => {
|
||||
let event = {
|
||||
startTime: new Date(element.StartDate),
|
||||
@@ -916,14 +914,14 @@ export class AgendaPage implements OnInit {
|
||||
this.array.push(event)
|
||||
});
|
||||
this.listToPresent = this.array;
|
||||
console.log('LIST TO PRESET', this.listToPresent)
|
||||
// console.log('LIST TO PRESET', this.listToPresent)
|
||||
}
|
||||
|
||||
//Deve ser removido para ficar só um method transform
|
||||
trasnformDataDB(response) {
|
||||
|
||||
if(response) {
|
||||
console.log('Transform ', response)
|
||||
// console.log('Transform ', response)
|
||||
response.forEach(element => {
|
||||
let event = {
|
||||
startTime: new Date(element.StartDate),
|
||||
@@ -937,7 +935,7 @@ export class AgendaPage implements OnInit {
|
||||
this.array.push(event)
|
||||
});
|
||||
this.listToPresent = this.array;
|
||||
console.log('LIST TO PRESET', this.listToPresent)
|
||||
// console.log('LIST TO PRESET', this.listToPresent)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -963,7 +961,7 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
});
|
||||
this.storage.set('agendaResponse',responseArray).then(() => {
|
||||
console.log('Agenda data saved')
|
||||
// console.log('Agenda data saved')
|
||||
})
|
||||
} else {
|
||||
if (response.length > 0) {
|
||||
@@ -990,7 +988,7 @@ export class AgendaPage implements OnInit {
|
||||
}
|
||||
|
||||
getFromDB() {
|
||||
console.log('ALL EVENTS FROM DB AGENDA OFFLINE')
|
||||
// console.log('ALL EVENTS FROM DB AGENDA OFFLINE')
|
||||
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
||||
this.storage.get('agendaResponse').then((events) => {
|
||||
this.trasnformDataDB(events)
|
||||
@@ -1004,7 +1002,7 @@ export class AgendaPage implements OnInit {
|
||||
})
|
||||
} else {
|
||||
this.sqliteservice.getAllEvents().then((events: any[]) => {
|
||||
console.log('ALL EVENTS FROM DB', events)
|
||||
// console.log('ALL EVENTS FROM DB', events)
|
||||
let eventArray = [];
|
||||
|
||||
this.trasnformDataDB(events)
|
||||
@@ -1134,7 +1132,7 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
this.updateEventListBox()
|
||||
} else {
|
||||
console.log('not valid ' + a)
|
||||
// console.log('not valid ' + a)
|
||||
}
|
||||
|
||||
|
||||
@@ -1142,7 +1140,7 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
changeMonth = (month) => {
|
||||
const a = this.calendar.currentDate;
|
||||
console.log(a)
|
||||
// console.log(a)
|
||||
|
||||
const isInvalidDate = (dateString) => JSON.stringify(new Date(dateString)) === 'null';
|
||||
|
||||
@@ -1159,7 +1157,7 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
this.updateEventListBox()
|
||||
} else {
|
||||
console.log('not valid ' + a)
|
||||
// console.log('not valid ' + a)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ export class EditEventPage implements OnInit {
|
||||
this.isEventEdited = false;
|
||||
/* this.postEvent.EventRecurrence = { Type:'-1', LastOccurrence:''}; */
|
||||
this.postEvent = this.navParams.get('event');
|
||||
console.log(this.postEvent);
|
||||
// console.log(this.postEvent);
|
||||
|
||||
this.caller = this.navParams.get('caller');
|
||||
this.initCalendarName = this.postEvent.CalendarName;
|
||||
@@ -159,21 +159,21 @@ export class EditEventPage implements OnInit {
|
||||
}
|
||||
|
||||
goBack() {
|
||||
console.log(this.caller);
|
||||
// console.log(this.caller);
|
||||
this.router.navigate(['/home',this.caller]);
|
||||
}
|
||||
|
||||
getRecurrenceTypes() {
|
||||
this.eventsService.getRecurrenceTypes().subscribe(res=>{
|
||||
console.log(res);
|
||||
// console.log(res);
|
||||
this.recurringTypes = res;
|
||||
});
|
||||
}
|
||||
|
||||
onSelectedRecurringChanged(ev?:any) {
|
||||
console.log(ev);
|
||||
// console.log(ev);
|
||||
if(ev.length > 1){
|
||||
console.log(ev.filter(data => data != '-1'));
|
||||
// console.log(ev.filter(data => data != '-1'));
|
||||
this.selectedRecurringType = ev.filter(data => data != '-1');
|
||||
}
|
||||
if(ev.length == 0){
|
||||
@@ -219,7 +219,7 @@ export class EditEventPage implements OnInit {
|
||||
openInicio() {
|
||||
let input: any = document.querySelector('#new-inicio')
|
||||
if(input) {
|
||||
console.log(input)
|
||||
// console.log(input)
|
||||
input.click()
|
||||
}
|
||||
}
|
||||
@@ -418,7 +418,7 @@ export class EditEventPage implements OnInit {
|
||||
getAttachments(eventId: string){
|
||||
this.attachmentsService.getAttachmentsById(eventId).subscribe(res=>{
|
||||
this.loadedEventAttachments = res;
|
||||
console.log('res', res);
|
||||
// console.log('res', res);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -465,7 +465,7 @@ export class EditEventPage implements OnInit {
|
||||
SerialNumber: '',
|
||||
}
|
||||
|
||||
console.log( this.loadedEventAttachments)
|
||||
// console.log( this.loadedEventAttachments)
|
||||
this.loadedEventAttachments.push(ApplicationIdDocumentToSave)
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user