mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
Remove relevant console log,
This commit is contained in:
@@ -300,10 +300,8 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
// show information about the clicked event in timeline
|
||||
eventClicked(event: CalendarEvent): void {
|
||||
/* console.log('Event clicked', event); */
|
||||
//clear
|
||||
|
||||
console.log(event)
|
||||
|
||||
this.setIntervenient([]);
|
||||
this.setIntervenientCC([]);
|
||||
@@ -372,7 +370,6 @@ export class AgendaPage implements OnInit {
|
||||
}
|
||||
|
||||
onTimeSelected = (ev: { selectedTime: Date, events: any[] }) => {
|
||||
// console.log('Selected time: ' + ev.selectedTime + ', hasEvents: ' + (ev.events !== undefined && ev.events.length !== 0));
|
||||
this.eventSelectedDate2 = ev.selectedTime;
|
||||
}
|
||||
|
||||
@@ -412,7 +409,7 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
|
||||
// if (startTimeSamp < endTimeSamp && endDay == 29 && (endMinutes + endHours) == 0) {
|
||||
// // console.log(id, (endMinutes + endHours))
|
||||
// //
|
||||
// classs.push(`calendar-event-border`);
|
||||
// }
|
||||
|
||||
@@ -523,7 +520,6 @@ 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);
|
||||
|
||||
this.addEventToDB(response, "md");
|
||||
|
||||
@@ -533,13 +529,11 @@ export class AgendaPage implements OnInit {
|
||||
// loop
|
||||
this.CalendarStore.pushEvent(response, 'md');
|
||||
|
||||
console.log('CALENDAR STORE', this.CalendarStore.eventSource)
|
||||
this.listToPresent = this.CalendarStore.eventSource
|
||||
this.trasnformData(response, 'md');
|
||||
|
||||
this.TimelineMDList = this.listBoxService.list(this.listToPresent, 'md', this.rangeStartDate, this.rangeEndDate, { segment: this.segment, selectedDate: this.eventSelectedDate })
|
||||
|
||||
// console.log('check list to present data', this.listToPresent);
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
|
||||
@@ -568,7 +562,7 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
this.TimelineMDList = this.listBoxService.list(this.listToPresent, 'pr', this.rangeStartDate, this.rangeEndDate, { segment: this.segment, selectedDate: this.eventSelectedDate })
|
||||
|
||||
// console.log('check list to present data', this.listToPresent);
|
||||
//
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
|
||||
@@ -586,7 +580,6 @@ 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)
|
||||
this.addEventToDB(response, "pr");
|
||||
|
||||
// clear the current month only
|
||||
@@ -600,7 +593,7 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
this.TimelineMDList = this.listBoxService.list(this.listToPresent, 'pr', this.rangeStartDate, this.rangeEndDate, { segment: this.segment, selectedDate: this.eventSelectedDate })
|
||||
|
||||
// console.log('check list to present data', this.listToPresent);
|
||||
//
|
||||
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
@@ -621,7 +614,6 @@ 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);
|
||||
|
||||
this.addEventToDB(response, "md");
|
||||
|
||||
@@ -631,13 +623,13 @@ export class AgendaPage implements OnInit {
|
||||
// loop
|
||||
this.CalendarStore.pushEvent(response, 'md');
|
||||
|
||||
console.log('CALENDAR STORE', this.CalendarStore.eventSource)
|
||||
|
||||
this.listToPresent = this.CalendarStore.eventSource
|
||||
this.trasnformData(response, 'md');
|
||||
|
||||
this.TimelineMDList = this.listBoxService.list(this.listToPresent, 'md', this.rangeStartDate, this.rangeEndDate, { segment: this.segment, selectedDate: this.eventSelectedDate })
|
||||
|
||||
// console.log('check list to present data', this.listToPresent);
|
||||
//
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
|
||||
@@ -664,7 +656,7 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
this.TimelineMDList = this.listBoxService.list(this.listToPresent, 'pr', this.rangeStartDate, this.rangeEndDate, { segment: this.segment, selectedDate: this.eventSelectedDate })
|
||||
|
||||
// console.log('check list to present data', this.listToPresent);
|
||||
//
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
|
||||
@@ -701,7 +693,7 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
this.TimelineMDList = this.listBoxService.list(this.listToPresent, 'md', this.rangeStartDate, this.rangeEndDate, { segment: this.segment, selectedDate: this.eventSelectedDate })
|
||||
|
||||
// console.log('check list to present data', this.listToPresent);
|
||||
//
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
|
||||
@@ -737,7 +729,7 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
this.TimelinePRList = this.listBoxService.list(this.listToPresent, 'pr', this.rangeStartDate, this.rangeEndDate, { segment: this.segment, selectedDate: this.eventSelectedDate })
|
||||
|
||||
// console.log('check list to present data', this.listToPresent);
|
||||
//
|
||||
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
@@ -783,7 +775,7 @@ export class AgendaPage implements OnInit {
|
||||
this.TimelinePRList = this.listBoxService.list(this.listToPresent, 'pr', this.rangeStartDate, this.rangeEndDate, { segment: this.segment, selectedDate: this.eventSelectedDate })
|
||||
|
||||
|
||||
// console.log('check list to present data', this.listToPresent);
|
||||
//
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
|
||||
@@ -847,7 +839,7 @@ export class AgendaPage implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
console.log(this.loggeduser.SharedCalendars)
|
||||
|
||||
|
||||
if(this.loggeduser.SharedCalendars.length != 0) {
|
||||
|
||||
@@ -867,7 +859,7 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
this.TimelinePRList = this.listBoxService.list(this.listToPresent, 'pr', this.rangeStartDate, this.rangeEndDate, { segment: this.segment, selectedDate: this.eventSelectedDate })
|
||||
|
||||
// console.log('check list to present data', this.listToPresent);
|
||||
//
|
||||
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
@@ -902,7 +894,7 @@ export class AgendaPage implements OnInit {
|
||||
}
|
||||
|
||||
trasnformData(response, profile) {
|
||||
console.log('Transform ', response)
|
||||
|
||||
response.forEach(element => {
|
||||
let event = {
|
||||
startTime: new Date(element.StartDate),
|
||||
@@ -916,14 +908,14 @@ export class AgendaPage implements OnInit {
|
||||
this.array.push(event)
|
||||
});
|
||||
this.listToPresent = this.array;
|
||||
console.log('LIST TO PRESET', this.listToPresent)
|
||||
|
||||
}
|
||||
|
||||
//Deve ser removido para ficar só um method transform
|
||||
trasnformDataDB(response) {
|
||||
|
||||
if(response) {
|
||||
console.log('Transform ', response)
|
||||
|
||||
response.forEach(element => {
|
||||
let event = {
|
||||
startTime: new Date(element.StartDate),
|
||||
@@ -937,7 +929,7 @@ export class AgendaPage implements OnInit {
|
||||
this.array.push(event)
|
||||
});
|
||||
this.listToPresent = this.array;
|
||||
console.log('LIST TO PRESET', this.listToPresent)
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -963,7 +955,7 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
});
|
||||
this.storage.set('agendaResponse',responseArray).then(() => {
|
||||
console.log('Agenda data saved')
|
||||
|
||||
})
|
||||
} else {
|
||||
if (response.length > 0) {
|
||||
@@ -990,7 +982,7 @@ export class AgendaPage implements OnInit {
|
||||
}
|
||||
|
||||
getFromDB() {
|
||||
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 +996,7 @@ export class AgendaPage implements OnInit {
|
||||
})
|
||||
} else {
|
||||
this.sqliteservice.getAllEvents().then((events: any[]) => {
|
||||
console.log('ALL EVENTS FROM DB', events)
|
||||
|
||||
let eventArray = [];
|
||||
|
||||
this.trasnformDataDB(events)
|
||||
@@ -1134,7 +1126,7 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
this.updateEventListBox()
|
||||
} else {
|
||||
console.log('not valid ' + a)
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1142,7 +1134,7 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
changeMonth = (month) => {
|
||||
const a = this.calendar.currentDate;
|
||||
console.log(a)
|
||||
|
||||
|
||||
const isInvalidDate = (dateString) => JSON.stringify(new Date(dateString)) === 'null';
|
||||
|
||||
@@ -1159,7 +1151,7 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
this.updateEventListBox()
|
||||
} else {
|
||||
console.log('not valid ' + a)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1261,7 +1253,7 @@ export class AgendaPage implements OnInit {
|
||||
async viewEventDetail(eventId: any) {
|
||||
|
||||
this.router.navigate(['/home/agenda', eventId, 'agenda']);
|
||||
/* console.log(this.profile);
|
||||
/*
|
||||
|
||||
const modal = await this.modalCtrl.create({
|
||||
component: ViewEventPage,
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
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);
|
||||
|
||||
this.router.navigate(['/home',this.caller]);
|
||||
}
|
||||
|
||||
getRecurrenceTypes() {
|
||||
this.eventsService.getRecurrenceTypes().subscribe(res=>{
|
||||
console.log(res);
|
||||
|
||||
this.recurringTypes = res;
|
||||
});
|
||||
}
|
||||
|
||||
onSelectedRecurringChanged(ev?:any) {
|
||||
console.log(ev);
|
||||
|
||||
if(ev.length > 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)
|
||||
|
||||
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);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@@ -465,7 +465,7 @@ export class EditEventPage implements OnInit {
|
||||
SerialNumber: '',
|
||||
}
|
||||
|
||||
console.log( this.loadedEventAttachments)
|
||||
|
||||
this.loadedEventAttachments.push(ApplicationIdDocumentToSave)
|
||||
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ export class EventActionsPopoverPage implements OnInit {
|
||||
|
||||
async approveTask() {
|
||||
let body = { "serialNumber": this.serialNumber, "action": "Aprovar" }
|
||||
console.log(body);
|
||||
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
try {
|
||||
@@ -82,7 +82,7 @@ export class EventActionsPopoverPage implements OnInit {
|
||||
|
||||
modal.onDidDismiss()
|
||||
.then( async (res) => {
|
||||
console.log(res.data);
|
||||
|
||||
|
||||
if(res.data !== ''){
|
||||
let body = { "serialNumber": this.serialNumber,
|
||||
@@ -91,7 +91,7 @@ export class EventActionsPopoverPage implements OnInit {
|
||||
"ReviewUserComment": res.data,
|
||||
}
|
||||
}
|
||||
console.log(body);
|
||||
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
@@ -114,7 +114,7 @@ export class EventActionsPopoverPage implements OnInit {
|
||||
|
||||
async rejeitar(){
|
||||
let body = { "serialNumber": this.serialNumber, "action": "Rejeitar" }
|
||||
console.log(body);
|
||||
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
try {
|
||||
|
||||
@@ -124,8 +124,8 @@ export class NewEventPage implements OnInit {
|
||||
|
||||
this.CalendarName = this.loggeduser.Profile;
|
||||
this.selectedRecurringType = "-1";
|
||||
console.log(this.postEvent);
|
||||
console.log(this.selectedSegment);
|
||||
|
||||
|
||||
|
||||
this.getRecurrenceTypes();
|
||||
|
||||
@@ -181,7 +181,7 @@ export class NewEventPage implements OnInit {
|
||||
}
|
||||
};
|
||||
|
||||
console.log(this.postEvent);
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -193,15 +193,15 @@ export class NewEventPage implements OnInit {
|
||||
|
||||
getRecurrenceTypes() {
|
||||
this.eventService.getRecurrenceTypes().subscribe(res=>{
|
||||
console.log(res);
|
||||
|
||||
this.recurringTypes = res;
|
||||
});
|
||||
}
|
||||
|
||||
onSelectedRecurringChanged(ev:any){
|
||||
console.log(ev);
|
||||
|
||||
if(ev.length > 1){
|
||||
console.log(ev.filter(data => data != '-1'));
|
||||
|
||||
this.selectedRecurringType = ev.filter(data => data != '-1');
|
||||
}
|
||||
if(ev.length == 0){
|
||||
@@ -255,7 +255,7 @@ export class NewEventPage implements OnInit {
|
||||
openInicio() {
|
||||
let input: any = document.querySelector('#new-inicio')
|
||||
if(input) {
|
||||
console.log(input)
|
||||
|
||||
input.click()
|
||||
}
|
||||
}
|
||||
@@ -300,16 +300,16 @@ export class NewEventPage implements OnInit {
|
||||
|
||||
|
||||
if(this.loggeduser.Profile == 'MDGPR') {
|
||||
console.log(this.loggeduser.Profile);
|
||||
|
||||
|
||||
console.log(this.postEvent);
|
||||
|
||||
|
||||
eventId = await this.eventService.postEventMd(this.postEvent, this.postEvent.CalendarName).toPromise();
|
||||
console.log(eventId);
|
||||
|
||||
|
||||
}
|
||||
else if(this.loggeduser.Profile == 'PR') {
|
||||
console.log(this.loggeduser.Profile);
|
||||
|
||||
|
||||
eventId = await this.eventService.postEventPr(this.postEvent, this.postEvent.CalendarName).toPromise();
|
||||
} else {
|
||||
@@ -333,7 +333,7 @@ export class NewEventPage implements OnInit {
|
||||
try {
|
||||
await this.attachmentsService.setEventAttachmentById(attachments).toPromise();
|
||||
} catch(error) {
|
||||
console.log('document not save')
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
@@ -100,7 +100,7 @@ export class ViewEventPage implements OnInit {
|
||||
JSON.parse(req).forEach(element => {
|
||||
this.eventsService.editEvent(element, 2, 3).subscribe((res) => {
|
||||
this.storage.remove('eventEdit')
|
||||
console.log('eventEdit synchnize', res)
|
||||
|
||||
})
|
||||
});
|
||||
})
|
||||
@@ -108,7 +108,7 @@ export class ViewEventPage implements OnInit {
|
||||
JSON.parse(req).forEach(element => {
|
||||
this.eventsService.editEvent(element, 2, 3).subscribe((res) => {
|
||||
this.storage.remove('eventDelete')
|
||||
console.log('eventEdit synchnize', res)
|
||||
|
||||
})
|
||||
});
|
||||
})
|
||||
@@ -175,13 +175,13 @@ export class ViewEventPage implements OnInit {
|
||||
this.eventsService.getEvent(this.eventId).subscribe(res => {
|
||||
this.loadedEvent = res;
|
||||
this.addEventToDb(res);
|
||||
console.log('Loaded one event', res)
|
||||
|
||||
/* this.today = new Date(res.StartDate);
|
||||
this.customDate = this.days[this.today.getDay()]+ ", " + this.today.getDate() +" de " + ( this.months[this.today.getMonth()]); */
|
||||
loader.remove()
|
||||
}, (error) => {
|
||||
|
||||
console.log('errorstatus ss',error.status)
|
||||
|
||||
|
||||
if (error.status === 0) {
|
||||
this.getFromDb();
|
||||
@@ -197,19 +197,19 @@ export class ViewEventPage implements OnInit {
|
||||
|
||||
const event = this.CalendarService.eventSource.find((ele) => ele.id == this.eventId)
|
||||
|
||||
// console.log('View event details', event)
|
||||
//
|
||||
|
||||
if(event?.CalendarId) {
|
||||
this.eventsService.genericGetEvent(this.eventId, event.CalendarId).subscribe(res => {
|
||||
this.loadedEvent = res;
|
||||
this.addEventToDb(res);
|
||||
console.log('Loaded one event', res)
|
||||
|
||||
/* this.today = new Date(res.StartDate);
|
||||
this.customDate = this.days[this.today.getDay()]+ ", " + this.today.getDate() +" de " + ( this.months[this.today.getMonth()]); */
|
||||
loader.remove()
|
||||
}, (error) => {
|
||||
|
||||
console.log('errorstatus ss',error.status)
|
||||
|
||||
|
||||
if (error.status === 0) {
|
||||
this.getFromDb();
|
||||
@@ -288,7 +288,7 @@ export class ViewEventPage implements OnInit {
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then((res) => {
|
||||
console.log(res);
|
||||
|
||||
|
||||
if (res) {
|
||||
setTimeout(() => {
|
||||
@@ -315,7 +315,7 @@ export class ViewEventPage implements OnInit {
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then((res) => {
|
||||
console.log(res);
|
||||
|
||||
|
||||
if (res) {
|
||||
setTimeout(() => {
|
||||
@@ -329,7 +329,7 @@ export class ViewEventPage implements OnInit {
|
||||
}
|
||||
|
||||
async editEvent() {
|
||||
console.log(this.loadedEvent);
|
||||
|
||||
|
||||
let classs;
|
||||
if (window.innerWidth <= 800) {
|
||||
@@ -348,7 +348,7 @@ export class ViewEventPage implements OnInit {
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then((res) => {
|
||||
console.log(res);
|
||||
|
||||
|
||||
if (res) {
|
||||
setTimeout(() => {
|
||||
@@ -370,7 +370,7 @@ export class ViewEventPage implements OnInit {
|
||||
const applicationId: any = this.loadedEvent.Attachments[this.dicIndex].ApplicationId
|
||||
const selectedDoc = this.loadedEvent.Attachments[this.dicIndex]
|
||||
|
||||
console.log('selectedDoc', selectedDoc)
|
||||
|
||||
|
||||
this.task = {
|
||||
serialNumber: '',
|
||||
@@ -458,7 +458,7 @@ export class ViewEventPage implements OnInit {
|
||||
addEventToDb(data) {
|
||||
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
||||
this.ionicStorage.set('eventDetails', data).then(() => {
|
||||
console.log('Details event saved')
|
||||
|
||||
})
|
||||
} else {
|
||||
let event = {
|
||||
@@ -496,7 +496,7 @@ export class ViewEventPage implements OnInit {
|
||||
} else {
|
||||
this.sqliteservice.getEventById(this.eventId).then((event) => {
|
||||
let arrayevent = [];
|
||||
console.log('EVENT ATTENDEES',event[0].Attendees)
|
||||
|
||||
let elemet = {
|
||||
Attendees: (typeof JSON.parse(event[0].Attendees) === 'undefined') ? "" : JSON.parse(event[0].Attendees),
|
||||
Body: JSON.parse(event[0].Body) || "",
|
||||
@@ -519,7 +519,7 @@ export class ViewEventPage implements OnInit {
|
||||
}
|
||||
arrayevent.push(elemet);
|
||||
this.loadedEvent = arrayevent[0];
|
||||
console.log("Event ditails local,", elemet)
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user