diff --git a/android/app/src/main/assets/capacitor.config.json b/android/app/src/main/assets/capacitor.config.json index 2399c4927..00b6a4931 100644 --- a/android/app/src/main/assets/capacitor.config.json +++ b/android/app/src/main/assets/capacitor.config.json @@ -16,5 +16,8 @@ "sound" ] } + }, + "server": { + "url": "http://192.168.0.62:8101" } } diff --git a/src/app/Rules/despacho.service.ts b/src/app/Rules/despacho.service.ts index f3f2d5cc1..e5729ef64 100644 --- a/src/app/Rules/despacho.service.ts +++ b/src/app/Rules/despacho.service.ts @@ -142,7 +142,7 @@ export class DespachoService { "AttachmentList" :documents, } } - console.log(body); + return this.processes.CompleteTask(body) } diff --git a/src/app/home/home.page.ts b/src/app/home/home.page.ts index 5da2d1fb2..732fc50af 100644 --- a/src/app/home/home.page.ts +++ b/src/app/home/home.page.ts @@ -200,7 +200,6 @@ export class HomePage implements OnInit { logDeviceInfo = async () => { const info = await Device.getInfo(); - console.log('Device info',info); }; get pathname(){ @@ -237,40 +236,35 @@ export class HomePage implements OnInit { this.eventservice.editEvent(element, 2, 3).subscribe((res) => { this.storage.remove('eventEdit') //this.sqliteservice.deleteeventsTable(); - console.log('eventEdit synchnize', res) }) }); }) } catch (error) { - console.log('error synch eventedit') + console.log(error) } try { await this.storage.get('eventDelete').then((req) => { JSON.parse(req).forEach(element => { - console.log('DELETE data SYNC', element) this.eventservice.deleteEvent(element.eventid, element.eventDeleteType, element.calendarName).subscribe((res) => { this.storage.remove('eventDelete') - console.log('eventDelete synchnize', res) }) }); }) } catch (error) { - console.log('error delete event synch') + console.log(error) } try { await this.storage.get('event-listRever').then((req) => { JSON.parse(req).forEach(element => { - console.log('REVER data SYNC', element) this.processservice.PostTaskAction(element).subscribe((res) => { this.storage.remove('event-listRever') - console.log('event-listRever synchnize', res) }) }); }) } catch (error) { - console.log('error event-list rever synch') + console.log(error) } this.sqliteservice.deleteAllTables(); diff --git a/src/app/modals/add-note/add-note.page.ts b/src/app/modals/add-note/add-note.page.ts index 8376d76a3..57900bc5a 100644 --- a/src/app/modals/add-note/add-note.page.ts +++ b/src/app/modals/add-note/add-note.page.ts @@ -26,9 +26,6 @@ export class AddNotePage implements OnInit { } ngOnInit() { - console.log( this.navParams); - - console.log(this.hideThisFeature); } diff --git a/src/app/modals/chat-options-features/chat-options-features.page.ts b/src/app/modals/chat-options-features/chat-options-features.page.ts index 3e68404d1..353c38aa2 100644 --- a/src/app/modals/chat-options-features/chat-options-features.page.ts +++ b/src/app/modals/chat-options-features/chat-options-features.page.ts @@ -37,7 +37,6 @@ export class ChatOptionsFeaturesPage implements OnInit { ) { this.members = this.navParams.get('members'); - console.log(this.members); this.attendees = this.members.map((val)=>{ return { Name: val.name, @@ -48,7 +47,6 @@ export class ChatOptionsFeaturesPage implements OnInit { } ngOnInit() { - console.log(this.attendees); } @@ -66,7 +64,6 @@ export class ChatOptionsFeaturesPage implements OnInit { } attachDocument(){ - console.log('Anexar Documento'); } @@ -99,7 +96,6 @@ export class ChatOptionsFeaturesPage implements OnInit { input.onchange = async () => { const file = this.fileLoaderService.getFirstFile(input) - console.log(file); const imageData = await this.fileToBase64Service.convert(file) this.capturedImage = imageData; @@ -120,11 +116,11 @@ export class ChatOptionsFeaturesPage implements OnInit { } this.chatService.sendMessage(body).subscribe(res=> { - // console.log(res); + // },(error) => { }); - //console.log(this.capturedImage) + // }; } @@ -146,7 +142,6 @@ export class ChatOptionsFeaturesPage implements OnInit { } this.chatService.sendMessage(body).subscribe(res=> { - console.log(res); },(error) => { @@ -159,7 +154,7 @@ export class ChatOptionsFeaturesPage implements OnInit { //If group is private call getGroupMembers if(this.room.t === 'p'){ this.chatService.getGroupMembers(this.roomId).subscribe(res=>{ - console.log(res); + this.members = res['members']; this.showLoader = false; }); @@ -167,7 +162,7 @@ export class ChatOptionsFeaturesPage implements OnInit { //Otherwise call getChannelMembers for públic groups else{ this.chatService.getChannelMembers(this.roomId).subscribe(res=>{ - console.log(res); + this.members = res['members']; this.showLoader = false; }); @@ -189,13 +184,11 @@ export class ChatOptionsFeaturesPage implements OnInit { if(res){ const data = res.data; this.documents.push(data.selected); - console.log(res.data); } }); } async bookMeeting() { - console.log(this.attendees); if( window.innerWidth <= 800){ this.popoverController.dismiss(); diff --git a/src/app/modals/create-process/create-process.page.ts b/src/app/modals/create-process/create-process.page.ts index 169460d73..aa011be1c 100644 --- a/src/app/modals/create-process/create-process.page.ts +++ b/src/app/modals/create-process/create-process.page.ts @@ -175,9 +175,7 @@ export class CreateProcessPage implements OnInit { } onSelectedTypesChanged(ev:any){ - console.log(ev); if(ev.length > 1){ - console.log(ev.filter(data => data != '99999850')); this.selectedTypes = ev.filter(data => data != '99999850'); } if(ev.length == 0){ @@ -282,8 +280,6 @@ export class CreateProcessPage implements OnInit { UsersSelected: attendees, DispatchFolder: this.dispatchFolder, } - console.log('this.postData', this.postData, this.taskType); - console.log(this.task.activityInstanceName); try { await this.processes.postDespatcho(this.postData).toPromise(); @@ -308,7 +304,6 @@ export class CreateProcessPage implements OnInit { UsersSelected: attendees, DispatchFolder: this.dispatchFolder, } - console.log(this.postData); try { if(this.task.activityInstanceName == 'Tarefa de Despacho' || this.task.activityInstanceName == 'Reexecutar Despacho') { @@ -338,7 +333,6 @@ export class CreateProcessPage implements OnInit { UsersSelected: attendees, DispatchFolder: this.dispatchFolder, } - console.log(this.postData); try { await this.pedidoService.createDeferimento(this.postData).toPromise(); @@ -369,7 +363,6 @@ export class CreateProcessPage implements OnInit { UsersSelected: attendees, DispatchFolder: this.dispatchFolder, } - console.log('this.postData', this.postData, this.taskType); if(this.postData.DispatchFolder.Message){ try { @@ -399,7 +392,6 @@ export class CreateProcessPage implements OnInit { UsersSelected: attendees, DispatchFolder: this.dispatchFolder, } - console.log(this.postData); try { @@ -430,7 +422,6 @@ export class CreateProcessPage implements OnInit { UsersSelected: attendees, DispatchFolder: this.dispatchFolder, } - console.log(this.postData); try { await this.pedidoService.createDeferimento(this.postData).toPromise(); @@ -488,10 +479,9 @@ export class CreateProcessPage implements OnInit { } } else { - console.log('unexpected activityInstanceName', this.task) + console.log('unexpected error') } - console.log(body); try { await this.processes.CompleteTask(body).toPromise(); @@ -598,7 +588,6 @@ export class CreateProcessPage implements OnInit { await modal.present(); modal.onDidDismiss().then(res=>{ if(res['data']=='close'){ - console.log('Expedient Discard closed'); this.modalController.dismiss(res['data']) } @@ -634,7 +623,6 @@ export class CreateProcessPage implements OnInit { } async viewExpedientDetail() { - console.log(this.profile); let classs; if( window.innerWidth <= 800){ diff --git a/src/app/modals/dar-parecer/dar-parecer.page.ts b/src/app/modals/dar-parecer/dar-parecer.page.ts index 5e464bcf9..7846b1595 100644 --- a/src/app/modals/dar-parecer/dar-parecer.page.ts +++ b/src/app/modals/dar-parecer/dar-parecer.page.ts @@ -30,8 +30,6 @@ export class DarParecerPage implements OnInit { } ngOnInit() { - console.log(this.serialNumber - ); } @@ -62,7 +60,6 @@ export class DarParecerPage implements OnInit { }, "AttachmentList": docs, } - console.log(body); const loader = this.toastService.loading() diff --git a/src/app/modals/delegar/delegar.page.ts b/src/app/modals/delegar/delegar.page.ts index a6e6391ff..2f05f8bfb 100644 --- a/src/app/modals/delegar/delegar.page.ts +++ b/src/app/modals/delegar/delegar.page.ts @@ -72,7 +72,6 @@ export class DelegarPage implements OnInit { ngOnInit() { this.adding = "intervenient"; - console.log(this.task); } @@ -100,13 +99,10 @@ export class DelegarPage implements OnInit { "Comment": this.note, "DelegatedUserEmail": this.taskParticipants[0].EmailAddress, } - console.log(body); const loader = this.toastService.loading() this.processes.DelegateTask(body).subscribe(res=>{ - - console.log(res); this.toastService._successMessage('Processo delegado') this.close(); }, diff --git a/src/app/modals/document-detail/document-detail.page.ts b/src/app/modals/document-detail/document-detail.page.ts index c9558af34..07c7bd16f 100644 --- a/src/app/modals/document-detail/document-detail.page.ts +++ b/src/app/modals/document-detail/document-detail.page.ts @@ -60,7 +60,6 @@ export class DocumentDetailPage implements OnInit { async LoadDocumentDetails() { this.processes.GetDocumentDetails(this.docId, this.applicationId).subscribe(res=>{ - console.log(res); this.LoadedDocument = res; @@ -68,7 +67,6 @@ export class DocumentDetailPage implements OnInit { let thedate = new Date(this.LoadedDocument.DateDispatch || this.LoadedDocument.DocDate); - console.log(res) this.customDate = this.days[thedate.getDay()]+ ", " + thedate.getDate() +" de " + ( this.months[thedate.getMonth()]); let task: ExpedientTaskModalPageNavParamsTask @@ -80,7 +78,7 @@ export class DocumentDetailPage implements OnInit { } else if (document.ApplicationID == 8 || document.ApplicationId == 8) { } else { - console.log('unexpected ApplicationID') + console.log('unexpected id') } @@ -99,7 +97,6 @@ export class DocumentDetailPage implements OnInit { } this.DocumentTask = Object.assign(task, res) - console.log('this.DocumentTask = DocumentTask', this.DocumentTask) }); @@ -207,7 +204,6 @@ export class DocumentDetailPage implements OnInit { } async openBookMeetingModal() { - console.log(this.LoadedDocument); let classs; if( window.innerWidth < 701) { @@ -271,8 +267,7 @@ export class DocumentDetailPage implements OnInit { } else if(res.data.component == 'openExpedientActionsModal') { this.openExpedientActionsModal(res.data.taskAction) } else { - console.log(res.data) - console.log('component not found') + console.log('not found') } }); } diff --git a/src/app/modals/document-set-up-meeting/document-set-up-meeting.page.ts b/src/app/modals/document-set-up-meeting/document-set-up-meeting.page.ts index 4e1798522..6a0d130a9 100644 --- a/src/app/modals/document-set-up-meeting/document-set-up-meeting.page.ts +++ b/src/app/modals/document-set-up-meeting/document-set-up-meeting.page.ts @@ -186,7 +186,6 @@ export class DocumentSetUpMeetingPage implements OnInit { }) } else{ - console.log(this.document); this.docs.push({ ApplicationId: this.document.ApplicationId || this.document.ApplicationType, Source: 1, diff --git a/src/app/modals/document-viewer/document-viewer.page.ts b/src/app/modals/document-viewer/document-viewer.page.ts index 8eaeb8abe..6a1fe1824 100644 --- a/src/app/modals/document-viewer/document-viewer.page.ts +++ b/src/app/modals/document-viewer/document-viewer.page.ts @@ -34,7 +34,7 @@ export class DocumentViewerPage implements OnInit { this.processes.getFileBase64(this.DocId).subscribe((res: any) => { - console.log(res) + this.pdfSrc= 'data:application/pdf;base64,'+ res.file this.fileName = res.name diff --git a/src/app/modals/forward/forward.page.ts b/src/app/modals/forward/forward.page.ts index a40c1747c..2eacdffe3 100644 --- a/src/app/modals/forward/forward.page.ts +++ b/src/app/modals/forward/forward.page.ts @@ -68,7 +68,6 @@ export class ForwardPage implements OnInit { ngOnInit() { this.adding = "intervenient"; - console.log(this.task); } @@ -147,9 +146,7 @@ export class ForwardPage implements OnInit { "FolderId": this.task.FolderId, "AttachmentList" :docs, } - console.log(body); this.processes.CompleteParecerPrTask(body).subscribe(res=>{ - console.log(res); this.toastService._successMessage('Processo delegado'); this.goBack(); }, diff --git a/src/app/modals/preview-camera/preview-camera.page.ts b/src/app/modals/preview-camera/preview-camera.page.ts index 6a32f3d6b..1dbd722b4 100644 --- a/src/app/modals/preview-camera/preview-camera.page.ts +++ b/src/app/modals/preview-camera/preview-camera.page.ts @@ -101,7 +101,6 @@ async getIconGallery(){ document.querySelector('img').addEventListener('click',removeImage) }) function removeImage(ev){ - console.log(ev.target, ev.currentTarget) let img = ev.currentTarget let src = ev.target.closest('.img') src?.parentElement.removeChild(src) diff --git a/src/app/modals/profile/profile.page.ts b/src/app/modals/profile/profile.page.ts index aee2e76e3..cdbfadf5e 100644 --- a/src/app/modals/profile/profile.page.ts +++ b/src/app/modals/profile/profile.page.ts @@ -48,8 +48,6 @@ export class ProfilePage implements OnInit { this.loggeduser = authService.ValidatedUser; - console.log(this.loggeduser.RoleDescription) - } ngOnInit() { @@ -82,13 +80,11 @@ export class ProfilePage implements OnInit { async getNotificationData() { this.storageservice.get("Notifications").then((value) => { - console.log("Init get store", value) this.DataArray = [] value.forEach((element, i) => { let notificationObject; if (element.data) { - console.log("ARaaAA", element) notificationObject = { index: i, title: element.title, @@ -125,12 +121,9 @@ export class ProfilePage implements OnInit { this.DataArray.push(notificationObject) }); this.notificationdata = this.DataArray - console.log("Notificaaa", this.notificationdata) }) - console.log("Notificaaa", this.notificationdata) /* await new Promise(resolve => setTimeout(resolve, 1000)); await this.getNotificationData(); */ - console.log('Timer badge count') } @@ -140,14 +133,12 @@ export class ProfilePage implements OnInit { var am_pm = date.getHours() >= 12 ? "pm" : "am"; var minutes = date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes(); let time = hours + ":" + minutes /* + " " + am_pm */; - console.log('Formate', time) return time; } notificatinsRoutes = (index, Service, Object, IdObject, FolderId) => { if (Service === "agenda" && IdObject.length > 10) { - console.log("Id Lenght", IdObject.length) this.zone.run(() => this.router.navigate(['/home/agenda', IdObject, 'agenda'])); } else if (Service === "gabinete-digital" && Object === "expediente") { @@ -201,15 +192,12 @@ export class ProfilePage implements OnInit { } deleteNotification(index) { - console.log("Delete notification first stata", this.notificationdata) this.notificationdata = this.notificationdata.filter(item => item.index != index); this.storageservice.store("Notifications", JSON.stringify(this.notificationdata)).then(() => { this.storageservice.get("Notifications").then((value) => { - console.log("notfication state", value,) }); }); - console.log("Delete notification last stata", this.notificationdata) } diff --git a/src/app/modals/set-room-owner/set-room-owner.page.ts b/src/app/modals/set-room-owner/set-room-owner.page.ts index 89d728161..fd44f44c7 100644 --- a/src/app/modals/set-room-owner/set-room-owner.page.ts +++ b/src/app/modals/set-room-owner/set-room-owner.page.ts @@ -33,7 +33,6 @@ export class SetRoomOwnerPage implements OnInit { } ngOnInit() { - console.log(this.members); } @@ -63,7 +62,6 @@ export class SetRoomOwnerPage implements OnInit { let res:any = await this.wsChatMethodsService.addRoomOwner(this.roomId, user._id); - console.log(res); if(res.error){ if(res.error.error == 'error-user-already-owner'){ diff --git a/src/app/modals/view-document/view-document.page.ts b/src/app/modals/view-document/view-document.page.ts index a49b3c45b..f50f4d9e5 100644 --- a/src/app/modals/view-document/view-document.page.ts +++ b/src/app/modals/view-document/view-document.page.ts @@ -40,7 +40,6 @@ export class ViewDocumentPage implements OnInit { this.file.title = 'Sem Título' } - console.log(this.task) } @@ -79,7 +78,7 @@ export class ViewDocumentPage implements OnInit { } else if(res.data.component == 'openExpedientActionsModal') { this.openExpedientActionsModal(res.data.taskAction) } else { - console.log('component not found') + console.log('not found') } } diff --git a/src/app/modals/view-event/view-event.page.ts b/src/app/modals/view-event/view-event.page.ts index 420f943b4..2f95d921c 100644 --- a/src/app/modals/view-event/view-event.page.ts +++ b/src/app/modals/view-event/view-event.page.ts @@ -89,7 +89,6 @@ 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) }) }); }) @@ -97,7 +96,6 @@ 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) }) }); }) @@ -132,14 +130,11 @@ 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(); } else { @@ -190,7 +185,6 @@ export class ViewEventPage implements OnInit { }); await modal.present(); modal.onDidDismiss().then((res) => { - console.log(res); if (res) { setTimeout(() => { @@ -217,7 +211,6 @@ export class ViewEventPage implements OnInit { }); await modal.present(); modal.onDidDismiss().then((res) => { - console.log(res); if (res) { setTimeout(() => { @@ -231,7 +224,6 @@ export class ViewEventPage implements OnInit { } async editEvent() { - console.log(this.loadedEvent); let classs; if (window.innerWidth <= 800) { @@ -271,7 +263,6 @@ 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: '', @@ -389,7 +380,6 @@ export class ViewEventPage implements OnInit { const loader = this.toastService.loading(); 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) || "", @@ -412,7 +402,6 @@ export class ViewEventPage implements OnInit { } arrayevent.push(elemet); this.loadedEvent = arrayevent[0]; - console.log("Event ditails local,", elemet) }) loader.remove() } diff --git a/src/app/modals/view-media/view-media.page.ts b/src/app/modals/view-media/view-media.page.ts index 417d57199..66e49deca 100644 --- a/src/app/modals/view-media/view-media.page.ts +++ b/src/app/modals/view-media/view-media.page.ts @@ -36,10 +36,8 @@ export class ViewMediaPage implements OnInit { } ngOnInit() { - console.log(this.image) this.base64Sanitize = this.sanitizer.bypassSecurityTrustResourceUrl(this.image); - console.log(this.base64Sanitize) } diff --git a/src/app/pages/agenda/agenda.page.ts b/src/app/pages/agenda/agenda.page.ts index 4b3636e21..3249f2caa 100644 --- a/src/app/pages/agenda/agenda.page.ts +++ b/src/app/pages/agenda/agenda.page.ts @@ -300,7 +300,6 @@ export class AgendaPage implements OnInit { // show information about the clicked event in timeline eventClicked(event: CalendarEvent): void { - /* console.log('Event clicked', event); */ //clear this.setIntervenient([]); @@ -370,7 +369,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; } @@ -410,7 +408,7 @@ export class AgendaPage implements OnInit { // if (startTimeSamp < endTimeSamp && endDay == 29 && (endMinutes + endHours) == 0) { - // // console.log(id, (endMinutes + endHours)) + // // // classs.push(`calendar-event-border`); // } @@ -521,7 +519,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"); @@ -531,13 +528,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(); @@ -566,7 +561,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(); @@ -584,7 +579,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 @@ -598,7 +592,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(); @@ -619,7 +613,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) => { - // ('ALL MD EVENTS', response); this.addEventToDB(response, "md"); @@ -629,13 +622,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(); @@ -662,7 +655,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(); @@ -699,7 +692,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(); @@ -735,7 +728,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(); @@ -781,7 +774,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(); @@ -845,6 +838,8 @@ export class AgendaPage implements OnInit { } } + + if(this.loggeduser.SharedCalendars.length != 0) { @@ -863,6 +858,8 @@ export class AgendaPage implements OnInit { this.TimelinePRList = this.listBoxService.list(this.listToPresent, 'pr', this.rangeStartDate, this.rangeEndDate, { segment: this.segment, selectedDate: this.eventSelectedDate }) + // + this.myCal.update(); this.myCal.loadEvents(); @@ -896,7 +893,7 @@ export class AgendaPage implements OnInit { } trasnformData(response, profile) { - // console.log('Transform ', response) + response.forEach(element => { let event = { startTime: new Date(element.StartDate), @@ -910,14 +907,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), @@ -931,7 +928,7 @@ export class AgendaPage implements OnInit { this.array.push(event) }); this.listToPresent = this.array; - // console.log('LIST TO PRESET', this.listToPresent) + } } @@ -957,7 +954,7 @@ export class AgendaPage implements OnInit { }); this.storage.set('agendaResponse',responseArray).then(() => { - // console.log('Agenda data saved') + }) } else { if (response.length > 0) { @@ -984,7 +981,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) @@ -998,7 +995,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) @@ -1128,7 +1125,7 @@ export class AgendaPage implements OnInit { this.updateEventListBox() } else { - // console.log('not valid ' + a) + } @@ -1136,7 +1133,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'; @@ -1153,7 +1150,7 @@ export class AgendaPage implements OnInit { this.updateEventListBox() } else { - // console.log('not valid ' + a) + } } @@ -1255,7 +1252,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, diff --git a/src/app/pages/agenda/edit-event/edit-event.page.ts b/src/app/pages/agenda/edit-event/edit-event.page.ts index 16b0cec2d..070ad2b19 100644 --- a/src/app/pages/agenda/edit-event/edit-event.page.ts +++ b/src/app/pages/agenda/edit-event/edit-event.page.ts @@ -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) } diff --git a/src/app/pages/agenda/event-actions-popover/event-actions-popover.page.ts b/src/app/pages/agenda/event-actions-popover/event-actions-popover.page.ts index 4ad9714c7..3549686fe 100644 --- a/src/app/pages/agenda/event-actions-popover/event-actions-popover.page.ts +++ b/src/app/pages/agenda/event-actions-popover/event-actions-popover.page.ts @@ -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 { diff --git a/src/app/pages/agenda/new-event/new-event.page.ts b/src/app/pages/agenda/new-event/new-event.page.ts index 29614cb49..7a8277286 100644 --- a/src/app/pages/agenda/new-event/new-event.page.ts +++ b/src/app/pages/agenda/new-event/new-event.page.ts @@ -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') + } }); diff --git a/src/app/pages/agenda/view-event/view-event.page.ts b/src/app/pages/agenda/view-event/view-event.page.ts index a5462ce49..8b6d933ba 100644 --- a/src/app/pages/agenda/view-event/view-event.page.ts +++ b/src/app/pages/agenda/view-event/view-event.page.ts @@ -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) + }) } diff --git a/src/app/pages/chat/chat.page.ts b/src/app/pages/chat/chat.page.ts index baf825943..959fd66c4 100644 --- a/src/app/pages/chat/chat.page.ts +++ b/src/app/pages/chat/chat.page.ts @@ -137,7 +137,7 @@ export class ChatPage implements OnInit { this.authService.userData$.subscribe((res: any) => { this.loggedUser = res; - console.log(this.loggedUser); + }); this.hideRefreshButton(); @@ -168,7 +168,7 @@ export class ChatPage implements OnInit { ngOnDestroy() { this.setStatus('offline'); this.dataService.set("newGroup", false); - console.log('On Destroy') + } setStatus(status: string) { @@ -177,7 +177,7 @@ export class ChatPage implements OnInit { status: status, } this.chatService.setUserStatus(body).subscribe(res => { - console.log(res); + }) } @@ -210,7 +210,7 @@ export class ChatPage implements OnInit { this.showGroupContacts = false; this.showNewEvent = false; this.showAttendees = false; - console.log('All components closed!'); + } showEmptyContainer() { @@ -241,7 +241,7 @@ export class ChatPage implements OnInit { } } openContactsPage() { - console.log('OK'); + this.idSelected = ''; this.closeAllDesktopComponents(); @@ -249,7 +249,7 @@ export class ChatPage implements OnInit { this.selectContact(); } else { - console.log('here'); + this.showContacts = true; } } @@ -283,7 +283,7 @@ export class ChatPage implements OnInit { this.closeAllDesktopComponents(); this.showEmptyComponent = false; this.roomId = rid; - console.log(this.roomId); + this.showGroupMessages = true; } } @@ -299,7 +299,7 @@ export class ChatPage implements OnInit { this.groupRoomId = data.roomId; this.closeAllDesktopComponents(); if (window.innerWidth < 701) { - console.log('Mobile'); + } else { this.showNewEvent = true; @@ -355,7 +355,7 @@ export class ChatPage implements OnInit { let params = new HttpParams(); params = params.set("types", "c"); this.chatService.customsRooms(params).subscribe(res => { - //console.log(res); + // }); } @@ -369,9 +369,9 @@ export class ChatPage implements OnInit { var dateB = new Date(b._updatedAt).getTime(); return dateB - dateA; }); - //console.log('DIRECTMESSAGE FROM DB', this.userDirectMessages); + // - //console.log('ROOMS FROM DB', rooms) + // }) this.storageservice.get('chatusers').then((users) => { @@ -379,7 +379,7 @@ export class ChatPage implements OnInit { }) } else { this.sqlservice.getAllChatRoom().then((rooms: any) => { - //console.log('ROOMS FROM DB', rooms) + // let roomsArray = []; rooms.forEach(element => { let roomListDB = { @@ -399,16 +399,16 @@ export class ChatPage implements OnInit { var dateB = new Date(b._updatedAt).getTime(); return dateB - dateA; }); - //console.log('DIRECTMESSAGE FROM DB', this.userDirectMessages); + // - //console.log('ROOMS FROM DB', rooms) + // }) this.sqlservice.getAllChatUsers().then((userslist: any) => { - //console.log('USERS FOM DB 1', userslist) + // let chatusersArray = []; userslist.forEach(element => { - console.log('USERS FOM DB 2', element) + let userListDB = { _id: element.Id, name: element.Name, @@ -436,7 +436,7 @@ export class ChatPage implements OnInit { _updatedAt: element._updatedAt } - //console.log(' Web TRANSFORM ROOM LIST', roomList) + // roomsArray.push(roomList) }); @@ -453,7 +453,7 @@ export class ChatPage implements OnInit { updatedat: element._updatedAt } - //console.log('TRANSFORM ROOM LIST', roomList) + // this.sqlservice.addChatListRoom(roomList); }); } @@ -463,26 +463,26 @@ export class ChatPage implements OnInit { if (this.platform.is('desktop') || this.platform.is('mobileweb')) { let usersArray = []; users.forEach(element => { - //console.log('TRANSFORM USER CHAT 1', element) + // let chatusers = { _id: element._id, name: element.name, username: element.username } - //console.log('TRANSFORM USER CHAT 2', chatusers) + // usersArray.push(chatusers); }); await this.storageservice.remove('chatusers'); await this.storageservice.store('chatusers',usersArray); } else { users.forEach(element => { - //console.log('TRANSFORM USER CHAT 1', element) + // let chatusers = { id: element._id, name: element.name, username: element.username } - //console.log('TRANSFORM USER CHAT 2', chatusers) + // this.sqlservice.addChatListUsers(chatusers); }); } @@ -499,12 +499,12 @@ export class ChatPage implements OnInit { async getChatMembers() { //return await this.chatService.getMembers(roomId).toPromise(); this.chatService.getAllUsers().subscribe(res => { - //console.log('chatusers', res); + // this.transformDataUserList(res['users']) /* if (this.platform.is('desktop') || this.platform.is('mobileweb')) { this.dmUsers = res['users'].filter(data => data.username != this.loggedUserChat.me.username); - //console.log(this.dmUsers); + // }*/ }); @@ -520,7 +520,7 @@ export class ChatPage implements OnInit { return dateB - dateA; }); - console.log('GROUPS FROM DB', k) + this.allGroups = rooms.sort((a, b) => { @@ -530,7 +530,7 @@ export class ChatPage implements OnInit { }); - //console.log('GROUPS FROM DB', this.allGroups) + // }) this.storageservice.get('chatusers').then((users) => { @@ -559,15 +559,15 @@ export class ChatPage implements OnInit { var dateB = new Date(b._updatedAt).getTime(); return dateB - dateA; }); - //console.log('Group FROM DB', this.allGroups); + // }) /* this.sqlservice.getAllChatUsers().then((userslist: any) => { - console.log('USERS FOM DB 1', userslist) + let chatusersArray = []; userslist.forEach(element => { - console.log('USERS FOM DB 2', element) + let userListDB = { _id: element.Id, name: element.Name, @@ -598,7 +598,7 @@ export class ChatPage implements OnInit { _updatedAt: element._updatedAt } - console.log(' Web TRANSFORM ROOM LIST', roomList) + groupsArray.push(roomList) }); @@ -617,7 +617,7 @@ export class ChatPage implements OnInit { updatedat: element._updatedAt } - console.log('TRANSFORM ROOM LIST', roomList) + this.sqlservice.addChatListRoom(roomList); }); } @@ -626,7 +626,7 @@ export class ChatPage implements OnInit { async getGroups(event?) { this.result = this.chatService.getAllPrivateGroups().subscribe(async (res: any) => { - //console.log(res); + // this.showLoader = false; if (res.groups != 200) { @@ -634,7 +634,7 @@ export class ChatPage implements OnInit { this.getGroupsDB(); this.privateGroups = res.groups; - console.log('Chat list group' , res); + /* this.result = this.chatService.getAllUserChannels().subscribe((res:any)=>{ this.publicGroups = res.channels; */ //let all = this.privateGroups.concat(this.publicGroups); @@ -643,10 +643,10 @@ export class ChatPage implements OnInit { var dateB = new Date(b._updatedAt).getTime(); return dateB - dateA; }); */ - //console.log(this.allGroups); + // /* }); */ if (this.route.url != "/home/chat") { - //console.log("Timer message stop") + // } else { //Check if modal is opened @@ -699,7 +699,7 @@ export class ChatPage implements OnInit { }); await modal.present(); modal.onDidDismiss().then((res) => { - console.log(res.data); + this.modalController.dismiss(res.data); }); } @@ -707,7 +707,7 @@ export class ChatPage implements OnInit { async openMessagesModal(roomId: any) { this.closeAllDesktopComponents(); - //console.log(roomId); + // const modal = await this.modalController.create({ component: MessagesPage, @@ -722,7 +722,7 @@ export class ChatPage implements OnInit { async openGroupMessagesModal(roomId: any) { - console.log(roomId); + const modal = await this.modalController.create({ component: GroupMessagesPage, @@ -737,7 +737,7 @@ export class ChatPage implements OnInit { // this.crop.crop('path/to/image.jpg', {quality: 75}) // .then( - // newImage => console.log('new image path is: ' + newImage), + // newImage => // error => console.error('Error cropping image', error) // ); diff --git a/src/app/pages/chat/edit-group/edit-group.page.ts b/src/app/pages/chat/edit-group/edit-group.page.ts index 5d5c1d1f2..434bfc007 100644 --- a/src/app/pages/chat/edit-group/edit-group.page.ts +++ b/src/app/pages/chat/edit-group/edit-group.page.ts @@ -34,7 +34,7 @@ export class EditGroupPage implements OnInit { getRoomInfo(){ this.chatService.getRoomInfo(this.roomId).subscribe(room=>{ this.room = room['room']; - console.log(this.room); + this.groupName = this.room.name.split('-').join(' '); }); } @@ -55,7 +55,7 @@ export class EditGroupPage implements OnInit { }); } else{ - console.log("Invalid name!"); + } } _ionChange(event){ @@ -72,13 +72,13 @@ export class EditGroupPage implements OnInit { text: 'Ok', cssClass: 'btn-cancel', handler:(value:any)=>{ - console.log('button done pressed'); + this.selectedDuration = [ value.days.value, value.hours.value, value.minutes.value, ] - console.log(this.selectedDuration); + if(value.days.value != null && value.hours.value != null && value.minutes.value != null){ if(value.days.value > 0){ if(value.days.value == 1){ diff --git a/src/app/pages/chat/group-messages/group-contacts/group-contacts.page.ts b/src/app/pages/chat/group-messages/group-contacts/group-contacts.page.ts index 3df49f8d2..aa1c439ba 100644 --- a/src/app/pages/chat/group-messages/group-contacts/group-contacts.page.ts +++ b/src/app/pages/chat/group-messages/group-contacts/group-contacts.page.ts @@ -58,8 +58,8 @@ export class GroupContactsPage implements OnInit { ngOnInit() { this.loadUsers(); this.getMembers(); - console.log(this.groupName); - console.log(this.isGroupCreated); + + } loadUsers(){ @@ -82,7 +82,7 @@ export class GroupContactsPage implements OnInit { } return 0; }); - console.log(this.users); + this.showLoader = false; }); @@ -124,16 +124,16 @@ export class GroupContactsPage implements OnInit { "roomId": this.room._id, "userId": data._id, } - console.log(body); + if(this.room.t == "p"){ this.chatService.removeGroupMember(body).subscribe(res=>{ - console.log(res); + this.getMembers(); }); } else if(this.room.t == "c"){ this.chatService.removeChannelMember(body).subscribe(res=>{ - console.log(res); + this.getMembers(); }); } @@ -154,7 +154,7 @@ export class GroupContactsPage implements OnInit { this.textSearch = event.detail.value; } clicked(){ - console.log('clicked'); + } selectedContact(user:any){ @@ -164,11 +164,11 @@ export class GroupContactsPage implements OnInit { } addContacts(room:any){ - console.log(room); + this.selectedUserList = this.users.filter(function(contact) { return contact.isChecked == true; }); - console.log( this.selectedUserList); + this.selectedUserList.forEach(user=>{ let body ={ "roomId":room._id, @@ -176,7 +176,7 @@ export class GroupContactsPage implements OnInit { } this.chatService.addUserToGroup(body).subscribe(res=>{ - console.log(res['success']); + }); }); } @@ -191,7 +191,7 @@ export class GroupContactsPage implements OnInit { async openGroupMessages(roomId:any){ this.close(); - console.log(roomId); + const modal = await this.modalController.create({ component: GroupMessagesPage, componentProps: { diff --git a/src/app/pages/chat/group-messages/group-messages.page.ts b/src/app/pages/chat/group-messages/group-messages.page.ts index 90aac2e76..54123c486 100644 --- a/src/app/pages/chat/group-messages/group-messages.page.ts +++ b/src/app/pages/chat/group-messages/group-messages.page.ts @@ -132,7 +132,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy { } ngOnInit() { - console.log(this.roomId); + this.loggedUser = this.loggedUserChat; this.getRoomInfo(); this.scrollToBottom(); @@ -142,7 +142,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy { this.getRoomMessageDB(this.roomId); this.wsChatMethodsService.getUserOfRoom(this.roomId).then((value) => { - console.log('MEMBER', value) + }) VoiceRecorder.requestAudioRecordingPermission(); //this.loadFiles(); @@ -154,7 +154,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy { status: status, } // this.chatService.setUserStatus(body).subscribe(res => { - // console.log(res); + // // }) } @@ -221,19 +221,19 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy { path: fileName, directory: Directory.Data }) - //console.log(audioFile); + // const base64sound = audioFile.data; //Converting base64 to blob const base64 = await fetch(base64sound); - //console.log(base64); + // const base64Response = await fetch(`data:audio/ogg;base64,${base64sound}`); - //console.log(base64Response); + // this.audioRecorded = base64Response.url; - console.log(this.audioRecorded); + } @@ -261,13 +261,13 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy { stopRecording() { this.deleteRecording(); this.allowTyping = false; - console.log('Stop'); + if (!this.recording) { return; } this.recording = false; VoiceRecorder.stopRecording().then(async (result: RecordingData) => { - console.log('==================================', result); + this.recording = false; if (result.value && result.value.recordDataBase64) { @@ -277,7 +277,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy { //Save file await this.storage.set('fileName', fileName) this.storage.set('recordData', result).then(() => { - console.log('Audio recorded saved', result); + setTimeout(async () => { this.loadFiles(); @@ -337,7 +337,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy { }); await modal.present(); modal.onDidDismiss().then((res) => { - console.log(res); + }); } @@ -375,10 +375,10 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy { async getChatMembers() { this.chatService.getAllUsers().subscribe(res => { - console.log(res); + this.allUsers = res['users'].filter(data => data.username != SessionStore.user.UserName); - console.log(this.allUsers); + }); } @@ -402,7 +402,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy { //If group is private call getGroupMembers if (this.room.t === 'p') { this.chatService.getGroupMembers(this.roomId).subscribe(res => { - console.log(res); + this.members = res['members']; this.showLoader = false; }); @@ -410,7 +410,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy { //Otherwise call getChannelMembers for públic groups else { this.chatService.getChannelMembers(this.roomId).subscribe(res => { - console.log(res); + this.members = res['members']; this.showLoader = false; }); @@ -475,7 +475,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy { //Converting base64 to blob const encodedData = btoa(this.audioRecorded); const blob = this.base64toBlob(encodedData, recordData.value.mimeType) - console.log(blob) + const formData = new FormData(); formData.append("blobFile", blob); @@ -510,11 +510,11 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy { await modal.present(); modal.onDidDismiss().then(res => { if (res.data == 'leave') { - console.log('saiu do grupo'); + //this.wsChatMethodsService.subscribeToRoomUpdate(this.roomId, this.room); } else if (res.data == 'cancel') { - console.log('cancel'); + } else if (res.data == 'edit') { this.editGroup(this.roomId); @@ -593,7 +593,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy { IsRequired: "true", } }); - console.log(this.attendees); + this.popoverController.dismiss(); if (window.innerWidth <= 1024) { const modal = await this.modalController.create({ @@ -700,16 +700,16 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy { const file: any = await this.fileService.getFileFromDevice(types); - console.log('Add file', JSON.stringify(await this.getBase64(file))) + if (file.type != "application/img" && file.type != "image/png" && file.type != "image/jpeg" && file.type != "image/gif") { const encodedData = btoa(JSON.stringify(await this.getBase64(file))); const blob = this.base64toBlob(encodedData, file.type) - console.log('Add Blob file', blob) + const formData = new FormData(); formData.append('blobFile', blob); - console.log(formData) + this.wsChatMethodsService.getGroupRoom(roomId).send({ file: { @@ -726,7 +726,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy { }); } else { - console.log('File type invalid') + } } @@ -745,14 +745,14 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy { resolve(reader.result) }; reader.onerror = function (error) { - console.log('Error: ', error); + }; }); } async openChatOptions(ev?: any) { - console.log(this.members); + const roomId = this.roomId; const popover = await this.popoverController.create({ @@ -768,7 +768,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy { }); await popover.present(); await popover.onDidDismiss().then(async (res) => { - console.log(res['data']); + if (res['data'] == 'meeting') { this.bookMeeting(); } @@ -790,7 +790,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy { } async addContacts() { - console.log(this.members); + const modal = await this.modalController.create({ component: GroupContactsPage, @@ -821,7 +821,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy { }); await modal.present(); modal.onDidDismiss().then((res) => { - console.log(res.data); + this.getRoomInfo(); //this.modalController.dismiss(res.data); }); @@ -833,18 +833,18 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy { buttons: [{ text: 'Sair do grupo', handler: () => { - console.log('Delete clicked'); + } }, { text: 'Alterar nome do grupo1', handler: () => { - console.log('Alterar nome do grupo'); + this.openChangeGroupName() } }, { text: 'Apagar o grupo', handler: () => { - console.log('Play clicked'); + } }, ] @@ -857,11 +857,11 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy { if (this.platform.is('desktop') || this.platform.is('mobileweb')) { } else { this.sqlservice.getAllChatMSG(roomId).then((msg: any) => { - console.log('ALL MSG DBBB', msg) + let chatmsgArray = []; let array = [] msg.forEach(element => { - console.log('CHANNEL ELEMENT', element.channels) + let msgChat = { _id: element.Id, @@ -881,7 +881,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy { }); // this.messages = chatmsgArray; - console.log('GROUP CHAT MSG FROM DB', chatmsgArray) + }) } } @@ -939,18 +939,18 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy { //this.loadMessages() let msgOnly = res['messages'].filter(data => data.t != 'au'); //this.messages = msgOnly.reverse(); - // console.log('MOBILE MSG ROCKET',this.messages); + // this.transformDataMSG(msgOnly.reverse()); this.getRoomMessageDB(this.roomId); // Reconnect in one second if (this.route.url != "/home/chat") { - console.log("Timer message stop") + } else { //Check if modal is opened if (document.querySelector('.isGroupChatOpened')) { await new Promise(resolve => setTimeout(resolve, 5000)); await this.serverLongPull(); - console.log('Timer message running') + } } @@ -1040,18 +1040,18 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy { } else { pathFile = this.file.externalRootDirectory } - console.log(pdfString) - console.log(pathFile) - console.log(contentFile) + + + this.file .writeFile(pathFile, fileName, contentFile, { replace: true }) .then(success => { this.fileOpener .open(pathFile + fileName, 'application/pdf') - .then(() => console.log('File is opened')) - .catch(e => console.log('Error opening file', e)); + .then(() => console.log()) + .catch(e => console.error(e)) }) - .catch(e => console.log('Error writing file', e)) + .catch(e => console.error(e)) } downloadFileMsg(msg: MessageService) { @@ -1103,7 +1103,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy { } async audioPreview(msg) { - console.log(msg); + if (!msg.attachments[0].title_link || msg.attachments[0].title_link === null || msg.attachments[0].title_link === '') { this.downloadFileMsg(msg) } else { } diff --git a/src/app/pages/chat/messages/contacts/contacts.page.ts b/src/app/pages/chat/messages/contacts/contacts.page.ts index a2b305a60..b369d5dd3 100644 --- a/src/app/pages/chat/messages/contacts/contacts.page.ts +++ b/src/app/pages/chat/messages/contacts/contacts.page.ts @@ -55,7 +55,7 @@ export class ContactsPage implements OnInit { headers: this.headers, }; this.chatService.getAllUsers().subscribe((res:any)=>{ - console.log('All users',res.users); + this.contacts = res.users.filter(data => data.username != this.sessionStore.user.UserName); this.users = this.contacts.sort((a,b) => { if(a.name < b.name){ @@ -92,7 +92,7 @@ export class ContactsPage implements OnInit { } clicked(){ - console.log('clicked'); + } createRoom(username:string){ @@ -100,29 +100,29 @@ export class ContactsPage implements OnInit { username: username, } this.chatService.createRoom(body).subscribe(res => { - console.log(res); + this.room = res['room']; - console.log(this.room._id); + this.getDirectMessage(this.room._id); this.WsChatMethodsService.getAllRooms() }); } getDirectMessage(roomId:any){ - console.log(roomId); + this.chatService.getAllDirectMessages().subscribe(res=>{ let result = res['ims'].filter(data => data._id == roomId); - console.log(result[0]); + this.dm = result[0]; - console.log(this.dm); + this.openModal(this.dm._id); }); } async openModal(roomId:any){ this.close(); - console.log(roomId); + const modal = await this.modalController.create({ component: MessagesPage, @@ -143,7 +143,7 @@ export class ContactsPage implements OnInit { this.createRoom(username); //Get direct messages (dm) /* this.getDirectMessage(this.room._id); */ - console.log(this.dm); + /* const modal = await this.modalController.create({ diff --git a/src/app/pages/chat/messages/messages.page.ts b/src/app/pages/chat/messages/messages.page.ts index 422fe2c1a..a1a812bed 100644 --- a/src/app/pages/chat/messages/messages.page.ts +++ b/src/app/pages/chat/messages/messages.page.ts @@ -134,7 +134,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy { ) { this.loggedUser = authService.ValidatedUserChat['data']; this.roomId = this.navParams.get('roomId'); - console.log('ROOM ID', this.roomId) + window.onresize = (event) => { if (window.innerWidth > 701) { @@ -142,7 +142,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy { } } - console.log(this.wsChatMethodsService.getDmRoom(this.roomId).loadHistory({})); + this.wsChatMethodsService.getDmRoom(this.roomId).loadHistory({}) this.wsChatMethodsService.getDmRoom(this.roomId).scrollDown = this.scrollToBottomClicked @@ -157,7 +157,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy { ngOnInit() { this.wsChatMethodsService.getUserOfRoom(this.roomId).then((value) => { - console.log('MEMBER', value) + }) //this.loadFiles(); VoiceRecorder.requestAudioRecordingPermission(); @@ -254,13 +254,13 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy { stopRecording() { this.deleteRecording(); this.allowTyping = false; - console.log('Stop'); + if (!this.recording) { return; } this.recording = false; VoiceRecorder.stopRecording().then(async (result: RecordingData) => { - console.log(result); + this.recording = false; if (result.value && result.value.recordDataBase64) { const recordData = result.value.recordDataBase64; @@ -269,7 +269,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy { //Save file this.storage.set('fileName', fileName); this.storage.set('recordData', result).then(() => { - console.log('Audio recorded saved'); + }) } }) @@ -354,7 +354,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy { }); await modal.present(); modal.onDidDismiss().then((res) => { - console.log(res); + }); } @@ -422,12 +422,12 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy { this.audioRecorded = `data:${recordData.value.mimeType};base64,${recordData?.value?.recordDataBase64}`; } - console.log(this.audioRecorded); + //Converting base64 to blob const encodedData = btoa(this.audioRecorded); const blob = this.base64toBlob(encodedData, recordData.value.mimeType) - console.log(blob) + const formData = new FormData(); formData.append("blobFile", blob); @@ -450,7 +450,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy { } viewDocument(file: any, url?: string) { - console.log() + if (file.type == "application/webtrix") { this.openViewDocumentModal(file); } @@ -462,7 +462,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy { /* playSound(url?:any){ alert('here') - console.log(url); + //this.audioDownloaded = this.sanitiser.bypassSecurityTrustResourceUrl(url); this.audioDownloaded = url; } */ @@ -601,7 +601,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy { IsRequired: "true", } }); - console.log(this.attendees); + this.popoverController.dismiss(); if (window.innerWidth <= 1024) { const modal = await this.modalController.create({ @@ -635,7 +635,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy { const blob = await base64.blob(); const formData = new FormData(); formData.append("blobFile", blob); - console.log('ALL IMAGE', formData) + this.wsChatMethodsService.getDmRoom(roomId).send({ file: { @@ -715,9 +715,9 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy { resultType: CameraResultType.Base64, source: CameraSource.Photos }); - console.log('ADDFILECHAT', file) + //const imageData = await this.fileToBase64Service.convert(file) - //console.log('ADDFILECHAT', imageData) + // const response = await fetch('data:image/jpeg;base64,' + file.base64String!); const blob = await response.blob(); @@ -752,17 +752,17 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy { const file: any = await this.fileService.getFileFromDevice(types); - console.log('Add file', JSON.stringify(await this.getBase64(file))) + if (file.type != "application/img" && file.type != "image/png" && file.type != "image/jpeg" && file.type != "image/gif") { const encodedData = btoa(JSON.stringify(await this.getBase64(file))); const blob = this.base64toBlob(encodedData, file.type) - console.log('Add Blob file', blob) + const formData = new FormData(); formData.append('blobFile', blob); - console.log(formData) + this.wsChatMethodsService.getDmRoom(roomId).send({ file: { @@ -778,7 +778,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy { temporaryData: formData }); } else { - console.log('File type invalid') + } @@ -793,7 +793,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy { resolve(reader.result) }; reader.onerror = function (error) { - console.log('Error: ', error); + }; }); @@ -801,7 +801,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy { async openChatOptions(ev?: any) { const roomId = this.roomId - console.log('MOBILE CHAT OPTION', this.members); + const popover = await this.popoverController.create({ component: ChatOptionsPopoverPage, @@ -816,7 +816,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy { }); await popover.present(); popover.onDidDismiss().then(async (res) => { - console.log(res['data']); + if (res['data'] == 'meeting') { this.bookMeeting(); } @@ -843,11 +843,11 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy { if (this.platform.is('desktop') || this.platform.is('mobileweb')) { } else { this.sqlservice.getAllChatMSG(roomId).then((msg: any) => { - console.log('ALL MSG DBBB', msg) + let chatmsgArray = []; let array = [] msg.forEach(element => { - console.log('CHANNEL ELEMENT', element.channels) + let msgChat = { _id: element.Id, @@ -867,7 +867,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy { }); - console.log('CHAT MSG FROM DB', chatmsgArray) + }) } } @@ -958,18 +958,18 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy { // } else { // pathFile = this.file.externalRootDirectory // } - // console.log(pdfString) - // console.log(pathFile) - // console.log(contentFile) + // + // + // // this.file // .writeFile(pathFile, fileName, contentFile, { replace: true }) // .then(success => { // this.fileOpener // .open(pathFile + fileName, type) - // .then(() => console.log('File is opened')) - // .catch(e => console.log('Error opening file', e)); + // .then(() => + // .catch(e => // }) - // .catch(e => console.log('Error writing file', e)) + // .catch(e => } downloadFileFromBrowser(fileName: string, data: any): void { @@ -982,7 +982,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy { async openPreview(msg) { - console.log(msg); + if(msg.file.type === "application/webtrix") { this.viewDocument(msg.file, msg.attachments.image_url) @@ -1021,7 +1021,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy { } async audioPreview(msg) { - console.log(msg); + if (!msg.attachments[0].title_link || msg.attachments[0].title_link === null || msg.attachments[0].title_link === '') { this.downloadFileMsg(msg) } else { } diff --git a/src/app/pages/chat/new-group/contacts/contacts.page.ts b/src/app/pages/chat/new-group/contacts/contacts.page.ts index 9433f60be..131e4cc76 100644 --- a/src/app/pages/chat/new-group/contacts/contacts.page.ts +++ b/src/app/pages/chat/new-group/contacts/contacts.page.ts @@ -86,8 +86,8 @@ export class ContactsPage implements OnInit { } return 0; }); - console.log(res); - console.log(this.users); + + }); */ this.users = this.contacts.sort((a,b) => { if(a.first < b.first){ @@ -135,7 +135,7 @@ export class ContactsPage implements OnInit { } clicked(){ - console.log('clicked'); + } async groupMessages(){ diff --git a/src/app/pages/chat/new-group/new-group.page.ts b/src/app/pages/chat/new-group/new-group.page.ts index ee07a6cce..98fb86bf8 100644 --- a/src/app/pages/chat/new-group/new-group.page.ts +++ b/src/app/pages/chat/new-group/new-group.page.ts @@ -44,7 +44,7 @@ export class NewGroupPage implements OnInit { } ngOnInit() { - console.log(this.documents); + } _ionChange(event){ @@ -62,7 +62,7 @@ export class NewGroupPage implements OnInit { } async createGroup(){ - console.log('NEW GROUP', SessionStore.user.UserName) + let name = this.groupName.split(' ').join('-'); //Take out all special characters in string name = name.normalize("NFD").replace(/[\u0300-\u036f]/g, ""); @@ -75,11 +75,11 @@ export class NewGroupPage implements OnInit { "countDownDate":this.thedate } res = await this.wsChatMethodsService.createPrivateRoom(name, SessionStore.user.UserName, customFields); - console.log(res); + } else{ res = await this.wsChatMethodsService.createPrivateRoom(name, SessionStore.user.UserName, customFields); - console.log(res); + } this.isGroupCreated = true; @@ -94,7 +94,7 @@ export class NewGroupPage implements OnInit { this.close(); let name = this.groupName.split(' ').join('-'); - console.log(name); + const modal = await this.modalController.create({ component: GroupContactsPage, @@ -130,7 +130,7 @@ export class NewGroupPage implements OnInit { text: 'Ok', cssClass: 'btn-cancel', handler:(value:any)=>{ - console.log('button done pressed'); + let now = new Date(); this.thedate = new Date(now.getFullYear(), now.getMonth(), now.getDate() + value.days.value, now.getHours() + value.hours.value, now.getMinutes() + value.minutes.value, now.getSeconds(), now.getMilliseconds()); @@ -139,7 +139,7 @@ export class NewGroupPage implements OnInit { value.hours.value, value.minutes.value, ] - console.log(this.selectedDuration); + if(value.days.value != null && value.hours.value != null && value.minutes.value != null){ if(value.days.value > 0){ if(value.days.value == 1){ diff --git a/src/app/pages/events/edit-event/edit-event.page.ts b/src/app/pages/events/edit-event/edit-event.page.ts index 1d9b0717b..8324b12c9 100644 --- a/src/app/pages/events/edit-event/edit-event.page.ts +++ b/src/app/pages/events/edit-event/edit-event.page.ts @@ -72,7 +72,7 @@ export class EditEventPage implements OnInit { else{ this.pageId = paramMap.get('eventId'); eventid = paramMap.get('eventId'); - console.log(eventid); + } if (paramMap.has("caller")){ @@ -164,7 +164,7 @@ export class EditEventPage implements OnInit { this.activatedRoute.paramMap.subscribe(paramMap =>{ if (paramMap.has("profile")){ - console.log(paramMap.get('profile')); + } }); @@ -192,7 +192,7 @@ export class EditEventPage implements OnInit { { this.attachamentsService.getAttachmentsById(this.pageId).subscribe(res => { this.loadedEventAttachments = res; - console.log(res); + }); } diff --git a/src/app/pages/events/event-detail-modal/event-detail-modal.page.ts b/src/app/pages/events/event-detail-modal/event-detail-modal.page.ts index 662d78d27..c49c78eab 100644 --- a/src/app/pages/events/event-detail-modal/event-detail-modal.page.ts +++ b/src/app/pages/events/event-detail-modal/event-detail-modal.page.ts @@ -74,7 +74,7 @@ export class EventDetailModalPage implements OnInit { else{ this.pageId = paramMap.get('eventId'); eventid = paramMap.get('eventId'); - console.log(eventid); + } if (paramMap.has("caller")){ @@ -190,10 +190,10 @@ export class EventDetailModalPage implements OnInit { this.loadedEventAttachments = attachments; }); */ this.attachamentsService.getAttachmentsById(this.pageId).subscribe(res => { - console.log(res); + },(error) => { - console.log(error); + }); } diff --git a/src/app/pages/events/event-detail/event-detail.page.ts b/src/app/pages/events/event-detail/event-detail.page.ts index 0324721f9..6e30d1eb5 100644 --- a/src/app/pages/events/event-detail/event-detail.page.ts +++ b/src/app/pages/events/event-detail/event-detail.page.ts @@ -72,7 +72,6 @@ export class EventDetailPage implements OnInit { else{ this.pageId = paramMap.get('eventId'); eventid = paramMap.get('eventId'); - console.log(eventid); } if (paramMap.has("caller")){ @@ -162,7 +161,6 @@ export class EventDetailPage implements OnInit { this.activatedRoute.paramMap.subscribe(paramMap =>{ if (paramMap.has("profile")){ - console.log(paramMap.get('profile')); } }); @@ -188,11 +186,9 @@ export class EventDetailPage implements OnInit { loadAttachments() { - /* console.log(this.pageId); */ this.attachamentsService.getAttachmentsById(this.pageId).subscribe(res => { this.loadedEventAttachments = res; - console.log(res); }); } diff --git a/src/app/pages/events/events.page.ts b/src/app/pages/events/events.page.ts index ae509538d..53c0f5cec 100644 --- a/src/app/pages/events/events.page.ts +++ b/src/app/pages/events/events.page.ts @@ -104,16 +104,15 @@ export class EventsPage implements OnInit { private storage: Storage, public p: PermissionService, ) { - /* this.existingScreenOrientation = this.screenOrientation.type; - console.log(this.existingScreenOrientation); */ + /* this.existingScreenOrientation = this.screenOrientation.type; */ this.loggeduser = authService.ValidatedUser; this.prEventList = null; this.platform.resize.subscribe(async () => { - //console.log('Resize event detected'); - // console.log('Resize event detected'); + // + // }); @@ -175,7 +174,7 @@ export class EventsPage implements OnInit { // Lock to portrait /* lockToPortrait() { this.screenOrientation.lock(this.screenOrientation.ORIENTATIONS.PORTRAIT); - console.log('set'); + } */ // Lock to landscape @@ -191,7 +190,7 @@ export class EventsPage implements OnInit { /* checkScreenOrientation() { if (window.innerWidth < 701) { this.lockToPortrait(); - console.log('was here'); + } else { @@ -263,7 +262,7 @@ export class EventsPage implements OnInit { if (this.platform.is('desktop') || this.platform.is('mobileweb')) { this.storage.set('events', list).then(() => { - // console.log('Init events saved') + // }) } else { if (list.length > 0) { @@ -308,7 +307,7 @@ export class EventsPage implements OnInit { if (this.platform.is('desktop') || this.platform.is('mobileweb')) { this.storage.set('process', list).then(() => { - // console.log('Init process saved') + // }) } else { if (list.length > 0) { @@ -328,17 +327,17 @@ export class EventsPage implements OnInit { // ('dateeeeee', dateToday) if (this.platform.is('desktop') || this.platform.is('mobileweb')) { this.storage.get('events').then((events: any[]) => { - // console.log('Today events',events) + // let todayEvents = new Array() this.listToPresent = events this.totalEvent = this.listToPresent.length this.currentEvent = this.listToPresent[0].Subject this.currentHoursMinutes = this.listToPresent[0].StartDate - // console.log("All events from local,", events) + // }) this.storage.get('process').then((process: any[]) => { - // console.log('OFOFOFOOF22222', process) + // const ExpedienteTask = process.map(e => this.expedienteTaskPipe.transform(e)) this.listToPresentexpediente = ExpedienteTask; }) @@ -372,7 +371,7 @@ export class EventsPage implements OnInit { Subject: element.Subject } let starteDate = momentG(new Date(element.StartDate), 'yyyy-MM-dd'); - // console.log('startTOdayyy', starteDate) + // if (dateToday == starteDate) { todayEvents.push(eventObject); } @@ -381,12 +380,12 @@ export class EventsPage implements OnInit { this.totalEvent = this.listToPresent.length this.currentEvent = this.listToPresent[0].Subject this.currentHoursMinutes = this.listToPresent[0].StartDate - // console.log("All events from local,", event) + // }) this.sqliteservice.getprocessByworkflow("Expediente").then((process: any[]) => { - // console.log('OFOFOFOOF', process) + // if (process.length > 0 || process != undefined) { @@ -408,7 +407,7 @@ export class EventsPage implements OnInit { } }) - // console.log('OFOFOFOOF22222', expedientlist) + // const ExpedienteTask = expedientlist.map(e => this.expedienteTaskPipe.transform(e)) this.listToPresentexpediente = ExpedienteTask; @@ -440,12 +439,12 @@ export class EventsPage implements OnInit { changeProfile() { if (this.profile == "mdgpr") { - // console.log('pr'); + // this.profile = "pr"; this.RefreshEvents(); } else { - // console.log('mdgpr'); + // this.profile = "mdgpr"; this.RefreshEvents(); } @@ -457,7 +456,7 @@ export class EventsPage implements OnInit { } async openEventDetail1(id: any) { - // console.log(id); + // const modal = await this.modalController.create({ component: EventDetailPage, @@ -474,7 +473,7 @@ export class EventsPage implements OnInit { LoadList() { this.processes.GetTaskListExpediente(false).subscribe(result => { - // console.log("Expediente", result); + // this.addProcessToDb(result); const ExpedienteTask = result.map(e => this.expedienteTaskPipe.transform(e)) @@ -485,7 +484,7 @@ export class EventsPage implements OnInit { }, ((error) => { this.showLoader = false; - // console.log('Getlist error', error) + // this.getEventsFromLocalDb(); })); } diff --git a/src/app/pages/gabinete-digital/despachos-pr/despacho-pr/despacho-pr.page.ts b/src/app/pages/gabinete-digital/despachos-pr/despacho-pr/despacho-pr.page.ts index 25c1c6c86..0ba668386 100644 --- a/src/app/pages/gabinete-digital/despachos-pr/despacho-pr/despacho-pr.page.ts +++ b/src/app/pages/gabinete-digital/despachos-pr/despacho-pr/despacho-pr.page.ts @@ -76,12 +76,12 @@ export class DespachoPrPage implements OnInit { } }); - console.log('DespachoPrPage SerialNumber', this.serialNumber) + } ngOnInit() { this.profile = "mdgpr"; - console.log(this.serialNumber); + this.activateRoute.paramMap.subscribe(paramMap => { if (!paramMap.has('SerialNumber')) { @@ -128,9 +128,9 @@ export class DespachoPrPage implements OnInit { this.fulltask = res; - console.log(this.task); + - console.log('GetTask', res); + this.updateProcessOnDB(res); let thedate = new Date(this.task.CreateDate); @@ -184,7 +184,7 @@ export class DespachoPrPage implements OnInit { getFromDB() { this.sqliteservice.getProcessById(this.serialNumber).then((process: any[]) => { - console.log('OFFLINE', process) + this.task = { "SerialNumber": process[0].serialNumber, "Folio": JSON.parse(process[0].workflowInstanceDataFields).Subject, @@ -200,7 +200,7 @@ export class DespachoPrPage implements OnInit { "DeadlineType": JSON.parse(process[0].workflowInstanceDataFields).DeadlineType, "activityInstanceName": process[0].activityInstanceName, } - console.log("OFFLINE TASK", this.task) + let fulltak = { Documents: JSON.parse(process[0].Documents), actions: JSON.parse(process[0].actions), @@ -218,7 +218,7 @@ export class DespachoPrPage implements OnInit { workflowName: process[0].workflowName } this.fulltask = fulltak; - console.log(this.task); + let thedate = new Date(this.task.CreateDate); this.customDate = this.days[thedate.getDay()] + ", " + thedate.getDate() + " de " + (this.months[thedate.getMonth()]); @@ -423,7 +423,7 @@ export class DespachoPrPage implements OnInit { await modal.present(); modal.onDidDismiss().then(async (res) => { - console.log(res); + if (res.data) { const DocumentToSave = res.data.documents.map((e) => { @@ -479,9 +479,9 @@ export class DespachoPrPage implements OnInit { }); await modal.present(); modal.onDidDismiss().then(res => { - console.log(res['data']); + if (res['data'] == 'openDiscart') { - console.log('open discart'); + this.distartExpedientModal(); } @@ -553,7 +553,7 @@ export class DespachoPrPage implements OnInit { } async distartExpedientModal() { - console.log(this.fulltask); + const modal = await this.modalController.create({ component: DiscartExpedientModalPage, componentProps: { @@ -569,7 +569,7 @@ export class DespachoPrPage implements OnInit { modal.onDidDismiss().then(res => { if (res['data'] == 'close') { this.close(); - /* console.log('2Expedient Discard closed2'); + /* this.close(); this.openMenu(); */ } diff --git a/src/app/pages/gabinete-digital/despachos-pr/despachos-pr.page.ts b/src/app/pages/gabinete-digital/despachos-pr/despachos-pr.page.ts index d7f77581e..66ab70730 100644 --- a/src/app/pages/gabinete-digital/despachos-pr/despachos-pr.page.ts +++ b/src/app/pages/gabinete-digital/despachos-pr/despachos-pr.page.ts @@ -107,7 +107,7 @@ export class DespachosPrPage implements OnInit { } openExpedientDetailPage(data) { - console.log(data); + } async LoadList() { @@ -118,7 +118,7 @@ export class DespachosPrPage implements OnInit { let result = await this.processes.GetTasksList("Despacho do Presidente da República", false).toPromise(); this.despachoList = []; this.skeletonLoader = false; - console.log(result); + let despachosPr; let despachos = this.sortService.sortArrayByDate(result); @@ -131,7 +131,7 @@ export class DespachosPrPage implements OnInit { break; } - console.log(despachosPr); + despachosPr = despachosPr.filter(data => data.workflowInstanceDataFields.Status == "Active"); despachosPr.forEach((element, index) => { @@ -168,10 +168,10 @@ export class DespachosPrPage implements OnInit { getFromDB() { this.sqliteservice.getAllProcess().then((all) => { - console.log('DESPACHO PR ALL', all) + }) this.sqliteservice.getprocessByworkflow('Despacho do Presidente da República').then(async (process: any[]) => { - console.log('DESPACHO PR', process) + let despachosPr; switch (this.loggeduser.Profile) { @@ -179,7 +179,7 @@ export class DespachosPrPage implements OnInit { despachosPr = await process.reverse().filter(data => data.activityInstanceName == "Tarefa de Despacho"); break; case 'PR': - console.log(process); + despachosPr = await process.reverse().filter(data => data.activityInstanceName == "Concluir Despacho"); break; @@ -206,7 +206,7 @@ export class DespachosPrPage implements OnInit { } this.despachoList.push(task); - console.log(this.despachoList); + }); this.listToPresent = this.despachoList; @@ -222,7 +222,7 @@ export class DespachosPrPage implements OnInit { } async viewExpedientDetail(serialNumber: any) { - console.log(this.profile); + let classs; if (window.innerWidth <= 800) { @@ -242,7 +242,7 @@ export class DespachosPrPage implements OnInit { }); await modal.present(); modal.onDidDismiss().then((res) => { - console.log('refresh list'); + this.LoadList(); }); } diff --git a/src/app/pages/gabinete-digital/despachos/despacho/despacho.page.ts b/src/app/pages/gabinete-digital/despachos/despacho/despacho.page.ts index 109da85fe..0edc3c97b 100644 --- a/src/app/pages/gabinete-digital/despachos/despacho/despacho.page.ts +++ b/src/app/pages/gabinete-digital/despachos/despacho/despacho.page.ts @@ -130,7 +130,7 @@ export class DespachoPage implements OnInit { async LoadTaskDetail(serial: string) { this.processes.GetTask(serial).subscribe((res: fullTask) => { - console.log('despacho detail', res) + this.task = { "SerialNumber": res.serialNumber, "Folio": res.workflowInstanceDataFields.Subject, @@ -157,14 +157,14 @@ export class DespachoPage implements OnInit { this.processes.GetTaskParticipants(this.task.FolderID).subscribe(users => { this.updateProcessInterveners(users) - console.log('interveniers online', users) + this.intervenientes = users.filter(user => { - console.log('interveniers online 2', users) + return user.Type == 'I'; }); this.cc = users.filter(user => { - console.log('interveniers online 3', users) + return user.Type == 'CC'; }); }); @@ -212,7 +212,7 @@ export class DespachoPage implements OnInit { origina = JSON.parse(process[0].originator) } - console.log('sqlite', process) + this.task = { "SerialNumber": process[0].serialNumber, @@ -253,13 +253,13 @@ export class DespachoPage implements OnInit { } this.fulltask = fulltak; - console.log('interveniers offline', intervine) + this.intervenientes = intervine.filter(user => { - console.log('interveniers offline 2', user) + return user.Type == 'I'; }); this.cc = intervine.filter(user => { - console.log('interveniers offline 3', user) + return user.Type == 'CC'; }); @@ -271,7 +271,7 @@ export class DespachoPage implements OnInit { async viewDocument(docId: string, Document) { - console.log(this.fulltask) + const modal = await this.modalController.create({ component: ViewDocumentPage, @@ -474,7 +474,7 @@ export class DespachoPage implements OnInit { }); await modal.present(); modal.onDidDismiss().then(async (res) => { - console.log(res['data']); + if (res['data'] == 'openDiscart') { await this.distartExpedientModal(); @@ -531,7 +531,7 @@ export class DespachoPage implements OnInit { } async distartExpedientModal() { - console.log(this.fulltask); + const modal = await this.modalController.create({ component: DiscartExpedientModalPage, componentProps: { @@ -547,7 +547,7 @@ export class DespachoPage implements OnInit { modal.onDidDismiss().then(res => { if (res['data'] == 'close') { this.close(); - /* console.log('2Expedient Discard closed2'); + /* this.close(); this.openMenu(); */ } diff --git a/src/app/pages/gabinete-digital/despachos/despachos.page.ts b/src/app/pages/gabinete-digital/despachos/despachos.page.ts index 9e68f9488..9f397e47c 100644 --- a/src/app/pages/gabinete-digital/despachos/despachos.page.ts +++ b/src/app/pages/gabinete-digital/despachos/despachos.page.ts @@ -68,7 +68,7 @@ export class DespachosPage implements OnInit { await this.despachoRule.getList({ updateStore: true }).then((pre) => { this.listToPresent = pre; - // console.log('despachooo', pre) + // }).catch(() => { this.getFromDb() }) @@ -103,7 +103,7 @@ export class DespachosPage implements OnInit { }); this.listToPresent = listtopresent; - console.log('Tarefas de despach', this.listToPresent) + }) } diff --git a/src/app/pages/gabinete-digital/diplomas-assinar/diploma-assinar/diploma-assinar.page.ts b/src/app/pages/gabinete-digital/diplomas-assinar/diploma-assinar/diploma-assinar.page.ts index d6f4f6a28..34c53fd33 100644 --- a/src/app/pages/gabinete-digital/diplomas-assinar/diploma-assinar/diploma-assinar.page.ts +++ b/src/app/pages/gabinete-digital/diplomas-assinar/diploma-assinar/diploma-assinar.page.ts @@ -93,9 +93,9 @@ export class DiplomaAssinarPage implements OnInit { } this.fulltask = res; - console.log(this.task); + - console.log('GetTask', res); + let thedate = new Date(this.task.CreateDate); this.customDate = this.days[thedate.getDay()]+ ", " + thedate.getDate() +" de " + ( this.months[thedate.getMonth()]); @@ -107,7 +107,7 @@ export class DiplomaAssinarPage implements OnInit { this.cc = users.filter(user=>{ return user.Type == 'CC'; }); - console.log(users); + }); this.getDocumentDetails(this.task.FolderId, '361'); @@ -155,8 +155,8 @@ export class DiplomaAssinarPage implements OnInit { getDocumentDetails(forlderId:string, applicationId:string) { this.processes.GetDocumentDetails(forlderId,applicationId).subscribe(res=>{ this.attachments = res.Documents; - console.log(res['Documents']); - console.log(this.attachments); + + }) } diff --git a/src/app/pages/gabinete-digital/diplomas/diploma/diploma.page.ts b/src/app/pages/gabinete-digital/diplomas/diploma/diploma.page.ts index ebefb8359..c973404dc 100644 --- a/src/app/pages/gabinete-digital/diplomas/diploma/diploma.page.ts +++ b/src/app/pages/gabinete-digital/diplomas/diploma/diploma.page.ts @@ -53,7 +53,7 @@ export class DiplomaPage implements OnInit { public ThemeService: ThemeService ) { this.activatedRoute.paramMap.subscribe(params => { - // console.log(params["params"]); + // if (params["params"].SerialNumber) { this.serialNumber = params["params"].SerialNumber; @@ -260,8 +260,8 @@ export class DiplomaPage implements OnInit { getDocumentDetails(forlderId: string, applicationId: string) { this.processes.GetDocumentDetails(forlderId, applicationId).subscribe(res => { this.attachments = res.Documents; - console.log(res['Documents']); - console.log(this.attachments); + + }) } diff --git a/src/app/pages/gabinete-digital/diplomas/diplomas.page.ts b/src/app/pages/gabinete-digital/diplomas/diplomas.page.ts index e339e6795..9fdfe4037 100644 --- a/src/app/pages/gabinete-digital/diplomas/diplomas.page.ts +++ b/src/app/pages/gabinete-digital/diplomas/diplomas.page.ts @@ -82,10 +82,10 @@ export class DiplomasPage implements OnInit, OnDestroy { } /* async loadDiplomas(){ - console.log('Load'); + this.activatedRoute.data.subscribe(data => { - console.log(data['diplomas']); + switch (this.segment) { case 'validar': @@ -157,12 +157,12 @@ export class DiplomasPage implements OnInit, OnDestroy { async getTotalDocs(DocId: any) { let res = await this.processes.GetDocumentDetails(DocId, '361').toPromise(); - console.log(res.DocumentsTotal); + return res.DocumentsTotal; } ngOnDestroy(): void { - console.log('8. on destroy called'); + } segmentChanged(ev: any) { @@ -224,7 +224,7 @@ export class DiplomasPage implements OnInit, OnDestroy { diplomasList.push(task); }); - console.log(diplomasList); + this.diplomasList = this.sortService.sortDate(diplomasList, 'taskStartDate'); let diplomasAssinados = process.filter(data => data.activityInstanceName == "Diploma Assinado"); @@ -235,7 +235,7 @@ export class DiplomasPage implements OnInit, OnDestroy { diplomasAssinadoList.push(task); }); - console.log('diplomasAssinados', diplomasAssinados) + this.diplomasAssinadoList = this.sortService.sortDate(diplomasAssinadoList, 'taskStartDate') }) diff --git a/src/app/pages/gabinete-digital/event-list/approve-event-modal/approve-event-modal.page.ts b/src/app/pages/gabinete-digital/event-list/approve-event-modal/approve-event-modal.page.ts index 4ccc5c7c8..5c3e3e366 100644 --- a/src/app/pages/gabinete-digital/event-list/approve-event-modal/approve-event-modal.page.ts +++ b/src/app/pages/gabinete-digital/event-list/approve-event-modal/approve-event-modal.page.ts @@ -74,10 +74,8 @@ export class ApproveEventModalPage implements OnInit { getTask() { this.processes.GetTask(this.serialNumber).subscribe(res => { - console.log('GET TASK SERIALNUMBER: ', this.serialNumber,'Approve event',res); this.loadedEvent = res; this.today = new Date(res.workflowInstanceDataFields.StartDate); - console.log(new Date(this.today)); this.customDate = this.days[this.today.getDay()]+ ", " + this.today.getDate() +" de " + ( this.months[this.today.getMonth()]); this.InstanceId = res.workflowInstanceDataFields.InstanceId @@ -89,7 +87,6 @@ export class ApproveEventModalPage implements OnInit { viewDocument(docId:string, applicationId:string){ this.processes.GetDocumentUrl(docId, applicationId).subscribe(res=>{ - console.log(res); const url: string = res.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1"); const browser = this.iab.create(url,"_blank"); browser.show(); @@ -97,9 +94,7 @@ export class ApproveEventModalPage implements OnInit { } async approveTask(serialNumber:string) { - console.log('approveTask SERIALNUMBER: ', serialNumber) let body = { "serialNumber": serialNumber, "action": "Aprovar" } - console.log(body); const loader = this.toastService.loading() @@ -121,8 +116,6 @@ export class ApproveEventModalPage implements OnInit { } emendTask(serialNumber:string){ - console.log('emendTask: ',serialNumber) - /* console.log('Emendar'); */ this.menu.close(); this.openEmendMessageModal(serialNumber); this.modalController.dismiss(null); @@ -153,7 +146,7 @@ export class ApproveEventModalPage implements OnInit { async getAttachments() { this.loadedAttachments = await this.attachmentsService.getAttachmentsById(this.InstanceId).toPromise(); - console.log(this.loadedAttachments); + } async openOptions(ev:any) { @@ -191,7 +184,7 @@ export class ApproveEventModalPage implements OnInit { } } - //console.log(body); + // const loader = this.toastService.loading() try { diff --git a/src/app/pages/gabinete-digital/event-list/approve-event/approve-event.page.ts b/src/app/pages/gabinete-digital/event-list/approve-event/approve-event.page.ts index cdac272d3..fdcb86bba 100644 --- a/src/app/pages/gabinete-digital/event-list/approve-event/approve-event.page.ts +++ b/src/app/pages/gabinete-digital/event-list/approve-event/approve-event.page.ts @@ -63,7 +63,7 @@ export class ApproveEventPage implements OnInit { private storage: Storage ) { this.activatedRoute.paramMap.subscribe(params => { - // console.log(params["params"]); + // if (params["params"].serialNumber) { this.serialNumber = params["params"].serialNumber; @@ -80,8 +80,8 @@ export class ApproveEventPage implements OnInit { } ngOnInit() { - console.log(this.serialNumber); - console.log(this.caller); + + this.getTask(); this.backgroundservice.registerBackService('Online', () => { @@ -108,7 +108,7 @@ export class ApproveEventPage implements OnInit { addProcessToDB(data) { if (this.platform.is('desktop') || this.platform.is('mobileweb')) { this.storage.set('approve_event_detils', data).then(() => { - console.log('APPROVE EVENT DETAILS SAVED') + }) } else { this.sqliteservice.updateProcess(data); @@ -120,7 +120,7 @@ export class ApproveEventPage implements OnInit { if (this.platform.is('desktop') || this.platform.is('mobileweb')) { this.storage.get('approve_event_detils').then((event) => { this.loadedEvent = event - console.log('offline event', this.loadedEvent); + this.today = new Date(this.loadedEvent.workflowInstanceDataFields.StartDate); @@ -128,13 +128,13 @@ export class ApproveEventPage implements OnInit { let instanceId = this.loadedEvent.workflowInstanceDataFields.InstanceId; this.loadedAttachments = this.loadedEvent.Documents; - console.log('Attatara', this.loadedAttachments) + }) } else { this.platform.ready().then(() => { this.sqliteservice.getProcessById(this.serialNumber).then((process) => { - console.log('event aprove serial', process) + var doc; var action = []; @@ -182,7 +182,7 @@ export class ApproveEventPage implements OnInit { } this.loadedEvent = task - console.log('offline event', this.loadedEvent); + this.today = new Date(this.loadedEvent.workflowInstanceDataFields.StartDate); @@ -190,13 +190,13 @@ export class ApproveEventPage implements OnInit { let instanceId = this.loadedEvent.workflowInstanceDataFields.InstanceId; this.loadedAttachments = this.loadedEvent.Documents; - console.log('Attatara', this.loadedAttachments) + }) }) } - console.log('Offlineee') + } async getTask() { @@ -204,7 +204,7 @@ export class ApproveEventPage implements OnInit { this.loadedEvent = await this.processes.GetTask(this.serialNumber).toPromise(); this.addProcessToDB(this.loadedEvent) - console.log(this.loadedEvent); + this.today = new Date(this.loadedEvent.workflowInstanceDataFields.StartDate); @@ -217,7 +217,7 @@ export class ApproveEventPage implements OnInit { async approveTask(serialNumber: string) { let body = { "serialNumber": serialNumber, "action": "Aprovar" } - console.log(body); + const loader = this.toastService.loading() @@ -246,7 +246,7 @@ export class ApproveEventPage implements OnInit { } async emendTask(serialNumber: string) { - console.log('Desktop'); + const modal = await this.modalController.create({ component: EmendMessageModalPage, @@ -260,7 +260,7 @@ export class ApproveEventPage implements OnInit { modal.onDidDismiss() .then(async (res) => { - console.log(res.data); + if (res.data !== '') { let body = { @@ -270,14 +270,14 @@ export class ApproveEventPage implements OnInit { "ReviewUserComment": res.data, } } - console.log(body); + const loader = this.toastService.loading() try { await this.processes.PostTaskAction(body).toPromise() .catch(() => { - console.log('Send event to approve for revition') + this.offlineManager.storeRequestData('event-listRever', body); }); this.toastService._successMessage('Pedido enviado'); @@ -300,7 +300,7 @@ export class ApproveEventPage implements OnInit { async rejeitar(serialNumber: string) { let body = { "serialNumber": serialNumber, "action": "Rejeitar" } - console.log(body); + const loader = this.toastService.loading() try { await this.processes.PostTaskAction(body).toPromise(); @@ -366,7 +366,7 @@ export class ApproveEventPage implements OnInit { await modal.present(); modal.onDidDismiss().then(async (res) => { - console.log(res.data); + if (res.data !== '') { let body = { @@ -376,7 +376,7 @@ export class ApproveEventPage implements OnInit { "ReviewUserComment": res.data, } } - console.log(body); + const loader = this.toastService.loading() diff --git a/src/app/pages/gabinete-digital/event-list/event-list.page.ts b/src/app/pages/gabinete-digital/event-list/event-list.page.ts index ba560742e..4b944ef60 100644 --- a/src/app/pages/gabinete-digital/event-list/event-list.page.ts +++ b/src/app/pages/gabinete-digital/event-list/event-list.page.ts @@ -102,13 +102,13 @@ export class EventListPage implements OnInit { this.eventsMDGPRList = this.sortService.sortDate(this.transformaDataDB(event), 'taskStartDate') //this.eventsMDGPRList = this.eventsMDGPRList.filter(element => element.interveners != null) - console.log('MD event to aprove', this.eventsMDGPRList) + }) this.sqliteservice.getListOfEventAprove('Agenda Oficial PR', 'Agenda Pessoal PR').then((event: any[]) => { this.eventsPRList = this.sortService.sortDate(this.transformaDataDB(event), 'taskStartDate') - console.log('PR event to aprove', this.eventsPRList) + }) }) @@ -116,7 +116,7 @@ export class EventListPage implements OnInit { } - console.log('Offlineee') + } transformaDataDB(events) { @@ -154,16 +154,16 @@ export class EventListPage implements OnInit { this.showLoader = true; this.skeletonLoader = true - console.log(this.segment); + if (this.segment == 'MDGPR') { let mdEventsOficial = await this.processes.GetTasksList('Agenda Oficial MDGPR', false).toPromise(); let mdEventsPessoal = await this.processes.GetTasksList('Agenda Pessoal MDGPR', false).toPromise(); this.eventsMDGPRList = mdEventsOficial.concat(mdEventsPessoal); this.eventsMDGPRList = this.sortService.sortDate(this.eventsMDGPRList, 'taskStartDate') this.eventsMDGPRList = this.sortService.sortArrayByDate(this.eventsMDGPRList) - console.log('MD EVENT TO APROVE ONLINE',this.eventsMDGPRList) + this.storage.set('event-to-aproveMD',this.eventsMDGPRList).then(() => { - console.log(' EVENTMD TO APROVE SAVED') + }) //this.eventaprovacaostore.resetmd(this.sortService.sortArrayByDate(this.eventsMDGPRList).reverse()); } @@ -173,9 +173,9 @@ export class EventListPage implements OnInit { this.eventsPRList = prEventsOficial.concat(prEventsPessoal); this.eventsPRList = this.sortService.sortDate(this.eventsPRList, 'taskStartDate') this.eventsPRList = this.sortService.sortArrayByDate(this.eventsPRList) - console.log('PR EVENT TO APROVE ONLINE',this.eventsPRList) + this.storage.set('event-to-aprovePR',this.eventsPRList).then(() => { - console.log(' EVENTPR TO APROVE SAVED') + }) //this.eventaprovacaostore.resetpr(this.sortService.sortArrayByDate(this.eventsPRList).reverse()); } @@ -202,7 +202,7 @@ export class EventListPage implements OnInit { } goToEventToApproveDetail(serialNumber: string) { - console.log(serialNumber); + /* let navigationExtras: NavigationExtras = { queryParams: { diff --git a/src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.ts b/src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.ts index 01bf43995..af3dba008 100644 --- a/src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.ts +++ b/src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.ts @@ -272,7 +272,7 @@ export class BookMeetingModalPage implements OnInit { } - console.log(this.EventRecurrenceType) + if(this.task.FsId == '8') { const loader = this.toastService.loading() diff --git a/src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.ts b/src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.ts index eafd8e79a..f1afe609f 100644 --- a/src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.ts +++ b/src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.ts @@ -114,7 +114,7 @@ export class ExpedientTaskModalPage implements OnInit { this.loggeduser = userAuth.ValidatedUser; this.task = this.navParams.get('task'); - console.log('create dispatch with this data', this.task); + this.SearchFolder = this.navParams.get('SearchFolder'); this.aplicationId = this.navParams.get('aplicationId') @@ -145,7 +145,7 @@ export class ExpedientTaskModalPage implements OnInit { this.postData.DispatchFolder.Subject = this.task.workflowInstanceDataFields.Subject; this.profile = this.navParams.get('profile'); - console.log(this.postData); + } async setAdding(type: "intervenient" | "CC") { @@ -163,9 +163,9 @@ export class ExpedientTaskModalPage implements OnInit { } onSelectedTypesChanged(ev:any) { - console.log(ev); + if(ev.length > 1){ - console.log(ev.filter(data => data != '99999850')); + this.selectedTypes = ev.filter(data => data != '99999850'); } if(ev.length == 0){ @@ -180,7 +180,7 @@ export class ExpedientTaskModalPage implements OnInit { getSubjectType() { this.processes.GetSubjectType().subscribe(res=>{ - console.log(res); + this.subjectTypes = res; }); } @@ -322,7 +322,7 @@ export class ExpedientTaskModalPage implements OnInit { } } - console.log(this.postData); + try { @@ -336,7 +336,7 @@ export class ExpedientTaskModalPage implements OnInit { loader.remove() } - console.log('this.taskResult', this.taskResult); + break; case '1': // Parecer @@ -380,7 +380,7 @@ export class ExpedientTaskModalPage implements OnInit { DispatchFolder: this.dispatchFolder, AttachmentList: docs } - //console.log(this.postData); + // let action_deferimento = { "serialNumber": this.task.serialNumber, "action": "Tratado", @@ -401,7 +401,7 @@ export class ExpedientTaskModalPage implements OnInit { loader.remove() } - console.log('this.taskResult', this.taskResult); + break; } } @@ -421,7 +421,7 @@ export class ExpedientTaskModalPage implements OnInit { DispatchFolder: this.dispatchFolder, AttachmentList: docs, } - console.log(this.postData); + let action_despacho_pr = { "serialNumber": this.task.serialNumber, @@ -491,7 +491,7 @@ export class ExpedientTaskModalPage implements OnInit { getAttachments() { this.attachmentsService.getAttachmentsBySerial(this.task.serialNumber).subscribe(res=>{ this.loadedAttachments = res; - console.log(res); + }); } @@ -568,7 +568,7 @@ export class ExpedientTaskModalPage implements OnInit { } async viewExpedientDetail() { - console.log(this.profile); + let classs; if( window.innerWidth <= 800){ @@ -588,7 +588,6 @@ export class ExpedientTaskModalPage implements OnInit { }); await modal.present(); modal.onDidDismiss().then((res)=>{ - /* console.log('!refresh list'); */ }); } diff --git a/src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page.html b/src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page.html index 03e46715f..2f58dcdcc 100644 --- a/src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page.html +++ b/src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page.html @@ -92,8 +92,8 @@
-
Enviar para o PR
- +
Enviar para o PR
+
Solicitar revisão
Outras opções
diff --git a/src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page.ts b/src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page.ts index 6e41ac1de..79412d5fd 100644 --- a/src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page.ts +++ b/src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page.ts @@ -32,6 +32,8 @@ import { NewGroupPage } from 'src/app/pages/chat/new-group/new-group.page'; import { DataService } from 'src/app/services/data.service'; import { RouteService } from 'src/app/services/route.service'; import { Storage } from '@ionic/storage'; +import { LoginUserRespose } from 'src/app/models/user.model'; +import { AuthService } from 'src/app/services/auth.service'; @Component({ selector: 'app-expediente-detail', @@ -61,6 +63,8 @@ export class ExpedienteDetailPage implements OnInit { onlinecheck: boolean; + loggeduser: LoginUserRespose; + constructor( private processes: ProcessesService, private iab: InAppBrowser, @@ -81,8 +85,10 @@ export class ExpedienteDetailPage implements OnInit { private backgroundservice: BackgroundService, public ThemeService: ThemeService, private dataService: DataService, - private storage: Storage + private storage: Storage, + private userAuth: AuthService, ) { + this.loggeduser = userAuth.ValidatedUser this.activatedRoute.paramMap.subscribe(params => { if (params["params"].SerialNumber) { this.serialNumber = params["params"].SerialNumber; @@ -113,7 +119,7 @@ export class ExpedienteDetailPage implements OnInit { updateProcessDB(res) { if (this.platform.is('desktop') || this.platform.is('mobileweb')) { this.storage.set('expediente_details',res).then(() =>{ - console.log('EXPEDIENTE DETAILS SAVED') + }) } else { this.sqliteservice.updateProcess(res) @@ -163,7 +169,7 @@ export class ExpedienteDetailPage implements OnInit { this.platform.ready().then(() => { this.onlinecheck = false; this.sqliteservice.getProcessById(this.serialNumber).then((process) => { - console.log("expedient ditail", process) + var workflow = JSON.parse(process[0].workflowInstanceDataFields); var origina @@ -227,7 +233,7 @@ export class ExpedienteDetailPage implements OnInit { "AttachmentList": documents, } - console.log(body); + const loader = this.toastService.loading() @@ -287,7 +293,7 @@ export class ExpedienteDetailPage implements OnInit { await modal.present(); modal.onDidDismiss().then(res => { - console.log(res); + if (res.data) { const DocumentToSave = res.data.documents.map((e) => { return { @@ -355,7 +361,7 @@ export class ExpedienteDetailPage implements OnInit { sendExpedienteToPending() { this.processes.SetTaskToPending(this.serialNumber).subscribe(res => { - console.log(res); + this.toastService._successMessage('Processo enviado para pendentes') this.goBack(); }, @@ -367,7 +373,7 @@ export class ExpedienteDetailPage implements OnInit { async LoadTaskDetail(serial: string) { this.processes.GetTask(serial).subscribe(res => { - console.log(res); + this.task = { "SerialNumber": res.serialNumber, @@ -403,8 +409,8 @@ export class ExpedienteDetailPage implements OnInit { }); }) - console.log('this.task', this.task.InstanceID) - console.log('this.task.DocumentURL', this.fulltask) + + }, (error) => { @@ -460,11 +466,11 @@ export class ExpedienteDetailPage implements OnInit { // } getAttachments(serialNumber) { - console.log(serialNumber); + this.attachmentsService.getAttachmentsBySerial(serialNumber).subscribe(res => { this.attachments = res; - console.log('res', res); + }); } @@ -567,7 +573,7 @@ export class ExpedienteDetailPage implements OnInit { await modal.present(); modal.onDidDismiss().then(async (res) => { - console.log(res['data']); + if (body == 'descartar') { if (res['data'] == 'Yes') { @@ -605,7 +611,7 @@ export class ExpedienteDetailPage implements OnInit { } else if (res['data'] == 'No') { - console.log('Update'); + const loader = this.toastService.loading() try { await this.processes.UpdateTaskStatus(this.task.FolderId).toPromise(); @@ -622,7 +628,7 @@ export class ExpedienteDetailPage implements OnInit { } async openBookMeetingModal(task: any) { - console.log(task); + let classs; if (window.innerWidth < 701) { @@ -649,7 +655,7 @@ export class ExpedienteDetailPage implements OnInit { } async viewEventDetail(eventId: any) { - console.log(this.profile); + const modal = await this.modalController.create({ component: ViewEventPage, diff --git a/src/app/pages/gabinete-digital/expediente/expediente.page.ts b/src/app/pages/gabinete-digital/expediente/expediente.page.ts index 1a01b95dc..8fcc5b73d 100644 --- a/src/app/pages/gabinete-digital/expediente/expediente.page.ts +++ b/src/app/pages/gabinete-digital/expediente/expediente.page.ts @@ -82,7 +82,7 @@ export class ExpedientePage implements OnInit { this.addProcessTODb(task); }); this.listToPresent = this.sortService.sortDate(this.taskslist, 'taskStartDate') - console.log('expediente list', this.listToPresent) + this.skeletonLoader = false; }, (error) => { @@ -108,14 +108,14 @@ export class ExpedientePage implements OnInit { } goToExpediente(serialNumber: any) { - //console.log('ABRE'); + // this.router.navigate(['/home/gabinete-digital/expediente', serialNumber, 'gabinete-digital']); } addProcessTODb(task) { if (this.platform.is('desktop') || this.platform.is('mobileweb')) { this.storage.set('gabinete-expediente',task).then(() => { - console.log('GABINETE EXPEDIENTE SAVED') + }) } else { this.sqliteservice.addProcess(task); @@ -131,7 +131,7 @@ export class ExpedientePage implements OnInit { } else { this.taskslist = new Array(); this.sqliteservice.getprocessByworkflow("Expediente").then((expediente: any[]) => { - console.log("All expedientes from local,", expediente) + expediente.forEach((element) => { diff --git a/src/app/pages/gabinete-digital/expedientes-pr/expediente-pr/expediente-pr.page.ts b/src/app/pages/gabinete-digital/expedientes-pr/expediente-pr/expediente-pr.page.ts index 1e7592491..eba56b89f 100644 --- a/src/app/pages/gabinete-digital/expedientes-pr/expediente-pr/expediente-pr.page.ts +++ b/src/app/pages/gabinete-digital/expedientes-pr/expediente-pr/expediente-pr.page.ts @@ -134,7 +134,7 @@ export class ExpedientePrPage implements OnInit { sendExpedienteToPending() { this.processes.SetTaskToPending(this.serialnumber).subscribe(res=>{ - console.log(res); + this.toastService._successMessage('Processo enviado para pendentes') this.goBack(); }, @@ -239,11 +239,11 @@ export class ExpedientePrPage implements OnInit { await modal.present(); modal.onDidDismiss().then((res)=>{ if(res){ - console.log(res); + const data = res.data; this.documents.push(data.selected); - console.log('RES'+ this.documents); + /* let body = { "InstanceID":null, @@ -296,7 +296,7 @@ export class ExpedientePrPage implements OnInit { "AttachmentList" :documents, } - console.log(body); + const loader = this.toastService.loading() @@ -355,7 +355,7 @@ export class ExpedientePrPage implements OnInit { await modal.present(); modal.onDidDismiss().then(res => { - console.log(res); + if(res.data){ const DocumentToSave = res.data.documents.map((e:SearchList) => { return { @@ -431,7 +431,7 @@ export class ExpedientePrPage implements OnInit { await modal.present(); modal.onDidDismiss().then( async (res)=>{ - console.log(res['data']); + if(body == 'descartar') { if(res['data']== 'Yes'){ @@ -479,7 +479,7 @@ export class ExpedientePrPage implements OnInit { this.goBack(); } else if(res['data'] == 'No') { - console.log('Update'); + const loader = this.toastService.loading() @@ -533,7 +533,7 @@ export class ExpedientePrPage implements OnInit { } async viewEventDetail(eventId: any) { - console.log(this.profile); + const modal = await this.modalController.create({ component: ViewEventPage, diff --git a/src/app/pages/gabinete-digital/expedientes-pr/expedientes-pr.page.ts b/src/app/pages/gabinete-digital/expedientes-pr/expedientes-pr.page.ts index 414f2f018..f221964e3 100644 --- a/src/app/pages/gabinete-digital/expedientes-pr/expedientes-pr.page.ts +++ b/src/app/pages/gabinete-digital/expedientes-pr/expedientes-pr.page.ts @@ -70,7 +70,7 @@ export class ExpedientesPrPage implements OnInit { this.skeletonLoader = true this.processes.GetTaskListExpediente(false).subscribe(result => { - console.log(result); + this.skeletonLoader = false this.showLoader =false this.taskslist = new Array(); @@ -79,7 +79,7 @@ export class ExpedientesPrPage implements OnInit { let task = this.expedienteTaskPipe.transform(element) this.taskslist.push(task); }); - console.log(this.taskslist); + this.taskslist = this.sortService.sortDate(this.taskslist, 'CreateDate') this.expedienteGdStore.reset(this.taskslist); @@ -117,7 +117,7 @@ export class ExpedientesPrPage implements OnInit { }); await modal.present(); modal.onDidDismiss().then((res)=>{ - console.log('refresh list'); + this.LoadList(); }); } diff --git a/src/app/pages/gabinete-digital/gabinete-digital.page.ts b/src/app/pages/gabinete-digital/gabinete-digital.page.ts index 90ff69e53..a22521518 100644 --- a/src/app/pages/gabinete-digital/gabinete-digital.page.ts +++ b/src/app/pages/gabinete-digital/gabinete-digital.page.ts @@ -224,7 +224,7 @@ export class GabineteDigitalPage implements OnInit, DoCheck { this.platform.ready().then(() => { if (this.platform.is('desktop') || this.platform.is('mobileweb')) { this.storage.set('GabineteProcess', data).then(() => { - console.log('Gabinete process saved') + }) } else { data.forEach(element => { @@ -257,7 +257,7 @@ export class GabineteDigitalPage implements OnInit, DoCheck { this.hideRefreshButton(); if (this.platform.is('desktop') || this.platform.is('mobileweb')) { this.storage.get('GabineteProcess').then((allprocess: any[]) => { - console.log('ALL PROCESS WEB',allprocess ) + allprocess.forEach(element => { let date = new Date(element.taskStartDate); date.setMonth(date.getMonth() + 1); @@ -318,7 +318,7 @@ export class GabineteDigitalPage implements OnInit, DoCheck { this.allProcessesList = this.sortService.sortDate(this.allProcessesList, 'CreateDate') }); - console.log("All process from db ", allprocess) + }) } @@ -352,7 +352,7 @@ export class GabineteDigitalPage implements OnInit, DoCheck { if (totalDays == 0) { if (allday) { customDate = this.getCustomDate(start) + ", " + this.getCustomHours(start) + " (todo dia)"; - console.log(customDate); + return customDate; } else { @@ -415,7 +415,7 @@ export class GabineteDigitalPage implements OnInit, DoCheck { this.router.navigate(['/home/gabinete-digital/event-list/approve-event', serialNumber, 'gabinete-digital']); } else { - console.log('cant find page for this task') + } } @@ -670,7 +670,7 @@ export class GabineteDigitalPage implements OnInit, DoCheck { } doRefresh(event) { - console.log(event); + this.LoadCounts(); @@ -680,7 +680,7 @@ export class GabineteDigitalPage implements OnInit, DoCheck { }, 2000); } else { - console.log('null'); + } } diff --git a/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.ts b/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.ts index 44632fe83..e19baa83a 100644 --- a/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.ts +++ b/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.ts @@ -71,7 +71,7 @@ export class PedidoPage implements OnInit { this.loggeduser = authService.ValidatedUser; this.activatedRoute.paramMap.subscribe(params => { - // console.log(params["params"]); + // if (params["params"].SerialNumber) { this.serialnumber = params["params"].SerialNumber; @@ -105,7 +105,7 @@ export class PedidoPage implements OnInit { this.processes.GetTask(this.serialnumber).subscribe(res => { this.fulltask = res - console.log('FULLTAK ONLINe', this.fulltask); + if (res.workflowDisplayName == 'Pedido de Parecer' || res.workflowDisplayName == 'Pedido de Parecer do Presidente') { @@ -130,7 +130,7 @@ export class PedidoPage implements OnInit { "activityInstanceName": res.activityInstanceName, "Status": res.workflowInstanceDataFields.Status, } - console.log(this.task); + this.updateProcess(res); } else if (res.workflowDisplayName == 'Pedido de Deferimento') { @@ -207,7 +207,7 @@ export class PedidoPage implements OnInit { } else { this.sqliteservice.getProcessById(this.serialnumber).then((process) => { - console.log('PROCESS BY ID', process, this.serialnumber) + let fulltak = { Documents: JSON.parse(process[0].Documents) || [], @@ -227,7 +227,7 @@ export class PedidoPage implements OnInit { } this.fulltask = fulltak; - console.log('FULLTAK OFFLINE', this.fulltask); + if (process[0].workflowDisplayName == 'Pedido de Parecer' || process[0].workflowDisplayName == 'Pedido de Parecer do Presidente') { let date = new Date(process[0].taskStartDate); @@ -296,7 +296,7 @@ export class PedidoPage implements OnInit { getDocumentDetails(forlderId: string, applicationId: string) { this.processes.GetDocumentDetails(forlderId, applicationId).subscribe(res => { this.attachments = res.Documents; - console.log(res['Documents']); + }) } @@ -453,7 +453,7 @@ export class PedidoPage implements OnInit { }); await modal.present(); modal.onDidDismiss().then(res => { - console.log('Modal closed'); + this.goBack(); }); } @@ -522,7 +522,7 @@ export class PedidoPage implements OnInit { // } async distartExpedientModal() { - console.log(this.fulltask); + const modal = await this.modalController.create({ component: DiscartExpedientModalPage, componentProps: { @@ -538,7 +538,7 @@ export class PedidoPage implements OnInit { modal.onDidDismiss().then(res => { if (res['data'] == 'close') { this.close(); - /* console.log('2Expedient Discard closed2'); + /* this.close(); this.openMenu(); */ } @@ -547,7 +547,7 @@ export class PedidoPage implements OnInit { } async openDelegarModal(task: any) { - console.log(task); + let classs; if (window.innerWidth <= 800) { @@ -596,7 +596,7 @@ export class PedidoPage implements OnInit { } async openDarParecer(task: any) { - console.log(task); + let classs; if (window.innerWidth < 701) { diff --git a/src/app/pages/gabinete-digital/pedidos/pedidos.page.ts b/src/app/pages/gabinete-digital/pedidos/pedidos.page.ts index 04d9b8802..aaba92993 100644 --- a/src/app/pages/gabinete-digital/pedidos/pedidos.page.ts +++ b/src/app/pages/gabinete-digital/pedidos/pedidos.page.ts @@ -119,7 +119,7 @@ export class PedidosPage implements OnInit { } openExpedientDetailPage(data) { - console.log(data); + this.openExpedientDetail.emit(data); } @@ -136,7 +136,7 @@ export class PedidosPage implements OnInit { let parecer = await this.processes.GetTasksList("Pedido de Parecer", false).toPromise(); let parecerPr = await this.processes.GetTasksList("Pedido de Parecer do Presidente", false).toPromise(); - console.log(parecerPr); + this.skeletonLoader = false @@ -177,7 +177,7 @@ export class PedidosPage implements OnInit { this.skeletonLoader = false - console.log(result); + this.deferimentoList = []; @@ -257,7 +257,7 @@ export class PedidosPage implements OnInit { } }) this.listToPresentparecerList = this.sortService.sortArrayISODate(parecerlist); - console.log('parecer', process) + }) this.sqliteservice.getprocessByworkflow("Pedido de Deferimento").then((process: any[]) => { @@ -284,7 +284,7 @@ export class PedidosPage implements OnInit { } }) this.listToPresentdeferimentoList = this.sortService.sortArrayISODate(deferimentolist); - console.log('deferimento', process) + }) } diff --git a/src/app/pages/gabinete-digital/pendentes/pendentes.page.ts b/src/app/pages/gabinete-digital/pendentes/pendentes.page.ts index 7948de036..4e3f74578 100644 --- a/src/app/pages/gabinete-digital/pendentes/pendentes.page.ts +++ b/src/app/pages/gabinete-digital/pendentes/pendentes.page.ts @@ -107,7 +107,7 @@ export class PendentesPage implements OnInit { pendentesList = this.sortService.sortDate(pendentesList, 'CreateDate'); this.listToPresent = pendentesList; this.storage.set('pendente-list',pendentesList).then(() => { - console.log('Pendente list SAVED') + }) this.skeletonLoader = false; @@ -130,7 +130,7 @@ export class PendentesPage implements OnInit { this.platform.ready().then(() => { this.sqliteservice.getAllProcess().then((process: any[]) => { var pendingList = [] - console.log('Pendentes off off',process ) + process.forEach(element => { var workflow = JSON.parse(element.workflowInstanceDataFields); if (workflow.Status === "Pending") { @@ -151,7 +151,7 @@ export class PendentesPage implements OnInit { pendingList = this.sortService.sortDate(pendingList, 'CreateDate'); this.listToPresent = pendingList; - console.log('pendentes', pendingList) + }) }) @@ -195,7 +195,7 @@ export class PendentesPage implements OnInit { this.router.navigate(['/home/gabinete-digital/despachos', SerialNumber, 'gabinete-digital']); } else { - console.log('cant find page for this task', WorkflowName, activityInstanceName) + } } diff --git a/src/app/pages/inactivity/inactivity.page.ts b/src/app/pages/inactivity/inactivity.page.ts index 609e7383a..d0f98aa15 100644 --- a/src/app/pages/inactivity/inactivity.page.ts +++ b/src/app/pages/inactivity/inactivity.page.ts @@ -57,9 +57,9 @@ export class InactivityPage implements OnInit { // let circleHeight = document.querySelector('.circle')['offsetHeight'] // let circleWidth = document.querySelector('.circle')['offsetWidth'] - // console.log(window.innerHeight, ' < ', containerHeight) + // - // console.log(circleHeight) + // // document.querySelectorAll('.circle').forEach(e=>{ // e['style']['height'] = (circleHeight -1 )+'px' @@ -163,10 +163,10 @@ export class InactivityPage implements OnInit { if(this.code.length == 4) { if(!SessionStore.hasPin) { - // console.log('storePin') + // this.storePin() } else { - // console.log('pinLogin') + // this.pinLogin() } } diff --git a/src/app/pages/login/login.page.ts b/src/app/pages/login/login.page.ts index 3990ad01f..42c29b4a9 100644 --- a/src/app/pages/login/login.page.ts +++ b/src/app/pages/login/login.page.ts @@ -48,7 +48,7 @@ export class LoginPage implements OnInit { ngOnInit() { this.storageservice.get('theme').then((theme) =>{ - console.log('LOGIN THEME',theme) + this.ThemeService.setTheme(theme) }) } @@ -133,7 +133,7 @@ export class LoginPage implements OnInit { this.changeProfileService.run(); - console.log(attempt.ChatData) + if(attempt.ChatData){ await this.authService.loginChat(attempt.ChatData.data); await this.authService.loginToChatWs(); diff --git a/src/app/pages/publications/edit-action/edit-action.page.ts b/src/app/pages/publications/edit-action/edit-action.page.ts index 90eed9ce5..7e582fff8 100644 --- a/src/app/pages/publications/edit-action/edit-action.page.ts +++ b/src/app/pages/publications/edit-action/edit-action.page.ts @@ -97,7 +97,7 @@ export class EditActionPage implements OnInit { DateEnd: this.folder.DateEnd, ActionType: this.folder.ActionType, } - console.log(body); + const loader = this.toastService.loading() try { diff --git a/src/app/pages/publications/new-action/new-action.page.ts b/src/app/pages/publications/new-action/new-action.page.ts index 32ef3d82d..6e086e615 100644 --- a/src/app/pages/publications/new-action/new-action.page.ts +++ b/src/app/pages/publications/new-action/new-action.page.ts @@ -90,7 +90,7 @@ export class NewActionPage implements OnInit { } segmentChanged(ev: any) { - console.log(ev.detail.value); + } get dateValid() { diff --git a/src/app/pages/publications/new-publication/new-publication.page.ts b/src/app/pages/publications/new-publication/new-publication.page.ts index a2d09ffef..25a9f2766 100644 --- a/src/app/pages/publications/new-publication/new-publication.page.ts +++ b/src/app/pages/publications/new-publication/new-publication.page.ts @@ -98,7 +98,6 @@ export class NewPublicationPage implements OnInit { ngOnInit() { this.setTitle(); - console.log(this.folderId); Filesystem.mkdir({ path: IMAGE_DIR, directory: Directory.Data, @@ -221,7 +220,6 @@ export class NewPublicationPage implements OnInit { if (this.publicationType == '3') { - console.log(this.navParams.get('publication')); if (this.capturedImage != '') { this.publication = { @@ -239,7 +237,6 @@ export class NewPublicationPage implements OnInit { const loader = this.toastService.loading() try { - console.log(this.publication); await this.publications.UpdatePublication(this.publication.ProcessId, this.publication).toPromise() this.toastService.successMessage("Publicação editada") @@ -265,13 +262,10 @@ export class NewPublicationPage implements OnInit { // FileBase64: this.publication.FileBase64, // FileExtension: 'jpeg', } - /* console.log('Edit - keep image'); - console.log(this.publication); */ const loader = this.toastService.loading() try { - console.log(this.publication); await this.publications.UpdatePublication(this.publication.ProcessId, this.publication).toPromise() this.toastService.successMessage("Publicação criado") @@ -295,8 +289,8 @@ export class NewPublicationPage implements OnInit { FileExtension: 'jpeg', } - console.log('Edit change image'); - console.log(this.publication); + + const loader = this.toastService.loading() try { @@ -315,8 +309,8 @@ export class NewPublicationPage implements OnInit { else { const date = formatDate(new Date(), 'yyyy-MM-dd HH:mm:ss') - console.log(date); - console.log(this.folderId); + + this.publication = { @@ -334,7 +328,7 @@ export class NewPublicationPage implements OnInit { const loader = this.toastService.loading() try { - console.log(this.publication); + await this.publications.CreatePublication(this.folderId, this.publication).toPromise(); this.close(); this.toastService.successMessage("Publicação criado") @@ -372,7 +366,7 @@ export class NewPublicationPage implements OnInit { this.publicationTitle = 'Editar Publicação'; this.pub = this.navParams.get('publication'); - console.log(this.pub, 'pub') + } } @@ -395,7 +389,7 @@ export class NewPublicationPage implements OnInit { resultType: CameraResultType.DataUrl, source: CameraSource.Camera }); - console.log(image); + this.photo = this.sanitizer.bypassSecurityTrustResourceUrl(image && (image.dataUrl)); } */ @@ -458,12 +452,12 @@ export class NewPublicationPage implements OnInit { path: `${IMAGE_DIR}/${fileName}`, directory: Directory.Data, }).then(result => { - console.log('ALL RESULTS', result.files) + let lastphoto = result.files[result.files.length - 1] this.loadFileData(lastphoto); }, async (err) => { - console.log('ERROR FILE DOSENT EXIST', err) + // Folder does not yet exists! await Filesystem.mkdir({ path: IMAGE_DIR, @@ -477,7 +471,7 @@ export class NewPublicationPage implements OnInit { } async loadFileData(fileName: string) { - console.log('ALL PHOTOT FILE', fileName) + const loading = await this.loadingCtrl.create({ message: 'Loading data...', @@ -497,7 +491,7 @@ export class NewPublicationPage implements OnInit { data: `data:image/jpeg;base64,${readFile.data}`, }); - console.log('ALL IMAGE', this.images) + this.capturedImage = this.images[0].data @@ -512,12 +506,12 @@ export class NewPublicationPage implements OnInit { this.imageCompress.compressFile(image, orientation, 50, 50,).then(() => { this.imgResultBeforeCompress = image; - console.log('Size in bytes was:', this.imageCompress.byteCount(image)); + this.imageCompress.compressFile(image, orientation, 50, 50).then( result => { this.imgResultAfterCompress = result; - console.log('Size in bytes is now:', this.imageCompress.byteCount(result)); + } ); }) @@ -527,11 +521,11 @@ export class NewPublicationPage implements OnInit { //this.imgResultBeforeCompress = image;s this.imageCompress.getOrientation(this.capturedImage).then((orientation) => { - console.log('Size in bytes was:', this.imageCompress.byteCount(this.capturedImage)); + this.imageCompress.compressFile(this.capturedImage, orientation, 90, 90).then( result => { this.capturedImage = result; - console.log('Size in bytes is now:', this.imageCompress.byteCount(result)); + } ); diff --git a/src/app/pages/publications/publication-detail/publication-detail.page.ts b/src/app/pages/publications/publication-detail/publication-detail.page.ts index 18223fe33..33551ca50 100644 --- a/src/app/pages/publications/publication-detail/publication-detail.page.ts +++ b/src/app/pages/publications/publication-detail/publication-detail.page.ts @@ -48,7 +48,6 @@ export class PublicationDetailPage implements OnInit { } ngOnInit() { - /* console.log(this.publication.FileBase64); */ this.getPublicationDetail(); } doRefresh(event) { @@ -61,10 +60,8 @@ export class PublicationDetailPage implements OnInit { getPublicationDetail() { this.showLoader = true; - console.log(this.publicationId); - /* console.log(this.folderId); */ this.publications.GetPublicationById(this.publicationId).subscribe(res=>{ - console.log(res); + /* this.publication = res; */ this.publication = { DateIndex: res.DateIndex, @@ -111,7 +108,7 @@ export class PublicationDetailPage implements OnInit { async editPost(publicationType:any) { - console.log(this.publication); + const modal = await this.modalController.create({ component: NewPublicationPage, componentProps:{ diff --git a/src/app/pages/publications/publications.page.ts b/src/app/pages/publications/publications.page.ts index fbc2838c1..b167250cb 100644 --- a/src/app/pages/publications/publications.page.ts +++ b/src/app/pages/publications/publications.page.ts @@ -148,7 +148,7 @@ export class PublicationsPage implements OnInit { this.getFromDB() this.publications.GetPublicationFolderList().subscribe(async res => { - console.log('accoes', res) + let publicationsEventFolderList = new Array(); let publicationsTravelFolderList = new Array(); @@ -170,7 +170,7 @@ export class PublicationsPage implements OnInit { publicationsEventFolderList.push(folder); } else { - console.log('Viagem', folder) + publicationsTravelFolderList.push(folder); } @@ -194,7 +194,7 @@ export class PublicationsPage implements OnInit { } addActionToStorage(events, viagens) { - console.log('actionsWEBDB', events, viagens) + if (this.platform.is('desktop') || this.platform.is('mobileweb')) { this.storage.set('actionsEvents', events); this.storage.set('actionsViagens', viagens); @@ -215,7 +215,7 @@ export class PublicationsPage implements OnInit { this.publicationsEventFolderList = new Array(); this.publicationsTravelFolderList = new Array(); this.storage.get('actionsEvents').then((events) => { - console.log('actionsEvents', events) + events.forEach(data => { let folder: PublicationFolder = { ProcessId: data.ProcessId, @@ -231,7 +231,7 @@ export class PublicationsPage implements OnInit { }); }); this.storage.get('actionsViagens').then((viagens) => { - console.log('actionsViagens', viagens) + viagens.forEach(data => { let folder: PublicationFolder = { ProcessId: data.ProcessId, @@ -249,7 +249,7 @@ export class PublicationsPage implements OnInit { } else { this.sqliteservice.getAllActions().then((actions: any[]) => { - console.log('offline publi', actions) + this.publicationsEventFolderList = new Array(); this.publicationsTravelFolderList = new Array(); @@ -516,7 +516,7 @@ export class PublicationsPage implements OnInit { // this.crop.crop('path/to/image.jpg', {quality: 75}) // .then( - // newImage => console.log('new image path is: ' + newImage), + // newImage => // error => console.error('Error cropping image', error) // ); diff --git a/src/app/pages/publications/view-publications/publication-detail/publication-detail.page.ts b/src/app/pages/publications/view-publications/publication-detail/publication-detail.page.ts index d183d105f..6582f4112 100644 --- a/src/app/pages/publications/view-publications/publication-detail/publication-detail.page.ts +++ b/src/app/pages/publications/view-publications/publication-detail/publication-detail.page.ts @@ -33,11 +33,11 @@ export class PublicationDetailPage implements OnInit { ) { this.activatedRoute.paramMap.subscribe(params => { - console.log(params); + if(params["params"]) { this.folderId = params["params"].folderId; this.publicationId = params["params"].publicationId; - // console.log(params["params"]); + // } }); @@ -56,7 +56,6 @@ export class PublicationDetailPage implements OnInit { } ngOnInit() { - /* console.log(this.publication.FileBase64); */ this.getPublicationDetail(); } doRefresh(event) { @@ -69,10 +68,9 @@ export class PublicationDetailPage implements OnInit { getPublicationDetail(){ this.showLoader = true; - console.log(this.publicationId); - /* console.log(this.folderId); */ + this.publications.GetPublicationById(this.publicationId).subscribe(res=>{ - console.log(res); + /* this.publication = res; */ this.publication = { DateIndex: res.DateIndex, @@ -126,7 +124,7 @@ export class PublicationDetailPage implements OnInit { } async editPost(publicationType:any) { - console.log(this.publication); + const modal = await this.modalController.create({ component: NewPublicationPage, componentProps:{ diff --git a/src/app/pages/publications/view-publications/view-publications.page.ts b/src/app/pages/publications/view-publications/view-publications.page.ts index 5a7bb8264..f07821ef6 100644 --- a/src/app/pages/publications/view-publications/view-publications.page.ts +++ b/src/app/pages/publications/view-publications/view-publications.page.ts @@ -48,11 +48,11 @@ export class ViewPublicationsPage implements OnInit { this.item = new PublicationFolder(); this.activatedRoute.paramMap.subscribe(params => { - console.log(params); + if (params["params"]) { this.folderId = params["params"].folderId; - // console.log(params["params"]); + // } window['app-view-publications-page-doRefresh'] = this.doRefresh @@ -114,7 +114,7 @@ export class ViewPublicationsPage implements OnInit { getPublicationDetail() { this.publications.GetPresidentialAction(this.folderId).subscribe(res => { - console.log(res); + this.item = res; this.sqliteservice.updatePublicationsDetails(this.folderId, JSON.stringify(res)); }); @@ -128,7 +128,7 @@ export class ViewPublicationsPage implements OnInit { // this.publications.GetIdsPublicationsImages(this.id).subscribe(res => { - // console.log(this.id) + // // this.publicationList = new Array(); @@ -138,31 +138,31 @@ export class ViewPublicationsPage implements OnInit { const folderId = this.folderId this.publications.GetPublicationsImages(this.folderId).subscribe(res => { - console.log('publications ids', res) + this.publicationList = new Array(); /* for(let i = 0; i < res.length; i++) { this.publications.GetPublicationById(res[i]).subscribe(ress => { - console.log('publications by ids', ress) + let item: Publication = this.publicationPipe.itemList(ress) - console.log('publications by ids 2', item) + this.publicationList.push(item); }) } */ res.forEach(element => { - console.log('publications elements', element) + this.publications.GetPublicationById(element).subscribe(ress => { - console.log('publications by ids', ress) + let item: Publication = this.publicationPipe.itemList(ress) - console.log('publications by ids 2', item) + this.publicationList.push(item); }) }); - console.log('PUBLICATIONS IMAGEs',this.publicationList) + this.sqliteservice.updateactions(this.folderId, JSON.stringify(this.publicationList)); - console.log('PUBLICATIONS IMAGEs',this.publicationList) + this.getpublication = this.publicationList; this.showLoader = false; @@ -170,7 +170,7 @@ export class ViewPublicationsPage implements OnInit { /* this.publicationList = new Array(); res.forEach(element => { - console.log('getPublications', element) + let item: Publication = this.publicationPipe.itemList(element) this.publicationList.push(item); }); @@ -190,15 +190,15 @@ export class ViewPublicationsPage implements OnInit { this.getFromDB(); this.publications.GetPublications(this.folderId).subscribe(res => { - console.log(this.folderId) + this.publicationList = new Array(); res.forEach(element => { - console.log('getPublications', element) + let item: Publication = this.publicationPipe.itemList(element) this.publicationList.push(item); - console.log('getPublications 222', item) + }); this.sqliteservice.updateactions(this.folderId, JSON.stringify(this.publicationList)); @@ -233,7 +233,7 @@ export class ViewPublicationsPage implements OnInit { getFromDB() { this.sqliteservice.getActionById(this.folderId).then((publications) => { - console.log('publications', publications) + /* let item = { ActionType: publications[0].ActionType, DateBegin: publications[0].DateBegin, diff --git a/src/app/pages/search/organic-entity/organic-entity.page.ts b/src/app/pages/search/organic-entity/organic-entity.page.ts index ffa667bdd..fc165eee6 100644 --- a/src/app/pages/search/organic-entity/organic-entity.page.ts +++ b/src/app/pages/search/organic-entity/organic-entity.page.ts @@ -32,7 +32,6 @@ export class OrganicEntityPage implements OnInit { getOrganicEntity(){ this.OrganicEntityService.getOrganicEntity().subscribe(res=>{ - console.log(res) this.organicEntities = res; this.showOrganicEntities = res }); diff --git a/src/app/pages/search/search.page.ts b/src/app/pages/search/search.page.ts index 7d05ab861..45078e16b 100644 --- a/src/app/pages/search/search.page.ts +++ b/src/app/pages/search/search.page.ts @@ -82,7 +82,7 @@ export class SearchPage implements OnInit { } else if (this.currentPath == '/home/publications') { this.type = "AccoesPresidenciais" } else { - console.log('search bug!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!') + } } } @@ -148,7 +148,7 @@ export class SearchPage implements OnInit { this.list = list - console.log(this.list) + const elem = document.documentElement.querySelector('.most-searched-word-container'); @@ -219,7 +219,7 @@ export class SearchPage implements OnInit { this.search.basicSearch(this.searchSubject, this.searchDocumentDate, this.searchSender ,this.searchOrganicEntiry, this.searchDocTypeId, '0').subscribe(res=>{ - console.log(res); + res.Categories.forEach( e => { e['Active'] = false; @@ -478,7 +478,7 @@ export class SearchPage implements OnInit { this.search.basicSearch(this.searchSubject, this.searchDocumentDate, this.searchSender ,this.searchOrganicEntiry, this.searchDocTypeId, '386').subscribe(res=>{ - console.log(res); + res.Categories.forEach( e => { e['Active'] = false; diff --git a/src/app/pages/search/sender/sender.page.ts b/src/app/pages/search/sender/sender.page.ts index 5052a3b70..e8043ffe3 100644 --- a/src/app/pages/search/sender/sender.page.ts +++ b/src/app/pages/search/sender/sender.page.ts @@ -49,7 +49,6 @@ export class SenderPage implements OnInit { } selectUser(username:string){ - console.log(username); this.selectedUser = username; this.close(this.selectedUser); } diff --git a/src/app/services/aesencrypt.service.ts b/src/app/services/aesencrypt.service.ts index 900658290..eac87d623 100644 --- a/src/app/services/aesencrypt.service.ts +++ b/src/app/services/aesencrypt.service.ts @@ -22,7 +22,7 @@ export class AESEncrypt { //Decrypting the string contained in cipherParams using the PBKDF2 key var decrypted = CryptoJS.AES.encrypt(encryptData, key128Bits1000Iterations, { mode: CryptoJS.mode.CBC, iv: iv, padding: CryptoJS.pad.Pkcs7 }); - // console.log('AES encrypt',decrypted.toString()); + // return decrypted.toString(); } diff --git a/src/app/services/agenda/list-box.service.ts b/src/app/services/agenda/list-box.service.ts index 1b324d3e3..99f6f8bd5 100644 --- a/src/app/services/agenda/list-box.service.ts +++ b/src/app/services/agenda/list-box.service.ts @@ -34,7 +34,7 @@ export class ListBoxService { list(eventSource: EventListStore[], profile: 'md' | 'pr' | 'all', rangeStartDate, randEndDate, {segment = 'Combinado', selectedDate= null}) { - // console.log('eventSource', eventSource ,'rangeStartDate', new Date(rangeStartDate).toLocaleDateString('pt') , 'randEndDate', new Date(randEndDate).toLocaleDateString('pt')) + // // // filter range // if(selectedDate) { diff --git a/src/app/services/alert.service.ts b/src/app/services/alert.service.ts index 48fe9d8ff..da8612c3d 100644 --- a/src/app/services/alert.service.ts +++ b/src/app/services/alert.service.ts @@ -51,7 +51,7 @@ export class AlertService { role: 'cancel', cssClass: 'secondary', handler: () => { - //console.log('Confirm Cancel'); + // } }, { text: 'Apagar', diff --git a/src/app/services/app-process-status.service.ts b/src/app/services/app-process-status.service.ts index 8f66b538b..c0da6d98b 100644 --- a/src/app/services/app-process-status.service.ts +++ b/src/app/services/app-process-status.service.ts @@ -13,12 +13,12 @@ export class AppProcessStatusService { private events() { document.addEventListener('pause', () => { - // console.log('App going to background'); + // this.status = 'pause' }); document.addEventListener('resume', () => { - // console.log('App going to background'); + // this.status = 'resume' }); } diff --git a/src/app/services/attachments.service.ts b/src/app/services/attachments.service.ts index a0becf334..85b91a87c 100644 --- a/src/app/services/attachments.service.ts +++ b/src/app/services/attachments.service.ts @@ -25,7 +25,7 @@ export class AttachmentsService { uploadFile(formData:any) { - console.log('UPLOAD file', formData) + //const geturl = environment.apiURL + 'Tasks/DelegateTask'; const geturl = environment.apiURL + 'ObjectServer/UploadFiles'; @@ -82,8 +82,8 @@ export class AttachmentsService { ).subscribe((fileBlob: Uint8Array) => { /** File - @ionic-native/file/ngx */ vm.file.writeFile(downloadPath, "YourFileName.pdf", fileBlob, {replace: true}); - console.log(downloadPath +"/"+"YourFileName.pdf") - console.log(fileBlob) + + }); } diff --git a/src/app/services/auth.service.ts b/src/app/services/auth.service.ts index 7eba21f1f..5a689cdde 100644 --- a/src/app/services/auth.service.ts +++ b/src/app/services/auth.service.ts @@ -80,7 +80,7 @@ export class AuthService { try { response = await this.http.post(environment.apiURL + "UserAuthentication/Login", '', this.opts).toPromise(); - console.log(response); + if(saveSession) { this.SetSession(response, user) @@ -96,8 +96,8 @@ export class AuthService { SetSession(response: LoginUserRespose, user:UserForm) { const session: UserSession = Object.assign(SessionStore.user, response) - console.log('SETSESSION', response, user) - console.log('SETSESSION 2', session) + + if (response) { @@ -132,7 +132,7 @@ export class AuthService { session.BasicAuthKey = user.BasicAuthKey - console.log(session) + SessionStore.reset(session) this.ValidatedUser = SessionStore.user; @@ -164,13 +164,13 @@ export class AuthService { let responseChat = await this.httpService.post('login', postData).toPromise(); if(responseChat) { - console.log() + this.ValidatedUserChat = responseChat; localStorage.setItem('userChat', JSON.stringify(responseChat)); this.storageService.store(AuthConnstants.AUTH, responseChat); } else{ - console.log('Network error'); + this.presentAlert('Network error'); } @@ -185,22 +185,22 @@ export class AuthService { loginToChatWs() { setTimeout(()=>{ - console.log('loginToChatWs') + this.WsChatService.connect(); this.WsChatService.login().then((message: any) => { - console.log('loginToChatWs',message) + SessionStore.user.RochetChatUserId = message.result.id SessionStore.save() - // console.log('user session', SessionStore.user) + // this.WsChatService.setStatus('online') // alert('wsLogin') }).catch((message) => { - console.log('rocket chat login failed', message) + // alert('ws login failed') }) @@ -216,9 +216,9 @@ export class AuthService { let guid: any = await this.AttachmentsService.uploadFile(formData).toPromise() message.file.guid = guid.path - console.log('========================================',guid) + // await this.storage.set(guid.path, message.file.image_url).then(() => { - // console.log('add picture to chat IMAGE SAVED') + // // // message.getFileFromDb() // }); @@ -226,7 +226,7 @@ export class AuthService { return true } catch(e) { - console.log('failed to upload to server', e) + return false } @@ -240,7 +240,7 @@ export class AuthService { return true } catch(e) { - console.log(e) + return false } } @@ -251,16 +251,16 @@ export class AuthService { this.NfService.downloadFileMsg = async (message: MessageService, room?: RoomService) => { - // console.log('FILE TYPE', message.file.type) + // let downloadFile = ""; if (message.file.type == "application/img") { const event: any = await this.AttachmentsService.downloadFile(message.file.guid).toPromise(); - console.log('FILE TYPE 22', message.file.guid) + if (event.type === HttpEventType.DownloadProgress) { //this.downloadProgess = Math.round((100 * event.loaded) / event.total); - // console.log('FILE TYPE 33', message.file.type) + // return true } else if (event.type === HttpEventType.Response) { downloadFile = 'data:image/jpeg;base64,' + btoa(new Uint8Array(event.body).reduce((data, byte) => data + String.fromCharCode(byte), '')); @@ -272,7 +272,7 @@ export class AuthService { } await this.storage.set(message.file.guid, downloadFile).then(() => { - // console.log('IMAGE SAVED') + // }); return true } diff --git a/src/app/services/camera.service.ts b/src/app/services/camera.service.ts index b99fd6956..6ccc91648 100644 --- a/src/app/services/camera.service.ts +++ b/src/app/services/camera.service.ts @@ -13,7 +13,7 @@ export class CameraService { return new Promise(async (resolve, reject)=>{ - console.log('add camera to picture') + const image = await Camera.getPhoto({ quality: 50, diff --git a/src/app/services/chat.service.ts b/src/app/services/chat.service.ts index 3e008359e..2748d220a 100644 --- a/src/app/services/chat.service.ts +++ b/src/app/services/chat.service.ts @@ -38,7 +38,7 @@ export class ChatService { if(this.p.userPermission(this.p.permissionList.Chat.access)) { - // console.log(this.loggedUserChat) + // this.headers = this.headers.set('X-User-Id', this.loggedUserChat.userId); this.headers = this.headers.set('X-Auth-Token', this.loggedUserChat.authToken); this.options = { @@ -210,7 +210,7 @@ export class ChatService { /* GROUPS */ addGroup(body:any){ - console.log(body); + return this.http.post(environment.apiChatUrl+'groups.create', body, this.options); } setGroupCustomFields(body:any){ @@ -320,7 +320,7 @@ export class ChatService { } async subscribe(roomId:any) { - console.log('Subcrive') + let params = new HttpParams(); params = params.set("roomId", roomId); let opts = { @@ -329,7 +329,7 @@ export class ChatService { } this.http.get(environment.apiChatUrl+'im.messages', opts).subscribe(async res => { - console.log("Subcrive", res) + if (res == 502) { // Connection timeout diff --git a/src/app/services/chat/chat-storage.service.ts b/src/app/services/chat/chat-storage.service.ts index 4f72daac3..523326c6d 100644 --- a/src/app/services/chat/chat-storage.service.ts +++ b/src/app/services/chat/chat-storage.service.ts @@ -32,7 +32,7 @@ export class ChatStorageService { }) this.storage.set('chatmsg' + roomId, messages).then((value) => { - // console.log('MSG SAVED ON STORAGE', value) + // }); }) @@ -66,7 +66,7 @@ export class ChatStorageService { await this.storage.set('chatmsg' + roomId, messages) } else { - // console.log('failed to update', identificator, ':',ChatMessage) + // } }) @@ -101,14 +101,14 @@ export class ChatStorageService { messages[index] = Object.assign(messages[index], ChatMessage) // if(messages[index].msg.includes('***********')) { - // console.log('storage update') - // console.log(JSON.stringify(messages[index])) - // console.log(JSON.stringify(ChatMessage)) + // + // + // // } await this.storage.set('chatmsg' + roomId, messages) } else { - console.log('failed to update', identificator) + } }) @@ -130,10 +130,10 @@ export class ChatStorageService { delete ChatMessage.temporaryData messages.push(ChatMessage) - console.log('no ID') + await this.storage.set('chatmsg' + roomId, messages) - // console.log('add to DB', ChatMessage) + // } else { const find = messages.find((message)=> { @@ -144,9 +144,9 @@ export class ChatStorageService { delete ChatMessage.temporaryData messages.push(ChatMessage) await this.storage.set('chatmsg' + roomId, messages) - // console.log('add to DB', ChatMessage) + // } else { - console.log('duplicate') + } } @@ -166,7 +166,7 @@ export class ChatStorageService { delete ChatMessage.temporaryData messages.push(ChatMessage) - // console.log('add to DB') + // } else { const find = messages.find((message)=> { @@ -176,7 +176,7 @@ export class ChatStorageService { if(!find) { delete ChatMessage.temporaryData messages.push(ChatMessage) - // console.log('add to DB') + // } diff --git a/src/app/services/chat/message.service.ts b/src/app/services/chat/message.service.ts index f2d0d929f..73da5adcc 100644 --- a/src/app/services/chat/message.service.ts +++ b/src/app/services/chat/message.service.ts @@ -242,14 +242,14 @@ export class MessageService { } else if (this.file.type != "application/img") { downloadFile = new Uint8Array(event.body).reduce((data, byte) => data + String.fromCharCode(byte), ''); - console.log(downloadFile) + } /* else if (this.file.type == 'application/audio') { downloadFile = new Uint8Array(event.body).reduce((data, byte) => data + String.fromCharCode(byte), ''); } else if (this.file.type == 'application/vnd.openxmlformats-officedocument.wordprocessingml.document') { downloadFile = new Uint8Array(event.body).reduce((data, byte) => data + String.fromCharCode(byte), ''); } */ - console.log('Download file ',downloadFile ) + this.attachments[0] = { image_url: downloadFile, @@ -331,7 +331,7 @@ export class MessageService { async save() { const message = this.getChatObj() - console.log(message); + await MessageModel.update(message) diff --git a/src/app/services/chat/room.service.ts b/src/app/services/chat/room.service.ts index 31fa9b1ee..42e167c69 100644 --- a/src/app/services/chat/room.service.ts +++ b/src/app/services/chat/room.service.ts @@ -242,12 +242,12 @@ export class RoomService { if (typeof args[1] != 'object') { this.userThatIsTyping = this.usernameToDisplayName(args[0]) - console.log(this.userThatIsTyping, 'this.userThatIsTyping') + this.isTyping = args[1] this.otherUserType = args[1] this.readAllMessage() - // console.log(JSON.stringify(args)) + // // alert(JSON.stringify(args)) } else if(args[0]?.method == 'viewMessage' || args[1]?.method == 'viewMessage') { @@ -255,7 +255,7 @@ export class RoomService { } else if(args[0]?.method == 'deleteMessage' || args[1]?.method == 'deleteMessage') { // alert('delete') - // console.log(args[0], 'receive delete message::()') + // this.deleteMessage(args[1]?.method?._id) } else { @@ -395,7 +395,7 @@ export class RoomService { return true } else { - // console.log(_id,'==',this.messages[i]?._id, false) + // } } @@ -612,7 +612,7 @@ export class RoomService { await this.WsChatService.loadHistory(this.id, limit).then( async (chatHistory:chatHistory) => { - // console.log('load chatHistory', JSON.stringify(chatHistory)) + // const messagesId = this.messages.map((message)=> message._id) diff --git a/src/app/services/chat/websocket.service.ts b/src/app/services/chat/websocket.service.ts index 162aac12b..64a9a3185 100644 --- a/src/app/services/chat/websocket.service.ts +++ b/src/app/services/chat/websocket.service.ts @@ -13,7 +13,7 @@ export class WebsocketService { public connect(url): Rx.Subject { if(!this.subject){ this.subject = this.create(url); - console.log("Sucessful connect :"+url); + } return this.subject; } diff --git a/src/app/services/chat/ws-chat-methods.service.ts b/src/app/services/chat/ws-chat-methods.service.ts index bc158569b..95b11a1f9 100644 --- a/src/app/services/chat/ws-chat-methods.service.ts +++ b/src/app/services/chat/ws-chat-methods.service.ts @@ -152,7 +152,7 @@ export class WsChatMethodsService { try { const rooms = await this.storage.get('Rooms'); - console.log('restore',rooms) + if(rooms) { await rooms.result.update.forEach( async (roomData: room) => { @@ -172,7 +172,7 @@ export class WsChatMethodsService { async getAllRooms () { this.loadingWholeList = true const rooms = await this.WsChatService.getRooms(); - console.log('get all rooms', this.loggedUser) + await this.storage.remove('Rooms'); await rooms.result.update.forEach( async (roomData: room, index) => { @@ -210,7 +210,7 @@ export class WsChatMethodsService { }); - console.log('save rooms', rooms) + await this.storage.set('Rooms', rooms); @@ -249,7 +249,7 @@ export class WsChatMethodsService { } this.WsChatService.streamNotifyLogged().then((subscription=>{ - console.log('streamRoomMessages', subscription) + })) } @@ -275,14 +275,14 @@ export class WsChatMethodsService { */ private defaultSubtribe(id: any) { this.WsChatService.streamRoomMessages(id).then((subscription)=>{ - //console.log('streamRoomMessages', subscription) + // }) this.WsChatService.subStreamNotifyRoom(id, 'typing', false) this.WsChatService.subStreamNotifyRoom(id, 'readMessage', false) this.WsChatService.streamNotifyRoomDeleteMessage(id).then((subscription)=>{ - //console.log('streamNotifyRoomDeleteMessage', subscription); + // }) } diff --git a/src/app/services/chat/ws-chat.service.ts b/src/app/services/chat/ws-chat.service.ts index e48d82d06..173a9f167 100644 --- a/src/app/services/chat/ws-chat.service.ts +++ b/src/app/services/chat/ws-chat.service.ts @@ -54,7 +54,7 @@ export class WsChatService { } const requestId = uuidv4() - // console.log('Login true', SessionStore.user) + // const message = { msg: "method", method: "login", @@ -70,12 +70,12 @@ export class WsChatService { return new Promise((resolve, reject) => { - // console.log('MESSAGE:ID', requestId) + // this.ws.registerCallback({type:'Onmessage', funx:(message)=>{ - // console.log('MESSAGE:ID', message) + // if(message.id == requestId ) { // same request send - // console.log('MESSAGE:ID', message.id, requestId) - // console.log('LOGIN WS',message) + // + // if(message.result) { if(message.result.token) { @@ -87,11 +87,11 @@ export class WsChatService { }, 10) resolve(message) - // console.log('LOGIN WS',message) + // } } else { this.isLogin = false - // console.log('Register FAIl', message) + // reject(message) } @@ -121,7 +121,7 @@ export class WsChatService { this.ws.registerCallback({type:'Onmessage', funx:(message)=>{ if(message.id == requestId) { // same request send resolve(message) - // console.log('getRooms', message) + // return true } }}) @@ -206,7 +206,7 @@ export class WsChatService { }] } - // console.log('send message to rocketchat ', message) + // this.ws.send({message, requestId}); @@ -312,7 +312,7 @@ export class WsChatService { this.ws.registerCallback({type:'Onmessage', funx:(message)=>{ if(message.id == requestId ) { // same request send resolve(message) - // console.log(message); + // return true } @@ -478,7 +478,7 @@ export class WsChatService { return new Promise((resolve, reject) => { this.ws.registerCallback({type:'Onmessage', funx:(message)=>{ - // console.log(message) + // if(message.id == requestId ) { // same request send resolve(message) return true @@ -536,7 +536,7 @@ export class WsChatService { this.ws.registerCallback({ type:'Onmessage', funx:(message)=>{ - //console.log(message); + // if(message.msg =='changed' && message.collection == collection) { if(message.fields.args[0].rid == roomId) { @@ -674,7 +674,7 @@ export class WsChatService { registerCallback:(params: wsCallbacksParams) => { let id = params.requestId || params.key || uuidv4() - // console.log('register id', params) + // this.wsCallbacks[id] = params this.n++ return id @@ -690,7 +690,7 @@ export class WsChatService { onopen: async ()=> { this.ws.connected = true - console.log('================== welcome to socket server =====================') + setTimeout(()=>{ @@ -719,11 +719,11 @@ export class WsChatService { for (const [key, item] of Object.entries(this.wsMsgQueue)) { if(item.loginRequired == true && this.isLogin == true) { - //console.log('run msgQueue ', key) + // this.ws.send(item); delete this.wsMsgQueue[key] } else if(item.loginRequired == false) { - //console.log('run msgQueue ', key) + // this.ws.send(item); delete this.wsMsgQueue[key] } @@ -732,13 +732,13 @@ export class WsChatService { send: ({message, requestId = uuidv4(), loginRequired = true}:send) => { if (this.ws.connected == false || loginRequired == true && this.isLogin == false) { // save data to send when back online - // console.log('save msgQueue this.ws.connected == false || loginRequired == true && this.isLogin == false',this.ws.connected, loginRequired, this.isLogin) - //console.log('save msgQueue', requestId, message) + // + // this.wsMsgQueue[requestId] = {message, requestId, loginRequired} } else { let messageStr = JSON.stringify(message) - // console.log('messageStr', messageStr) + // this.socket.send(messageStr) } @@ -748,7 +748,7 @@ export class WsChatService { onmessage: async (event: any)=> { const data = JSON.parse(event.data) - // console.log('onmessage', data) + // for (const [key, value] of Object.entries(this.wsCallbacks)) { if(value.type== 'Onmessage') { @@ -772,11 +772,11 @@ export class WsChatService { this.connect() this.login() - console.log(`[close] Connection closed cleanly, code=${event.code} reason=${event.reason}`); + }, onerror: (event: any) => { - console.log(`[error] ${event.message}`); + } }} diff --git a/src/app/services/events.service.ts b/src/app/services/events.service.ts index 51221aee3..4c3b7148a 100644 --- a/src/app/services/events.service.ts +++ b/src/app/services/events.service.ts @@ -47,6 +47,15 @@ export class EventsService { hasOwnOficial: boolean = false; hasOwnPessoal: boolean = false; + + + userCalendarNameSharedOficial = ''; + userCalendarNameSharedPessoal = ''; + userCalendarNameOwnOficial = ''; + userCalendarNameOwnPessoal = ''; + + + constructor( private http: HttpClient, public user: AuthService, @@ -56,7 +65,8 @@ export class EventsService { private backgroundservice: BackgroundService) { this.loggeduser = this.user.ValidatedUser; - + + this.headers = new HttpHeaders(); this.headersMdOficial = new HttpHeaders(); this.headersMdPessoal = new HttpHeaders(); @@ -82,7 +92,7 @@ export class EventsService { } - setHeader() { + async setHeader () { this.hasSharedCalendar = false this.hasSharedOficial = false @@ -92,13 +102,22 @@ export class EventsService { this.hasOwnOficial = false this.hasOwnPessoal = false + this.headers = new HttpHeaders(); + this.headerOwnOficial= new HttpHeaders(); this.headerOwnPessoal= new HttpHeaders(); this.headerSharedOficial= new HttpHeaders(); this.headerSharedPessoal= new HttpHeaders(); + + this.headers = this.headers.set('Authorization', this.loggeduser.BasicAuthKey); + + this.userCalendarNameSharedOficial = ''; + this.userCalendarNameSharedPessoal = ''; + this.userCalendarNameOwnOficial = ''; + this.userCalendarNameOwnPessoal = ''; - this.calendarIds = [] + this.calendarIds = []; if (this.loggeduser) { if (this.loggeduser.Profile == 'MDGPR') { @@ -226,10 +245,15 @@ export class EventsService { this.headerSharedPessoal = this.headerSharedPessoal.set('CalendarRoleId', sharedCalendar.CalendarRoleId); this.headerSharedPessoal = this.headerSharedPessoal.set('CalendarName', sharedCalendar.CalendarName); } + + + this.GetCalendarName(sharedCalendar.OwnerUserId).subscribe((e)=> { + console.log(e) + }) + } - this.headers = new HttpHeaders(); - this.headers = this.headers.set('Authorization', this.loggeduser.BasicAuthKey); + } } @@ -328,6 +352,23 @@ export class EventsService { return this.http.get(`${geturl}`, options) } + + GetCalendarName(userid:string) { + + let geturl = environment.apiURL + 'userauthentication/single'; + + let params = new HttpParams(); + + params = params.set("id", userid); + + let options = { + headers: this.headers, + params: params + } + + return this.http.get(`${geturl}`, options) + } + async getAllMdEvents(startdate: string, enddate: string) { let prO = [], prP = []; @@ -341,6 +382,8 @@ export class EventsService { } + + async getAllOwnEvents(startdate: string, enddate: string) { let ownO = [], ownP = []; @@ -469,7 +512,7 @@ export class EventsService { headers: this.headersSharedOficial, params: params }; - console.log(options); + return this.http.get(`${geturl}`, options); } @@ -642,7 +685,7 @@ export class EventsService { return this.http.put(`${puturl}`, event, options).pipe( catchError(err => { - console.log('Event edit saved offline') + this.offlinemanager.storeRequestData('eventEdit', arrayReq); throw new Error(err); }) @@ -667,7 +710,7 @@ export class EventsService { let options: any; switch (calendarName) { case 'Oficial': - console.log(calendarName); + options = { headers: this.headersMdOficial, params: params @@ -675,14 +718,14 @@ export class EventsService { break; case 'Pessoal': - console.log(calendarName); + options = { headers: this.headersMdPessoal, params: params }; break; } - console.log(options); + return this.http.post(`${puturl}`, event, options) } @@ -695,7 +738,7 @@ export class EventsService { let options: any; switch (calendarName) { case 'Oficial': - console.log(calendarName); + options = { headers: this.headersPrOficial, params: params @@ -703,7 +746,7 @@ export class EventsService { break; case 'Pessoal': - console.log(calendarName); + options = { headers: this.headersPrPessoal, params: params @@ -816,7 +859,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); }) @@ -891,7 +934,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); }) diff --git a/src/app/services/events/edit-event/edit-event.page.ts b/src/app/services/events/edit-event/edit-event.page.ts index df6574c35..0abc741ee 100644 --- a/src/app/services/events/edit-event/edit-event.page.ts +++ b/src/app/services/events/edit-event/edit-event.page.ts @@ -70,7 +70,7 @@ export class EditEventPage implements OnInit { else{ this.pageId = paramMap.get('eventId'); eventid = paramMap.get('eventId'); - console.log(eventid); + } if (paramMap.has("caller")){ @@ -162,7 +162,7 @@ export class EditEventPage implements OnInit { this.activatedRoute.paramMap.subscribe(paramMap =>{ if (paramMap.has("profile")){ - console.log(paramMap.get('profile')); + } }); @@ -184,11 +184,10 @@ export class EditEventPage implements OnInit { loadAttachments() { - /* console.log(this.pageId); */ this.attachamentsService.getAttachmentsById(this.pageId).subscribe(res => { this.loadedEventAttachments = res; - console.log(res); + }); } diff --git a/src/app/services/events/event-detail-modal/event-detail-modal.page.ts b/src/app/services/events/event-detail-modal/event-detail-modal.page.ts index a813d050a..91b79c410 100644 --- a/src/app/services/events/event-detail-modal/event-detail-modal.page.ts +++ b/src/app/services/events/event-detail-modal/event-detail-modal.page.ts @@ -72,7 +72,7 @@ export class EventDetailModalPage implements OnInit { else{ this.pageId = paramMap.get('eventId'); eventid = paramMap.get('eventId'); - console.log(eventid); + } if (paramMap.has("caller")){ @@ -184,10 +184,10 @@ export class EventDetailModalPage implements OnInit { this.loadedEventAttachments = attachments; }); */ this.attachamentsService.getAttachmentsById(this.pageId).subscribe(res => { - console.log(res); + },(error) => { - console.log(error); + }); } diff --git a/src/app/services/events/event-detail/event-detail.page.ts b/src/app/services/events/event-detail/event-detail.page.ts index 67858c507..7752966a7 100644 --- a/src/app/services/events/event-detail/event-detail.page.ts +++ b/src/app/services/events/event-detail/event-detail.page.ts @@ -70,7 +70,7 @@ export class EventDetailPage implements OnInit { else{ this.pageId = paramMap.get('eventId'); eventid = paramMap.get('eventId'); - console.log(eventid); + } if (paramMap.has("caller")){ @@ -160,7 +160,7 @@ export class EventDetailPage implements OnInit { this.activatedRoute.paramMap.subscribe(paramMap =>{ if (paramMap.has("profile")){ - console.log(paramMap.get('profile')); + } }); @@ -182,11 +182,10 @@ export class EventDetailPage implements OnInit { loadAttachments() { - /* console.log(this.pageId); */ this.attachamentsService.getAttachmentsById(this.pageId).subscribe(res => { this.loadedEventAttachments = res; - console.log(res); + }); } diff --git a/src/app/services/events/events.page.ts b/src/app/services/events/events.page.ts index 0bf1ea61c..c4f2e0019 100644 --- a/src/app/services/events/events.page.ts +++ b/src/app/services/events/events.page.ts @@ -85,15 +85,15 @@ export class EventsPage implements OnInit { public platform: Platform, ) { this.existingScreenOrientation = this.screenOrientation.type; - console.log(this.existingScreenOrientation); + this.loggeduser = authService.ValidatedUser; this.prEventList = null; this.platform.resize.subscribe(async () => { - //console.log('Resize event detected'); - // console.log('Resize event detected'); + // + // }); @@ -136,7 +136,7 @@ export class EventsPage implements OnInit { // Lock to portrait lockToPortrait(){ this.screenOrientation.lock(this.screenOrientation.ORIENTATIONS.PORTRAIT); - console.log('set'); + } // Lock to landscape @@ -152,7 +152,7 @@ export class EventsPage implements OnInit { checkScreenOrientation(){ if( window.innerWidth < 701) { this.lockToPortrait(); - console.log('was here'); + } else{ @@ -232,8 +232,8 @@ export class EventsPage implements OnInit { let prOficialEvents= await this.eventService.getAllPrOficialEvents(start, end).toPromise(); let prPessoalEvents= await this.eventService.getAllPrPessoalEvents(start, end).toPromise(); this.eventsList = prOficialEvents.concat(prPessoalEvents); - console.log(this.eventsList); - console.log(this.eventsList); + + if(this.eventsList.length > 0){ this.currentEvent = this.eventsList[0].Subject; @@ -296,12 +296,12 @@ export class EventsPage implements OnInit { changeProfile(){ if(this.profile == "mdgpr"){ - console.log('pr'); + this.profile ="pr"; this.RefreshEvents(); } else{ - console.log('mdgpr'); + this.profile ="mdgpr"; this.RefreshEvents(); } @@ -314,7 +314,7 @@ export class EventsPage implements OnInit { } async openEventDetail1(id:any){ - console.log(id); + const modal = await this.modalController.create({ component: EventDetailPage, @@ -331,7 +331,7 @@ export class EventsPage implements OnInit { LoadList() { this.processes.GetTaskListExpediente(false).subscribe(result => { - console.log("Expediente", result); + const ExpedienteTask = result.map( e=> this.expedienteTaskPipe.transform(e)) diff --git a/src/app/services/fcm.service.ts b/src/app/services/fcm.service.ts index 202caa552..3ed97ee0a 100644 --- a/src/app/services/fcm.service.ts +++ b/src/app/services/fcm.service.ts @@ -34,25 +34,25 @@ export class FcmService { PushNotifications.addListener( 'registration', (token: PushNotificationToken) => { - console.log('My token: ' + JSON.stringify(token)); + } ); PushNotifications.addListener('registrationError', (error: any) => { - console.log('Error: ' + JSON.stringify(error)); + }); PushNotifications.addListener( 'pushNotificationReceived', async (notification: PushNotification) => { - console.log('Push received: ' + JSON.stringify(notification)); + } ); PushNotifications.addListener( 'pushNotificationActionPerformed', async (notification: PushNotificationActionPerformed) => { const data = notification.notification.data; - console.log('Action performed: ' + JSON.stringify(notification.notification)); + if (data.detailsId) { this.router.navigateByUrl(`/home/notifications/notification-detail${data.detaisId}`); } diff --git a/src/app/services/file/custom-image-cache/custom-image-cache.page.ts b/src/app/services/file/custom-image-cache/custom-image-cache.page.ts index e225ba059..0528cd5cf 100644 --- a/src/app/services/file/custom-image-cache/custom-image-cache.page.ts +++ b/src/app/services/file/custom-image-cache/custom-image-cache.page.ts @@ -22,7 +22,7 @@ export class CustomImageCachePage implements OnInit { @Input() set src(imageUrl: string){ - console.log('SET SOURCE', imageUrl) + const imageName = imageUrl.split('/').pop() const fileType = imageName.split('.').pop() @@ -30,7 +30,7 @@ export class CustomImageCachePage implements OnInit { Filesystem.readFile({ directory: Directory.Cache, path: `${CACHE_FOLDER}/${imageName}`}).then(readFile =>{ - console.log('LOCAL FILE: ', readFile) + // set to SRC this._src = `data:image/${fileType};base64ToFile, ${readFile.data}` }).catch(async e =>{ diff --git a/src/app/services/file/file-loader.service.ts b/src/app/services/file/file-loader.service.ts index f28298ee7..83933ba90 100644 --- a/src/app/services/file/file-loader.service.ts +++ b/src/app/services/file/file-loader.service.ts @@ -25,7 +25,7 @@ export class FileLoaderService { // input.onchange = () => { // // you can use this method to get file and perform respective operations // let files = Array.from(input.files); - // console.log(files); + // // }; diff --git a/src/app/services/functions/file.service.ts b/src/app/services/functions/file.service.ts index 2554b51d6..1caf69920 100644 --- a/src/app/services/functions/file.service.ts +++ b/src/app/services/functions/file.service.ts @@ -78,12 +78,12 @@ export class FileService { path: IMAGE_DIR, directory: Directory.Data, }).then(result => { - console.log('ALL RESULTS', result.files[0]) + let lastphoto = result.files[result.files.length - 1] resolve(lastphoto) }, async (err) => { - console.log('ERROR FILE DOSENT EXIST', err) + reject('ERROR FILE DOSENT EXIST') // Folder does not yet exists! await Filesystem.mkdir({ @@ -127,7 +127,7 @@ export class FileService { //new method 4 async loadFileData(fileName: string) { - console.log('ALL PHOTOT FILE', fileName) + // for (let f of fileNames) { const filePath = `${IMAGE_DIR}/${fileName}`; @@ -139,7 +139,7 @@ export class FileService { data: `data:image/jpeg;base64,${readFile.data}`, }; - console.log('ALL IMAGE', image) + const capturedImage = image.data diff --git a/src/app/services/functions/sort.service.ts b/src/app/services/functions/sort.service.ts index 6f65ab277..d47d95c60 100644 --- a/src/app/services/functions/sort.service.ts +++ b/src/app/services/functions/sort.service.ts @@ -17,7 +17,7 @@ export class SortService { } sortArrayByDate(myArray: any) { - console.log(myArray[0].taskStartDate); + if(myArray.length > 0){ return myArray.sort(function (a, b) { return (new Date(a.workflowInstanceDataFields.StartDate) < new Date(b.workflowInstanceDataFields.StartDate)) ? -1 : ((new Date(a.workflowInstanceDataFields.StartDate) > new Date(b.workflowInstanceDataFields.StartDate)) ? 1 : 0); @@ -29,10 +29,6 @@ export class SortService { return array.sort( (a,b)=> { - /* console.log("AAA"+new Date(this.ObjectService.deepFind(a, path))); - - console.log("BB"+new Date(this.ObjectService.deepFind(b, path))); */ - return (new Date(this.ObjectService.deepFind(a, path)) < new Date(this.ObjectService.deepFind(b, path))) ? -1 : ((new Date(this.ObjectService.deepFind(a, path)) > new Date(this.ObjectService.deepFind(b, path))) ? 1 : 0); //return new Date(this.ObjectService.deepFind(b, path)).getTime() - new Date(this.ObjectService.deepFind(a, path)).getTime(); diff --git a/src/app/services/functions/time.service.ts b/src/app/services/functions/time.service.ts index 8ed278bcb..5d4f3848f 100644 --- a/src/app/services/functions/time.service.ts +++ b/src/app/services/functions/time.service.ts @@ -60,12 +60,12 @@ export class TimeService { if(this.room.t === 'p'){ this.chatService.deleteGroup(body).subscribe(res=>{ - console.log(res); + }); } else{ this.chatService.deleteChannel(body).subscribe(res=>{ - console.log(res); + }); } }); @@ -93,12 +93,12 @@ export class TimeService { if(this.room.t === 'p'){ this.chatService.deleteGroup(body).subscribe(res=>{ - console.log(res); + }); } else{ this.chatService.deleteChannel(body).subscribe(res=>{ - console.log(res); + }); } }); diff --git a/src/app/services/jsonStore.service.ts b/src/app/services/jsonStore.service.ts index 3dec50203..d104fe5be 100644 --- a/src/app/services/jsonStore.service.ts +++ b/src/app/services/jsonStore.service.ts @@ -22,12 +22,12 @@ export class JsonStore { .then(function () { WL.Logger.debug('Init done'); - console.log('Init done'); + return WL.JSONStore.get(collectionName).add(data, addOptions); }).fail(function (err) { WL.Logger.error(err); - console.log(err) + }); } */ @@ -51,16 +51,16 @@ export class JsonStore { /* WL.JSONStore.init(JSONStoreCollections) .then(function () { WL.Logger.debug('Find all colletion data'); - console.log('Find all colletion data'); + }).fail(function (err) { WL.Logger.error(err); - console.log("JsonStore getColletion error ",err) + }); const data = WL.JSONStore.get(collectionName).findAll(allOptions).then((value) => { - console.log('Find all colletion data', value); + return JSON.parse(value); }); @@ -91,14 +91,14 @@ export class JsonStore { /* WL.JSONStore.init(JSONStoreCollections) .then(function () { WL.Logger.debug('Find colletion data by id'); - console.log('Find colletion data by id'); + return WL.JSONStore.get(collectionName).find(query, allOptions).then((value) => { - console.log('Find colletion data by id', value); + }); }).fail(function (err) { WL.Logger.error(err); - console.log(err) + }); */ } @@ -110,9 +110,9 @@ export class JsonStore { var options = {}; /* WL.JSONStore.get(collectionName).replace(document, options).then(function (numberOfDocsReplaced) { - console.log("JsonStore replace document sucess: ", numberOfDocsReplaced) + }).fail(function (error) { - console.log("JsonStore replace document error: ", error) + }); */ } @@ -120,9 +120,9 @@ export class JsonStore { /* var query = { _id: 1 }; Exemple of query var options = { exact: true }; /* WL.JSONStore.get(collectionName).remove(query, options).then(function (numberOfDocsRemoved) { - console.log("JsonStore remove document sucess: ", numberOfDocsRemoved) + }).fail(function (error) { - console.log("JsonStore remove document erro: ", error) + }); */ } } diff --git a/src/app/services/native-notification.service.ts b/src/app/services/native-notification.service.ts index 4cf54ba31..0b627d3e8 100644 --- a/src/app/services/native-notification.service.ts +++ b/src/app/services/native-notification.service.ts @@ -18,9 +18,9 @@ export class NativeNotificationService { LocalNotifications.requestPermissions() LocalNotifications.checkPermissions().then((data)=>{ - // console.log('success', data) + // }).catch((data)=>{ - // console.log('error', data) + // }) } diff --git a/src/app/services/network-connection.service.ts b/src/app/services/network-connection.service.ts index 8586451d6..aa81e3b82 100644 --- a/src/app/services/network-connection.service.ts +++ b/src/app/services/network-connection.service.ts @@ -12,7 +12,7 @@ export class NetworkConnectionService { constructor(){ Network.addListener('networkStatusChange', status => { - console.log('Network status changed', status); + }); } diff --git a/src/app/services/notification/web-notification-popup.service.ts b/src/app/services/notification/web-notification-popup.service.ts index 48c8e83da..e7bc9828e 100644 --- a/src/app/services/notification/web-notification-popup.service.ts +++ b/src/app/services/notification/web-notification-popup.service.ts @@ -23,7 +23,7 @@ export class WebNotificationPopupService { // Let's check if the browser supports notifications if (!('Notification' in window)) { - console.log("This browser does not support notifications."); + } else { if(this.checkNotificationPromise()) { Notification.requestPermission() @@ -67,7 +67,7 @@ export class WebNotificationPopupService { // {action: 'reply', title: 'Reply', icon: 'https://example/reply.png'} // ] }).then(e =>{ - console.log(e) + }) }); diff --git a/src/app/services/notifications.service.ts b/src/app/services/notifications.service.ts index afbefda73..b23c936b7 100644 --- a/src/app/services/notifications.service.ts +++ b/src/app/services/notifications.service.ts @@ -98,17 +98,17 @@ export class NotificationsService { getAndpostToken(username) { if (this.platform.is('desktop') || this.platform.is('mobileweb')) { - console.log('Notifications not supported') + } else { const geturl = environment.apiURL + 'notifications/token'; PushNotifications.addListener('registration', (token: Token) => { - console.log('token: ', token.value) + this.storageService.store(username, token.value); this.storageService.get(username).then(value => { - console.log('STORAGE TOKEN', value) + this.storageService.get(AuthConnstants.USER).then(res => { - console.log('USERID', res); + const headers = { 'Authorization': SessionStore.user.BasicAuthKey }; const body = { UserId: res.UserId, @@ -118,9 +118,9 @@ export class NotificationsService { }; this.http.post(`${geturl}`, body, { headers }).subscribe(data => { - console.log('TOKEN USER MIDLE', data); + }, (error) => { - console.log('Post token to backend', error) + }) }); @@ -134,7 +134,7 @@ export class NotificationsService { registrationError() { PushNotifications.addListener('registrationError', (error: any) => { - console.log('Error on registration: ' + JSON.stringify(error)); + } ); } @@ -142,9 +142,9 @@ export class NotificationsService { onReciveForeground() { PushNotifications.addListener('pushNotificationReceived', (notification: PushNotificationSchema) => { - console.log('Push received: ' + JSON.stringify(notification)); + this.DataArray.push(notification) - console.log("On ReceiveNotification", this.DataArray) + this.storageService.store("Notifications", this.DataArray) this.eventtrigger.publishSomeData({ notification: "recive" @@ -156,9 +156,9 @@ export class NotificationsService { onReciveBackground() { PushNotifications.addListener('pushNotificationActionPerformed', (notification: ActionPerformed) => { - console.log('Push action performed: ' + JSON.stringify(notification)); + /* this.DataArray.push(notification.notification) - console.log("On ReceiveNotification", this.DataArray) + this.storageService.store("Notifications", this.DataArray) this.eventtrigger.publishSomeData({ notification: "recive" @@ -175,10 +175,10 @@ export class NotificationsService { notificatinsRoutes = (notification) => { - console.log('Push action performed 2222: ' + JSON.stringify(notification.data)); + if (notification.notification.data.Service === "agenda" && notification.notification.data.IdObject.length > 10) { - console.log("Id Lenght", notification.notification.data.IdObject.length) + this.zone.run(() => this.router.navigate(['/home/agenda', notification.notification.data.IdObject, 'agenda'])); } else if (notification.notification.data.Service === "gabinete-digital" && notification.notification.data.Object === "expediente") { diff --git a/src/app/services/object-query.service.ts b/src/app/services/object-query.service.ts index 922ea0349..dbf7d858a 100644 --- a/src/app/services/object-query.service.ts +++ b/src/app/services/object-query.service.ts @@ -54,7 +54,7 @@ export class ObjectQueryService { } print() { - console.log(this.data) + } } diff --git a/src/app/services/offline-manager.service.ts b/src/app/services/offline-manager.service.ts index 391753c69..fbc31a744 100644 --- a/src/app/services/offline-manager.service.ts +++ b/src/app/services/offline-manager.service.ts @@ -25,7 +25,7 @@ export class OfflineManagerService { JSON.parse(req).forEach(element => { this.eventservice.editEvent(element, 2, 3).subscribe((res) => { this.storage.remove('eventEdit') - console.log('eventEdit synchnize', res) + }) }); }) diff --git a/src/app/services/photo.service.ts b/src/app/services/photo.service.ts index 0229ac103..ac93580fa 100644 --- a/src/app/services/photo.service.ts +++ b/src/app/services/photo.service.ts @@ -59,10 +59,10 @@ export class PhotoService { fileFormat: capturedPhoto.format, }); - console.log(capturedPhoto); - console.log(this.photos[0]); + + } */ diff --git a/src/app/services/processes.service.ts b/src/app/services/processes.service.ts index c5a108962..8f1604a2d 100644 --- a/src/app/services/processes.service.ts +++ b/src/app/services/processes.service.ts @@ -296,7 +296,7 @@ export class ProcessesService { let options = { headers: this.headers, }; - console.log(options); + return this.http.get(`${geturl}`, options); } diff --git a/src/app/services/publications.service.ts b/src/app/services/publications.service.ts index e381adad9..28f2c573e 100644 --- a/src/app/services/publications.service.ts +++ b/src/app/services/publications.service.ts @@ -71,7 +71,7 @@ export class PublicationsService { }; return this.http.put(`${geturl}`, body, options).toPromise().then(res =>{ - console.log(res); + }); } @@ -157,7 +157,7 @@ GetPublicationByIdNext( publicationId:any){ return true }else{ const navigation = this.router.getCurrentNavigation() - console.log('nav:', navigation) + if(navigation){ geturl = navigation.extractedUrl.toString() diff --git a/src/app/services/route.service.ts b/src/app/services/route.service.ts index ac5b250b4..7b4a2e24b 100644 --- a/src/app/services/route.service.ts +++ b/src/app/services/route.service.ts @@ -39,7 +39,7 @@ export class RouteService { * @param url [string] incase no history to go back */ goBack(url = null) { if(this.history.length >= 2) { - console.log(this.history); + this.history.pop(); const url = this.history.pop(); @@ -83,7 +83,7 @@ export class RouteService { params[key] = value } - console.log('params', params) + return params } diff --git a/src/app/services/search.service.ts b/src/app/services/search.service.ts index 9901ca7e8..5438e8ede 100644 --- a/src/app/services/search.service.ts +++ b/src/app/services/search.service.ts @@ -33,7 +33,7 @@ export class SearchService { // store params let params = new HttpParams(); // set https params - console.log(subject); + params = params.set("assunto", subject); params = params.set("data", date); @@ -78,7 +78,7 @@ export class SearchService { // store params let params = new HttpParams(); // set https params - console.log(subject); + params = params.set("assunto", subject); params = params.set("data", date); diff --git a/src/app/services/sqlite.service.ts b/src/app/services/sqlite.service.ts index 1cf19d6e6..4078ef618 100644 --- a/src/app/services/sqlite.service.ts +++ b/src/app/services/sqlite.service.ts @@ -32,18 +32,18 @@ export class SqliteService { } databaseConn() { - console.log('SQLDBConnect') + if (this.platform.is('desktop') || this.platform.is('mobileweb')) { } else { - console.log('SQLDBConnect22') + this.platform.ready().then(async () => { - console.log('SQLDBConnect33') + this.sqlite.create({ name: this.db_name, location: 'default' }).then(async (sqLite: SQLiteObject) => { this.dbInstance = sqLite; - console.log('SQLITE INSTACE ',this.dbInstance); + await sqLite.executeSql(` CREATE TABLE IF NOT EXISTS ${this.events} ( EventId varchar(255) PRIMARY KEY, @@ -70,9 +70,9 @@ export class SqliteService { HumanDate varchar(255) )`, []) .then((res) => { - console.log("Sucess Events Table created: ", res) + }) - .catch((error) => console.log(JSON.stringify(error))); + .catch((error) => console.error(error)); await sqLite.executeSql(` CREATE TABLE IF NOT EXISTS ${this.expedientes} ( @@ -92,9 +92,9 @@ export class SqliteService { workflowName varchar(255) )`, []) .then((res) => { - console.log("Sucess Espedientes Table created: ", res) + }) - .catch((error) => console.log(JSON.stringify(error))); + .catch((error) => console.error(error)); await sqLite.executeSql(` CREATE TABLE IF NOT EXISTS ${this.allprocess} ( @@ -115,9 +115,9 @@ export class SqliteService { interveners Text )`, []) .then((res) => { - console.log("Sucess AllProcess Table created: ", res) + }) - .catch((error) => console.log(JSON.stringify(error))); + .catch((error) => console.error(error)); await sqLite.executeSql(` CREATE TABLE IF NOT EXISTS ${this.actions} ( @@ -131,9 +131,9 @@ export class SqliteService { publicationsDetails Text )`, []) .then((res) => { - console.log("Sucess action Table created: ", res) + }) - .catch((error) => console.log(JSON.stringify(error))); + .catch((error) => console.error(error)); await sqLite.executeSql(` CREATE TABLE IF NOT EXISTS ${this.chatlistroom} ( @@ -146,9 +146,8 @@ export class SqliteService { name varchar(255) )`, []) .then((res) => { - console.log("Sucess chat list room Table created: ", res) }) - .catch((error) => console.log(JSON.stringify(error))); + .catch((error) => console.error(error)); await sqLite.executeSql(` CREATE TABLE IF NOT EXISTS ${this.chatlistUsers} ( @@ -158,9 +157,8 @@ export class SqliteService { )`, []) .then((res) => { - console.log("Sucess chat list users Table created: ", res) }) - .catch((error) => console.log(JSON.stringify(error))); + .catch((error) => console.error(error)); await sqLite.executeSql(` CREATE TABLE IF NOT EXISTS ${this.chatmsg} ( @@ -177,32 +175,31 @@ export class SqliteService { image_url Text )`, []) .then((res) => { - console.log("Sucess chat msg Table created: ", res) }) - .catch((error) => console.log(JSON.stringify(error))); + .catch((error) => console.error(error)); }) - .catch((error) => console.log(JSON.stringify(error))); + .catch((error) => console.error(error)); }).catch((error) => { - console.log('Platform ready error', error) + console.error( error) }); } } //addactions public addactions(data) { - console.log('Action insert', data) + this.dbInstance.executeSql(` INSERT OR IGNORE INTO ${this.actions} (ActionType,DateBegin,DateEnd,Description,Detail,ProcessId,publications,publicationsDetails) VALUES ('${data.ActionType}','${data.DateBegin}', '${data.DateEnd}','${data.Description}','${data.Detail}','${data.ProcessId}','${data.publications}','${data.publicationsDetails}')`, []) .then(() => { - console.log("action add with Success"); + }, (e) => { - console.log(JSON.stringify(e.err)); + }); } @@ -213,10 +210,10 @@ export class SqliteService { VALUES ('${data.EventId}','${data.Subject}','${data.HasAttachments}','${data.Location}','${data.CalendarId}','${data.CalendarName}','${data.StartDate}','${data.EndDate}','${data.EventType}','${data.Attendees}','${data.IsMeeting}','${data.IsRecurring}', '${data.IsAllDayEvent}','${data.AppointmentState}','${data.TimeZone}','${data.Organizer}','${data.Category}','${data.EventRecurrence}','${data.Attachments}','${data.Body}','${data.Profile}','${data.HumanDate}')`, []) .then(() => { - console.log("event add with Success"); + }, (e) => { - console.log(JSON.stringify(e)); + }); } @@ -227,10 +224,10 @@ export class SqliteService { VALUES ('${data.serialNumber}','${data.workflowInstanceFolio}', '${data.Documents}','${data.actions}','${data.activityInstanceName}','${data.formURL}','${data.originator}','${data.taskStartDate}','${data.totalDocuments}','${data.workflowDisplayName}','${data.workflowID}', '${data.workflowInstanceDataFields}','${data.workflowInstanceID}','${data.workflowName}')`, []) .then(() => { - console.log("expediente add with Success"); + }, (e) => { - console.log(JSON.stringify(e.err)); + }); } @@ -241,52 +238,52 @@ export class SqliteService { VALUES ('${data.serialNumber}','${data.workflowInstanceFolio}', '${JSON.stringify(data.Documents)}','${JSON.stringify(data.actions)}','${data.activityInstanceName}','${data.formURL}','${JSON.stringify(data.originator)}','${data.taskStartDate}','${data.totalDocuments}','${data.workflowDisplayName}','${data.workflowID}', '${JSON.stringify(data.workflowInstanceDataFields)}','${data.workflowInstanceID}','${data.workflowName}')`, []) .then(() => { - console.log("process add with Success"); + }, (e) => { - console.log(JSON.stringify(e.err)); + }); } //chatlistroom public addChatListRoom(data) { - console.log('INSIDE DB CHAT LIST ROOM',data,) + this.dbInstance.executeSql(` INSERT OR REPLACE INTO ${this.chatlistroom} (Id,Uids,Usernames,LastMessage,UpdatedAt,customFields,name) VALUES ('${data.id}','${JSON.stringify(data.uids)}','${JSON.stringify(data.usernames)}','${JSON.stringify(data.lastMessage)}','${data.updatedat}','${JSON.stringify(data.customFields)}','${data.name}')`, []) .then(() => { - console.log("chat room add with Success"); + }, (e) => { - console.log(JSON.stringify(e.err)); + }); } //chatlistusers public addChatListUsers(data) { - console.log('INSIDE DB CHAT LIST ROOM',data,) + this.dbInstance.executeSql(` INSERT OR REPLACE INTO ${this.chatlistUsers} (Id,Name,Username) VALUES ('${data.id}','${data.name}','${data.username}')`, []) .then(() => { - console.log("chat users add with Success"); + }, (e) => { - console.log(JSON.stringify(e.err)); + }); } //chatlistusers public addChatMSG(data) { - console.log('INSIDE DB CHAT MSG',data,) + this.dbInstance.executeSql(` INSERT OR IGNORE INTO ${this.chatmsg} (Id,Attachments,Channels,File,Mentions,Msg,Rid, Ts ,U, UpdatedAt) VALUES ('${data._id}','${JSON.stringify(data.attachments)}','${JSON.stringify(data.channels)}','${JSON.stringify(data.file)}','${JSON.stringify(data.mentions)}','${data.msg}','${data.rid}','${data.ts}','${JSON.stringify(data.u)}','${JSON.stringify(data._updatedAt)}')`, []) .then(() => { - console.log("chat msg add with Success"); + }, (e) => { - console.log(JSON.stringify(e.err)); + }); } @@ -297,24 +294,24 @@ export class SqliteService { VALUES ('${data.EventId}','${data.Subject}','${data.HasAttachments}','${data.Location}','${data.CalendarId}','${data.CalendarName}','${data.StartDate}','${data.EndDate}','${data.EventType}','${data.Attendees}','${data.IsMeeting}','${data.IsRecurring}', '${data.IsAllDayEvent}','${data.AppointmentState}','${data.TimeZone}','${data.Organizer}','${data.Category}','${data.EventRecurrence}','${data.Attachments}','${data.Body}','${data.Profile}','${data.HumanDate}')`, []) .then(() => { - console.log("event update with Success"); + }, (e) => { - console.log(JSON.stringify(e)); + }); } //updateActions public updateactions(id, data) { try { - console.log("update action data", data) + this.dbInstance.executeSql(` UPDATE ${this.actions} SET publications = ? WHERE ProcessId = ${id}`, [data]) .then(() => { - console.log("action update with Success"); + }, (e) => { - console.log(JSON.stringify(e.err)); + }); } catch(error) {} @@ -323,14 +320,14 @@ export class SqliteService { //updatePublicationsDetails public updatePublicationsDetails(id, data) { try { - console.log("update action data", data) + this.dbInstance.executeSql(` UPDATE ${this.actions} SET publicationsDetails = ? WHERE ProcessId = ${id}`, [data]) .then(() => { - console.log("action update with Success"); + }, (e) => { - console.log(JSON.stringify(e.err)); + }); } catch(error) {} @@ -341,14 +338,14 @@ export class SqliteService { let jsonId = JSON.stringify(id) let jsondata = JSON.stringify(data) try { - console.log("update action data", data) + this.dbInstance.executeSql(` UPDATE ${this.chatmsg} SET image_url = ? WHERE Id = ${jsonId}`, [jsondata]) .then(() => { - console.log("ChatMsg update with Success"); + }, (e) => { - console.log(JSON.stringify(e.err)); + }); } catch(error) {} @@ -362,10 +359,10 @@ export class SqliteService { VALUES ('${data.serialNumber}','${data.workflowInstanceFolio}', '${JSON.stringify(data.Documents)}','${JSON.stringify(data.actions)}','${data.activityInstanceName}','${data.formURL}','${JSON.stringify(data.originator)}','${data.taskStartDate}','${data.totalDocuments}','${data.workflowDisplayName}','${data.workflowID}', '${JSON.stringify(data.workflowInstanceDataFields)}','${data.workflowInstanceID}','${data.workflowName}')`, []) .then(() => { - console.log("process add with Success"); + }, (e) => { - console.log(JSON.stringify(e.err)); + }); } @@ -373,14 +370,14 @@ export class SqliteService { updateUser(id, document,) { let data = [document]; return this.dbInstance.executeSql(`UPDATE ${this.allprocess} SET Documents = ? WHERE serialNumber = ${id}`, [document]).then(() => { - console.log("process attachment updated") + }) } //updateAttachment updateProcessInterveners(id, interveners,) { let data = [document]; return this.dbInstance.executeSql(`UPDATE ${this.allprocess} SET interveners = ? WHERE serialNumber = ${id}`, [interveners]).then(() => { - console.log("process interveners updated") + }) } //getAllEvents @@ -435,7 +432,7 @@ export class SqliteService { return this.EVENTS; } }, (e) => { - console.log(" Get all events error", JSON.stringify(e)); + }); } @@ -449,7 +446,7 @@ export class SqliteService { return this.EXPEDIENTES; } }, (e) => { - console.log(" Get all expedientes error", JSON.stringify(e)); + }); } @@ -463,7 +460,7 @@ export class SqliteService { return this.ALLPROCESS; } }, (e) => { - console.log(" Get all process error", JSON.stringify(e)); + }); } @@ -478,7 +475,7 @@ export class SqliteService { return this.ALLACTIONS; } }, (e) => { - console.log(" Get all actions error", JSON.stringify(e)); + }); } @@ -493,7 +490,7 @@ export class SqliteService { return this.ALLChatROOM; } }, (e) => { - console.log(" Get all chat room error", JSON.stringify(e)); + }); } @@ -508,7 +505,7 @@ export class SqliteService { return this.ALLChatUSERs; } }, (e) => { - console.log(" Get all chat users error", JSON.stringify(e)); + }); } @@ -523,7 +520,7 @@ export class SqliteService { return this.ALLCHATMSG; } }, (e) => { - console.log(" Get all chat users error", JSON.stringify(e)); + }); } //getlistOfEventAprove @@ -537,7 +534,7 @@ export class SqliteService { return this.ALLPROCESS; } }, (e) => { - console.log(" Get all process error", JSON.stringify(e)); + }); } @@ -552,7 +549,7 @@ export class SqliteService { return this.ALLPROCESS; } }, (e) => { - console.log(" Get all process error", JSON.stringify(e)); + }); } @@ -563,12 +560,12 @@ export class SqliteService { if (res.rows.length > 0) { for (var i = 0; i < res.rows.length; i++) { this.ALLPROCESS.push(res.rows.item(i)); - console.log('getEXPEDIENTE DB LOOP') + } return this.ALLPROCESS; } }, (e) => { - console.log(" Get all process error", JSON.stringify(e)); + }); } @@ -583,7 +580,7 @@ export class SqliteService { return this.ALLPROCESS; } }, (e) => { - console.log(" Get all process error", JSON.stringify(e)); + }); } @@ -597,7 +594,7 @@ export class SqliteService { return this.PROCESS; } }, (e) => { - console.log(" Get process by serial error", JSON.stringify(e)); + }); } @@ -612,7 +609,7 @@ export class SqliteService { return this.ALLACTIONS; } }, (e) => { - console.log(" Get actions by processId error", JSON.stringify(e)); + }); } @@ -690,7 +687,7 @@ export class SqliteService { return this.EVENTS; } }, (e) => { - console.log(" Get events by id error", JSON.stringify(e)); + }); } @@ -700,30 +697,30 @@ export class SqliteService { this.deleteactionsTable(); this.deletepublicationsTable(); - console.log('All tables deleted') + } deleteeventsTable() { return this.dbInstance.executeSql("DELETE from "+ this.events).then((res) => { - console.log('DELETE EVENT TABLE RESULT ', res) + }); } deleteallprocessTable() { return this.dbInstance.executeSql("DELETE from "+ this.allprocess).then((res) => { - console.log('DELETE ALLPROCESS TABLE RESULT ', res) + }); } deleteactionsTable() { return this.dbInstance.executeSql("DELETE from "+ this.actions).then((res) => { - console.log('DELETE actions TABLE RESULT ', res) + }); } deletepublicationsTable() { return this.dbInstance.executeSql("DELETE from "+ this.publications).then((res) => { - console.log('DELETE publications TABLE RESULT ', res) + }); } } diff --git a/src/app/services/theme.service.ts b/src/app/services/theme.service.ts index 5f41e5515..e1687690c 100644 --- a/src/app/services/theme.service.ts +++ b/src/app/services/theme.service.ts @@ -23,7 +23,7 @@ export class ThemeService { document.body.classList.remove("tribunal"); document.body.classList.add(theme); this.currentTheme = theme - console.log('Current theme', theme); + this.storageservice.store('theme',theme); } diff --git a/src/app/services/toast.service.ts b/src/app/services/toast.service.ts index 66bcbd760..523eec5f9 100644 --- a/src/app/services/toast.service.ts +++ b/src/app/services/toast.service.ts @@ -250,7 +250,7 @@ export class ToastService {
`; - // console.log(document.querySelector('body').classList) + // document.body.append(loader) loader.addEventListener('click', ()=>{ diff --git a/src/app/services/webnotifications.service.ts b/src/app/services/webnotifications.service.ts index f67bdcd3e..6aa22b8d0 100644 --- a/src/app/services/webnotifications.service.ts +++ b/src/app/services/webnotifications.service.ts @@ -45,22 +45,22 @@ export class WebNotificationsService { /* MFPPush.registerDevice() .then((res) => { - console.log("WEB Successfully Registered Device..."); + setTimeout(()=>{ MFPPush.registerDevice() .then((res) => { - console.log("WEB Successfully Registered Device..."); + }) .catch((err) => { - console.log("WEB Registration Failed" + err); + }); }, 1000) }) .catch((err) => { - console.log("WEB Registration Failed" + err); + }); */ } @@ -72,32 +72,32 @@ export class WebNotificationsService { /* getAndpostToken(username) { if (this.platform.is('desktop') || this.platform.is('mobileweb')) { - console.log('Notifications not supported') + } else { const geturl = environment.apiURL + 'notifications/token'; */ /* window['WLAuthorizationManager'].obtainAccessToken("push.mobileclient").then( (token) => { - console.log('Push Notification: Success ' + token); + MFPPush.initialize( function (successResponse) { - console.log("Push notification Successfully Service intialized: " + successResponse); + }, function (failureResponse) { - console.log("Push notification failure Service intialized: " + failureResponse); + } ); MFPPush.registerDevice(null, (successResponse) => { - console.log("Successfully registered: " + JSON.stringify(successResponse)); - console.log('token: ', successResponse.deviceId) + + this.storageService.store(username, successResponse.deviceId); this.storageService.get(username).then(value => { - console.log('STORAGE TOKEN', value) + this.storageService.get(AuthConnstants.USER).then(res => { - console.log('USERID', res); + const headers = { 'Authorization': 'Basic cGF1bG8ucGludG9AZ2FiaW5ldGVkaWdpdGFsLmxvY2FsOnRhYnRlc3RlQDAwNg==' }; const body = { UserId: res.UserId, @@ -106,19 +106,19 @@ export class WebNotificationsService { Service: 1 }; this.http.post(`${geturl}`, body, { headers }).subscribe(data => { - console.log('TOKEN USER MIDLE', data); + }) }); }); }, function (failureResponse) { - console.log("Successfully failue: " + JSON.stringify(failureResponse)); + } ); }, (error) => { - console.log('Push notification recived: failure ' + error.responseText); - console.log(JSON.stringify(error)); + + } ); } @@ -128,23 +128,23 @@ export class WebNotificationsService { async onReceviNotification() { window['WLAuthorizationManager'].obtainAccessToken("push.mobileclient").then( (token) => { - console.log('Push Notification: Success ' + token); + MFPPush.initialize( function (successResponse) { - console.log("Push notification Successfully intialized: " + successResponse); + MFPPush.registerNotificationsCallback(notificationReceived); }, function (failureResponse) { - console.log("Push notification failure intialized: " + failureResponse); + } ); var notificationReceived = (message) => { - console.log(message); + var data = JSON.parse(message.payload); - console.log(data.Service); - console.log(data.IdObject); - console.log(data.Object); + + + if(message.actionName){ this.notificatinsRoutes(data); @@ -154,8 +154,8 @@ export class WebNotificationsService { } }, (error) => { - console.log('Push notification recived: failure ' + error.responseText); - console.log(JSON.stringify(error)); + + } ); } */ diff --git a/src/app/services/websocket.service.ts b/src/app/services/websocket.service.ts index 5587005e2..9dd48949d 100644 --- a/src/app/services/websocket.service.ts +++ b/src/app/services/websocket.service.ts @@ -13,13 +13,13 @@ export class WebsocketService { private subject: Rx.Subject; constructor() { - console.log("CHAT WEBSOCKET"); + } public connect(url): Rx.Subject { if (!this.subject) { this.subject = this.create(url); - console.log("Successfully connected: " + url); + } return this.subject; } @@ -27,7 +27,7 @@ export class WebsocketService { private create(url): Rx.Subject { let ws = new WebSocket(url); - console.log(ws); + let observable = Rx.Observable.create((obs: Rx.Observer) => { diff --git a/src/app/shared/agenda/approve-event/approve-event.page.ts b/src/app/shared/agenda/approve-event/approve-event.page.ts index 563fae2d2..826a393c6 100644 --- a/src/app/shared/agenda/approve-event/approve-event.page.ts +++ b/src/app/shared/agenda/approve-event/approve-event.page.ts @@ -85,10 +85,10 @@ export class ApproveEventPage implements OnInit { getTask() { this.processes.GetTask(this.serialNumber).subscribe(res => { - console.log(res); + this.loadedEvent = res; this.today = new Date(res.workflowInstanceDataFields.StartDate); - // console.log(new Date(this.today)); + // this.customDate = this.days[this.today.getDay()]+ ", " + this.today.getDate() +" de " + ( this.months[this.today.getMonth()]); }) @@ -124,7 +124,7 @@ export class ApproveEventPage implements OnInit { async rejectTask(serialNumber:string) { let body = { "serialNumber": serialNumber, "action": "Rejeitar" } - console.log(body); + const loader = this.toastService.loading() @@ -179,7 +179,7 @@ export class ApproveEventPage implements OnInit { } async emendTask(serialNumber:string) { - console.log('Desktop'); + const modal = await this.modalController.create({ component: EmendMessageModalPage, @@ -193,7 +193,7 @@ export class ApproveEventPage implements OnInit { modal.onDidDismiss() .then( async (res) => { - console.log(res.data); + if(res.data !== ''){ let body = { "serialNumber": serialNumber, @@ -202,7 +202,7 @@ export class ApproveEventPage implements OnInit { "ReviewUserComment": res.data, } } - console.log(body); + const loader = this.toastService.loading() try { diff --git a/src/app/shared/agenda/edit-event-to-approve/edit-event-to-approve.page.ts b/src/app/shared/agenda/edit-event-to-approve/edit-event-to-approve.page.ts index bf0cc6f6a..75dc8687e 100644 --- a/src/app/shared/agenda/edit-event-to-approve/edit-event-to-approve.page.ts +++ b/src/app/shared/agenda/edit-event-to-approve/edit-event-to-approve.page.ts @@ -170,14 +170,14 @@ export class EditEventToApprovePage implements OnInit { getRecurrenceTypes() { this.eventsService.getRecurrenceTypes().subscribe(res=>{ - console.log(res); + this.recurringTypes = res; }); } onSelectedRecurringChanged(ev:any){ if(ev.length > 1){ - console.log(ev.filter(data => data != '-1')); + this.eventProcess.workflowInstanceDataFields.OccurrenceType = ev.filter(data => data != '-1'); } if(ev.length == 0){ @@ -405,7 +405,7 @@ export class EditEventToApprovePage implements OnInit { this.loadedAttachments = result - // console.log('this.loadedAttachments', this.loadedAttachments, result) + // } deleteAttachment(attachment: Attachment, index) { @@ -448,7 +448,7 @@ export class EditEventToApprovePage implements OnInit { this.loadedAttachments.push(DocumentToSave) - console.log('push', DocumentToSave) + // await this.attachmentsService.setEventAttachmentById(DocumentToSave).subscribe(()=>{ // this.getAttachments(); diff --git a/src/app/shared/agenda/edit-event/edit-event.page.ts b/src/app/shared/agenda/edit-event/edit-event.page.ts index 6db5a1aa8..40b4083cb 100644 --- a/src/app/shared/agenda/edit-event/edit-event.page.ts +++ b/src/app/shared/agenda/edit-event/edit-event.page.ts @@ -138,7 +138,7 @@ export class EditEventPage implements OnInit { setTimeout(() => { this.postEvent.EventRecurrence.Type = this.postEvent.EventRecurrence.Type.toString(); - console.log( this.postEvent.EventRecurrence.Type); + }, 1000); @@ -159,7 +159,7 @@ export class EditEventPage implements OnInit { getRecurrenceTypes() { this.eventsService.getRecurrenceTypes().subscribe(res=>{ - console.log(res); + this.recurringTypes = res; }); } @@ -205,7 +205,7 @@ export class EditEventPage implements OnInit { openInicio() { let input: any = document.querySelector('#new-inicio') if(input) { - console.log(input) + input.click() } } @@ -225,9 +225,9 @@ export class EditEventPage implements OnInit { } onSelectedRecurringChanged(ev:any){ - console.log(ev); + if(ev.length > 1){ - console.log(ev.filter(data => data != '-1')); + this.postEvent.EventRecurrence.Type = ev.filter(data => data != '-1'); } if(ev.length == 0){ @@ -437,7 +437,7 @@ export class EditEventPage implements OnInit { SerialNumber: '', } - console.log( this.loadedEventAttachments) + this.loadedEventAttachments.push(ApplicationIdDocumentToSave) } diff --git a/src/app/shared/agenda/event-list/event-list.page.ts b/src/app/shared/agenda/event-list/event-list.page.ts index a87f80a27..15e28c427 100644 --- a/src/app/shared/agenda/event-list/event-list.page.ts +++ b/src/app/shared/agenda/event-list/event-list.page.ts @@ -67,7 +67,7 @@ export class EventListPage implements OnInit { async LoadToApproveEvents() { this.showLoader = true; - console.log(this.segment); + if(this.segment == 'MDGPR') { let mdEventsOficial = await this.processes.GetTasksList('Agenda Oficial MDGPR', false).toPromise(); let mdEventsPessoal = await this.processes.GetTasksList('Agenda Pessoal MDGPR', false).toPromise(); @@ -82,7 +82,7 @@ export class EventListPage implements OnInit { let prEventsOficial = await this.processes.GetTasksList('Agenda Oficial PR', false).toPromise(); let prEventsPessoal = await this.processes.GetTasksList('Agenda Pessoal PR', false).toPromise(); let allEvents = prEventsOficial.concat(prEventsPessoal); - console.log(allEvents); + if(allEvents.length > 0){ this.eventsPRList = this.sortService.sortArrayByDate(allEvents).reverse(); } @@ -94,7 +94,7 @@ export class EventListPage implements OnInit { async openApproveModal(eventSerialNumber, data) { let a =this.eventsMDGPRList.filter((elem)=>{ - //console.log(eventSerialNumber," ",elem.serialNumber) + // return eventSerialNumber == elem.serialNumber }); @@ -111,14 +111,14 @@ export class EventListPage implements OnInit { doRefresh(event) { this.LoadToApproveEvents(); - console.log('refresh'); + setTimeout(() => { event.target.complete(); }, 2000); } close() { - console.log('close') + this.cloneAllmobileComponent.emit(); } diff --git a/src/app/shared/agenda/new-event/new-event.page.ts b/src/app/shared/agenda/new-event/new-event.page.ts index 11e0155a4..f1cf48ff8 100644 --- a/src/app/shared/agenda/new-event/new-event.page.ts +++ b/src/app/shared/agenda/new-event/new-event.page.ts @@ -274,7 +274,7 @@ export class NewEventPage implements OnInit { openInicio() { let input: any = document.querySelector('#new-inicio') if(input) { - console.log(input) + input.click() } } @@ -323,15 +323,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.postEvent.EventRecurrence.Type = ev.filter(data => data != '-1'); } if(ev.length == 0){ @@ -347,7 +347,7 @@ export class NewEventPage implements OnInit { this.runValidation() if(this.Form.invalid) { - console.log('not passed') + return false } @@ -364,9 +364,9 @@ export class NewEventPage implements OnInit { if(this.loggeduser.Profile == 'MDGPR') { this.showLoader = true; - console.log(this.postEvent); + let loader = this.toastService.loading(); - console.log(this.postEvent); + this.eventService.postEventMd(this.postEvent, this.postEvent.CalendarName).subscribe( async (id) => { loader.remove() @@ -412,11 +412,11 @@ export class NewEventPage implements OnInit { } else if(this.loggeduser.Profile == 'PR') { - console.log('PR - Aqui'); - console.log(this.postEvent); + + this.eventService.postEventPr(this.postEvent, this.postEvent.CalendarName).subscribe( (id) => { - console.log(id); + const eventId: any = id; @@ -449,7 +449,7 @@ export class NewEventPage implements OnInit { } else { this.eventService.postEventGeneric(this.postEvent, this.postEvent.CalendarName).subscribe( (id) => { - console.log(id); + const eventId: any = id; diff --git a/src/app/shared/agenda/view-event/view-event.page.ts b/src/app/shared/agenda/view-event/view-event.page.ts index 915b678f0..1b20755e1 100644 --- a/src/app/shared/agenda/view-event/view-event.page.ts +++ b/src/app/shared/agenda/view-event/view-event.page.ts @@ -102,7 +102,7 @@ export class ViewEventPage implements OnInit { if(this.sesseionStora.user.Profile == 'MDGPR' || this.sesseionStora.user.Profile == 'PR') { this.eventsService.getEvent(this.eventId).subscribe(res => { - console.log(res); + this.loadedEvent = res; this.today = new Date(res.StartDate); this.customDate = this.days[this.today.getDay()]+ ", " + this.today.getDate() +" de " + ( this.months[this.today.getMonth()]); @@ -237,7 +237,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: '', diff --git a/src/app/shared/chat/edit-group/edit-group.page.ts b/src/app/shared/chat/edit-group/edit-group.page.ts index 0ee77552b..6921d9ba9 100644 --- a/src/app/shared/chat/edit-group/edit-group.page.ts +++ b/src/app/shared/chat/edit-group/edit-group.page.ts @@ -39,7 +39,7 @@ export class EditGroupPage implements OnInit { getRoomInfo(){ this.chatService.getRoomInfo(this.roomId).subscribe(room=>{ this.room = room['room']; - console.log(this.room); + this.groupName = this.room.name.split('-').join(' '); }); } @@ -62,7 +62,7 @@ export class EditGroupPage implements OnInit { }); } else{ - console.log("Invalid name!"); + } this.updateGroup(); } @@ -90,13 +90,13 @@ export class EditGroupPage implements OnInit { text: 'Ok', cssClass: 'btn-cancel', handler:(value:any)=>{ - console.log('button done pressed'); + this.selectedDuration = [ value.days.value, value.hours.value, value.minutes.value, ] - console.log(this.selectedDuration); + if(value.days.value != null && value.hours.value != null && value.minutes.value != null){ if(value.days.value > 0){ if(value.days.value == 1){ diff --git a/src/app/shared/chat/group-messages/group-contacts/group-contacts.page.ts b/src/app/shared/chat/group-messages/group-contacts/group-contacts.page.ts index 20b692480..c3afa32f0 100644 --- a/src/app/shared/chat/group-messages/group-contacts/group-contacts.page.ts +++ b/src/app/shared/chat/group-messages/group-contacts/group-contacts.page.ts @@ -59,38 +59,38 @@ export class GroupContactsPage implements OnInit { ngOnInit() { //this.getRoomInfo(); this.loadUsers(); - console.log(this.roomId); + this.getChatInfo(); - //console.log(this.isGroupCreated); + // } getChatInfo(){ - console.log('HERE'); + this.chatService.getRoomInfo(this.roomId).subscribe(room=>{ - console.log('HERE 2'); - console.log(room['room']); + + this.getGroupContacts(room['room']); }); } deleteMember(data:any){ - console.log(data); + let body = { "roomId": this.roomId, "userId": data._id, } - console.log(body); + this.chatService.getRoomInfo(this.roomId).subscribe(room=>{ if(room['room'].t == "p"){ this.chatService.removeGroupMember(body).subscribe(res=>{ - console.log(res); + this.getMembers(); this.getChatInfo(); }); } else if(room['room'].t == "c"){ this.chatService.removeChannelMember(body).subscribe(res=>{ - console.log(res); + this.getMembers(); this.getChatInfo(); }); @@ -100,7 +100,7 @@ export class GroupContactsPage implements OnInit { getMembers(){ this.chatService.getRoomInfo(this.roomId).subscribe(res=>{ - console.log(res); + let room = res['room']; if(room.t == "p"){ @@ -170,7 +170,7 @@ export class GroupContactsPage implements OnInit { } return 0; }); - console.log(this.users); + this.showLoader = false; }); @@ -200,7 +200,7 @@ export class GroupContactsPage implements OnInit { } return 0; }); - console.log(this.users); + this.showLoader = false; }); @@ -227,11 +227,11 @@ export class GroupContactsPage implements OnInit { async close(){ this.modalController.dismiss(); if(this.isGroupCreated){ - console.log('go to conversa'); + } else{ this.modalController.dismiss(); - console.log('go to new group page'); + const modal = await this.modalController.create({ component: NewGroupPage, componentProps: { @@ -250,7 +250,7 @@ export class GroupContactsPage implements OnInit { } clicked(){ - console.log('clicked'); + } selectedContact(user:any){ @@ -259,29 +259,29 @@ export class GroupContactsPage implements OnInit { } addContacts(roomId:any){ - console.log(roomId); + this.selectedUserList = this.users.filter(function(contact) { return contact.isChecked == true; }); - console.log( this.selectedUserList); + this.selectedUserList.forEach(user=>{ let body ={ "roomId":roomId, "userId":user._id, } this.chatService.addUserToGroup(body).subscribe(res=>{ - console.log(res['success']); + }); }); } /* createGroup(){ - console.log(this.groupName); + if(!this.isGroupCreated){ let body = { "name":this.groupName, } this.chatService.addGroup(body).subscribe(res=>{ - console.log('group created'); - console.log(res['group']); + + this.addContacts(res['group']); this.openGroupMessages(res['group']); diff --git a/src/app/shared/chat/group-messages/group-messages.page.ts b/src/app/shared/chat/group-messages/group-messages.page.ts index e3d8eeae8..b4490d299 100644 --- a/src/app/shared/chat/group-messages/group-messages.page.ts +++ b/src/app/shared/chat/group-messages/group-messages.page.ts @@ -39,7 +39,7 @@ import { SessionStore } from 'src/app/store/session.service'; /* import * as pdfjsLib from 'pdfjs-dist'; if( pdfjsLib !== undefined ){ - console.log( "set worker..."); + pdfjsLib.GlobalWorkerOptions.workerSrc = "https://npmcdn.com/pdfjs-dist@2.4.456/build/pdf.worker.js"; } */ @@ -130,7 +130,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe ) { - console.log('OnCONSTRUCTOR'); + this.loggedUserChat = authService.ValidatedUserChat['data']; this.isGroupCreated = true; this.roomCountDownDate = ""; @@ -138,12 +138,12 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe } ngOnChanges(changes: SimpleChanges): void { - console.log('OnCHANGES'); + this.getRoomInfo(); //this.scrollToBottom(); this.wsChatMethodsService.getGroupRoom(this.roomId).loadHistory({}); - // console.log('MESSAGES'+ this.wsChatMethodsService.getGroupRoom(this.roomId).messages); + // this.wsChatMethodsService.openRoom(this.roomId) this.wsChatMethodsService.getGroupRoom(this.roomId).scrollDown = this.scrollToBottomClicked @@ -185,7 +185,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe status: status, } this.chatService.setUserStatus(body).subscribe(res => { - //console.log(res); + // }) } @@ -220,7 +220,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe }); await modal.present(); modal.onDidDismiss().then((res) => { - console.log(res); + }); } @@ -320,13 +320,13 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe stopRecording() { this.deleteRecording(); this.allowTyping = false; - console.log('Stop'); + if (!this.recording) { return; } this.recording = false; VoiceRecorder.stopRecording().then(async (result: RecordingData) => { - console.log(result); + this.recording = false; if (result.value && result.value.recordDataBase64) { const recordData = result.value.recordDataBase64; @@ -335,7 +335,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe //Save file this.storage.set('fileName', fileName); this.storage.set('recordData', result).then(() => { - console.log('Audio recorded saved'); + }) } }) @@ -360,10 +360,10 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe async getChatMembers() { //return await this.chatService.getMembers(roomId).toPromise(); this.chatService.getAllUsers().subscribe(res => { - //console.log(res); + // this.allUsers = res['users'].filter(data => data.username != this.loggedUserChat.me.username); - //console.log(this.allUsers); + // }); } @@ -390,7 +390,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe get watch() { this.getRoomInfo(); - console.log('here watching'); + return this.roomId; } @@ -414,7 +414,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe //If group is private call getGroupMembers if (room.t === 'p') { this.chatService.getGroupMembers(this.roomId).subscribe(res => { - //console.log(res); + // this.members = res['members']; this.showLoader = false; }); @@ -422,7 +422,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe //Otherwise call getChannelMembers for públic groups else { this.chatService.getChannelMembers(this.roomId).subscribe(res => { - console.log(res); + this.members = res['members']; this.showLoader = false; }); @@ -471,7 +471,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe //Converting base64 to blob const encodedData = btoa(this.audioRecorded); const blob = this.base64toBlob(encodedData, recordData.value.mimeType) - console.log(blob) + const formData = new FormData(); formData.append("blobFile", blob); @@ -535,7 +535,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe }); return await popover.present(); */ - console.log(this.roomId); + const modal = await this.modalController.create({ @@ -550,7 +550,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe }); await modal.present(); modal.onDidDismiss().then(res => { - console.log(res); + if (res.data == 'leave') { this.getRoomInfo(); this.closeAllDesktopComponents.emit(); @@ -562,16 +562,16 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe this.showEmptyContainer.emit(); } else if (res.data == 'cancel') { - console.log('CANCEL'); + } else if (res.data == 'edit') { - console.log(this.roomId); + //this.closeAllDesktopComponents.emit(); this.openEditGroupPage.emit(this.roomId); } else { this.roomName = res.data.name.split('-').join(' '); - console.log(this.roomName); + }; }); @@ -579,11 +579,11 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe openSendGroupMessageOptions(ev?: any) { if (window.innerWidth <= 701) { - console.log('mobile'); + this.openChatOptions(ev); } else { - console.log('desktop'); + this._openChatOptions(); } } @@ -601,7 +601,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe }); await popover.present(); popover.onDidDismiss().then(res => { - console.log(res); + if (res.data) { //this.getRoomInfo(); //this.modalController.dismiss(); @@ -625,7 +625,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe }); } async addContacts() { - console.log(this.members); + const modal = await this.modalController.create({ component: GroupContactsPage, @@ -736,9 +736,9 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe resultType: CameraResultType.Base64, source: CameraSource.Camera }); - console.log('ADDFILECHAT', file) + //const imageData = await this.fileToBase64Service.convert(file) - //console.log('ADDFILECHAT', imageData) + // const response = await fetch('data:image/jpeg;base64,' + file.base64String!); const blob = await response.blob(); @@ -852,9 +852,9 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe resultType: CameraResultType.Base64, source: CameraSource.Photos }); - console.log('ADDFILECHAT', file) + //const imageData = await this.fileToBase64Service.convert(file) - //console.log('ADDFILECHAT', imageData) + // const response = await fetch('data:image/jpeg;base64,' + file.base64String!); const blob = await response.blob(); @@ -884,13 +884,13 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe const roomId = this.roomId const file: any = await this.fileService.getFileFromDevice(types); - console.log('Add file', file) + if (file.type != "application/img" && file.type != "image/png" && file.type != "image/jpeg" && file.type != "image/gif") { const encodedData = btoa(JSON.stringify(await this.getBase64(file))); const blob = this.base64toBlob(encodedData, file.type) - console.log('Add Blob file', blob) + const formData = new FormData(); formData.append("blobFile", blob); @@ -911,7 +911,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe }) } else { - console.log('File type invalid') + } @@ -931,7 +931,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe resolve(reader.result) }; reader.onerror = function (error) { - console.log('Error: ', error); + }; }); @@ -982,7 +982,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe }); await modal.present(); modal.onDidDismiss().then(async (res) => { - console.log(res['data']); + const roomId = this.roomId; if (res['data'] == 'meeting') { @@ -1066,18 +1066,18 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe } else { pathFile = this.file.externalRootDirectory } - console.log(pdfString) - console.log(pathFile) - console.log(contentFile) + + + this.file .writeFile(pathFile, fileName, contentFile, { replace: true }) .then(success => { this.fileOpener .open(pathFile + fileName, type) - .then(() => console.log('File is opened')) - .catch(e => console.log('Error opening file', e)); + .then(() => {}) + .catch(e => console.error(e)) }) - .catch(e => console.log('Error writing file', e)) + .catch(e => console.error(e)) } async openPreview(msg) { @@ -1117,7 +1117,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe } async audioPreview(msg) { - console.log(msg); + if (!msg.attachments[0].title_link || msg.attachments[0].title_link === null || msg.attachments[0].title_link === '') { this.downloadFileMsg(msg) } else { } diff --git a/src/app/shared/chat/messages/contacts/contacts.page.ts b/src/app/shared/chat/messages/contacts/contacts.page.ts index e0e6031f1..7e775e3e3 100644 --- a/src/app/shared/chat/messages/contacts/contacts.page.ts +++ b/src/app/shared/chat/messages/contacts/contacts.page.ts @@ -58,7 +58,7 @@ export class ContactsPage implements OnInit { username: username, } this.chatService.createRoom(body).subscribe(res => { - console.log(res); + this.room = res['room']; this.openMessage.emit(this.room._id); }); @@ -70,7 +70,7 @@ export class ContactsPage implements OnInit { headers: this.headers, }; this.chatService.getAllUsers().subscribe((res:any)=>{ - console.log(res.users); + //this.contacts = res.users.filter(data => data.username != this.sessionStore.user.UserName); this.contacts = res.users.filter(data => data.username != this.sessionStore.user.UserName); this.users = this.contacts.sort((a,b) => { @@ -108,7 +108,7 @@ export class ContactsPage implements OnInit { } clicked(){ - console.log('clicked'); + } createRoom(username:string){ @@ -116,7 +116,7 @@ export class ContactsPage implements OnInit { username: username, } this.chatService.createRoom(body).subscribe(res => { - console.log(res); + this.room = res['room']; this.openMessagesModal(this.room._id); this.WsChatMethodsService.getAllRooms() @@ -125,7 +125,7 @@ export class ContactsPage implements OnInit { async openMessagesModal(roomId: any) { - console.log(roomId); + const modal = await this.modalController.create({ component: MessagesPage, @@ -146,7 +146,7 @@ export class ContactsPage implements OnInit { this.createRoom(username); //Get direct messages (dm) /* this.getDirectMessage(this.room._id); */ - console.log(this.dm); + /* const modal = await this.modalController.create({ diff --git a/src/app/shared/chat/messages/messages.page.ts b/src/app/shared/chat/messages/messages.page.ts index 67ecad47f..800e543d2 100644 --- a/src/app/shared/chat/messages/messages.page.ts +++ b/src/app/shared/chat/messages/messages.page.ts @@ -142,13 +142,13 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy async checkAudioPermission() { const permissionStatus = await navigator.permissions.query({ name: 'microphone' } as any) - console.log('permission', permissionStatus.state); // granted, denied, prompt + this.audioPermissionStatus = permissionStatus.state permissionStatus.onchange = (data : any) => { - // console.log("Permission changed to " + data.state); - // console.log('permission', permissionStatus.state); // granted, denied, prompt + // + // } } @@ -169,11 +169,11 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy gestureName: 'long-press', onStart: ev => { this.longPressActive = true; - console.log('Pressing'); + }, onEnd: ev => { this.longPressActive = false; - console.log('Stop pressing'); + } }); } @@ -310,13 +310,13 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy stopRecording() { this.deleteRecording(); this.allowTyping = false; - console.log('Stop'); + if (!this.recording) { return; } this.recording = false; VoiceRecorder.stopRecording().then(async (result: RecordingData) => { - console.log(result); + this.recording = false; if (result.value && result.value.recordDataBase64) { const recordData = result.value.recordDataBase64; @@ -325,7 +325,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy //Save file this.storage.set('fileName', fileName); this.storage.set('recordData', result).then(() => { - console.log('Audio recorded saved'); + }) } }) @@ -376,7 +376,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy }); await modal.present(); modal.onDidDismiss().then((res) => { - console.log(res); + }); } @@ -401,7 +401,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy //Converting base64 to blob const encodedData = btoa(this.audioRecorded); const blob = this.base64toBlob(encodedData, recordData.value.mimeType) - console.log(blob) + const formData = new FormData(); formData.append("blobFile", blob); @@ -430,7 +430,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy this.openViewDocumentModal(msg.file); } else { - console.log('PDF CLICK', msg) + var str = msg.attachments[0].image_url; str = str.substring(1, ((str.length) - 1)); @@ -442,7 +442,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy this.frameUrl = fullUrl; */ let file = this.base64toBlob(encodedData, 'application/pdf') let fileURL = URL.createObjectURL(file) - console.log('PDF CLICK', fileURL) + window.open(fileURL); // this.chatService.getDocumentDetails(fullUrl); @@ -521,7 +521,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy } getChatMembers() { - // console.log(this.roomId); + // //this.showLoader = true; this.chatService.getMembers(this.roomId).subscribe(res => { @@ -559,11 +559,11 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy openSendMessageOptions(ev?: any) { if (window.innerWidth < 701) { - console.log('mobile'); + this.openChatOptions(ev); } else { - console.log('desktop'); + this._openChatOptions(); } } @@ -639,9 +639,9 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy resultType: CameraResultType.Base64, source: CameraSource.Camera }); - console.log('ADDFILECHAT', file) + //const imageData = await this.fileToBase64Service.convert(file) - //console.log('ADDFILECHAT', imageData) + // const response = await fetch('data:image/jpeg;base64,' + file.base64String!); const blob = await response.blob(); @@ -674,12 +674,12 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy const lastphoto: any = await this.fileService.loadFiles(); const { capturedImage, capturedImageTitle } = await this.fileService.loadFileData(lastphoto); const base64 = await fetch(capturedImage); - console.log('imsge take picture', image) + const blob = await base64.blob(); const formData = new FormData(); formData.append("blobFile", blob); - console.log('formData', formData) + this.wsChatMethodsService.getDmRoom(roomId).send({ file: { @@ -717,7 +717,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy }); await modal.present(); modal.onDidDismiss().then(async res => { - console.log('webTrix ', res.data) + const data = res.data; const roomId = this.roomId @@ -756,9 +756,9 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy resultType: CameraResultType.Base64, source: CameraSource.Photos }); - console.log('ADDFILECHAT', file) + //const imageData = await this.fileToBase64Service.convert(file) - //console.log('ADDFILECHAT', imageData) + // const response = await fetch('data:image/jpeg;base64,' + file.base64String!); const blob = await response.blob(); @@ -792,17 +792,17 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy //if (file.type == "application/pdf") { - console.log('Add file', file) + /* const imageData = await this.fileToBase64Service.convert(file).then((filee) => { - console.log('Add file', filee) + }) */ - console.log('Add file', JSON.stringify(await this.getBase64(file))) + if (file.type != "application/img" && file.type != "image/png" && file.type != "image/jpeg" && file.type != "image/gif") { const encodedData = btoa(JSON.stringify(await this.getBase64(file))); const blob = this.base64toBlob(encodedData, file.type) - console.log('Add Blob file', blob) + const formData = new FormData(); formData.append("blobFile", blob); @@ -823,7 +823,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy }) } else { - console.log('File type invalid') + } @@ -843,7 +843,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy resolve(reader.result) }; reader.onerror = function (error) { - console.log('Error: ', error); + }; }); @@ -902,7 +902,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy }); await modal.present(); modal.onDidDismiss().then(async (res) => { - console.log(res['data']); + if (res['data'] == 'meeting') { @@ -953,7 +953,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy } async audioPreview(msg) { - console.log(msg); + if (!msg.attachments[0].title_link || msg.attachments[0].title_link === null || msg.attachments[0].title_link === '') { this.downloadFileMsg(msg) } else { } @@ -993,7 +993,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy } viewDocument(file: any, url?: string) { - console.log() + if (file.type == "application/webtrix") { this.openViewDocumentModal(file); } @@ -1013,22 +1013,22 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy } else { pathFile = this.file.externalRootDirectory } - console.log(pdfString) - console.log(pathFile) - console.log(contentFile) + + + this.file .writeFile(pathFile, fileName, contentFile, { replace: true }) .then(success => { this.fileOpener .open(pathFile + fileName, type) - .then(() => console.log('File is opened')) - .catch(e => console.log('Error opening file', e)); + .then(() => {}) + .catch(e => console.error(e)) }) - .catch(e => console.log('Error writing file', e)) + .catch(e => console.error(e)) } async openPreview(msg) { - console.log(msg); + if(msg.file.type === "application/webtrix") { this.viewDocument(msg.file, msg.attachments.image_url) @@ -1041,7 +1041,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy /* } else if (msg.file.type === "application/pdf") { - console.log(str); + const win = window.open("", "_blank"); let html = ''; diff --git a/src/app/shared/chat/new-group/contacts/contacts.page.ts b/src/app/shared/chat/new-group/contacts/contacts.page.ts index 0a7f64a99..a7a24bceb 100644 --- a/src/app/shared/chat/new-group/contacts/contacts.page.ts +++ b/src/app/shared/chat/new-group/contacts/contacts.page.ts @@ -84,8 +84,8 @@ export class ContactsPage implements OnInit { } return 0; }); - console.log(res); - console.log(this.users); + + }); */ this.users = this.contacts.sort((a,b) => { if(a.first < b.first){ @@ -133,7 +133,7 @@ export class ContactsPage implements OnInit { } clicked(){ - console.log('clicked'); + } async groupMessages(){ diff --git a/src/app/shared/chat/new-group/new-group.page.ts b/src/app/shared/chat/new-group/new-group.page.ts index 7f10dd237..a7fd57ca8 100644 --- a/src/app/shared/chat/new-group/new-group.page.ts +++ b/src/app/shared/chat/new-group/new-group.page.ts @@ -62,13 +62,13 @@ export class NewGroupPage implements OnInit{ } }); - console.log(this.task); + } _ionChange(event){ - console.log(event); - console.log(event.detail.checked); + + this.showDuration = event.detail.checked; if(event.detail.checked){ @@ -81,12 +81,12 @@ export class NewGroupPage implements OnInit{ close(){ //this.modalController.dismiss(); - console.log('close'); + this.addGroupMessage.emit(); } async createGroup(){ - console.log('NEW GROUP', this.loggedUserChat) + let name = this.groupName.split(' ').join('-'); //Take out all special characters in string name = name.normalize("NFD").replace(/[\u0300-\u036f]/g, ""); @@ -99,11 +99,11 @@ export class NewGroupPage implements OnInit{ "countDownDate":this.thedate } res = await this.wsChatMethodsService.createPrivateRoom(name, SessionStore.user.UserName, customFields); - console.log(res); + } else{ res = await this.wsChatMethodsService.createPrivateRoom(name, SessionStore.user.UserName, customFields); - console.log(res); + } this.wsChatMethodsService.subscribeToRoomUpdate(res.result.rid, res.result); @@ -115,7 +115,7 @@ export class NewGroupPage implements OnInit{ this.close(); let name = this.groupName.split(' ').join('-'); - console.log(name); + const modal = await this.modalController.create({ component: GroupContactsPage, @@ -153,13 +153,13 @@ export class NewGroupPage implements OnInit{ text: 'Ok', cssClass: 'btn-cancel', handler:(value:any)=>{ - console.log('button done pressed'); - console.log(value); + + let now = new Date(); this.thedate = new Date(now.getFullYear(), now.getMonth(), now.getDate() + value.days.value, now.getHours() + value.hours.value, now.getMinutes() + value.minutes.value, now.getSeconds(), now.getMilliseconds()); /* let timer = setInterval(() =>{ - console.log('Show TIMER'); + let difference = this.thedate.getTime() - new Date().getTime(); this._day = Math.floor(difference/(1000*60*60*24)); let c_day = Math.floor(difference/(1000*60*60*24)); @@ -182,7 +182,7 @@ export class NewGroupPage implements OnInit{ value.hours.value, value.minutes.value, ] - console.log(this.selectedDuration); + if(value.days.value != null && value.hours.value != null && value.minutes.value != null){ if(value.days.value > 0){ if(value.days.value == 1){ diff --git a/src/app/shared/event/attendee-modal/attendee-modal.page.ts b/src/app/shared/event/attendee-modal/attendee-modal.page.ts index 557a097bb..e9aeba0cf 100644 --- a/src/app/shared/event/attendee-modal/attendee-modal.page.ts +++ b/src/app/shared/event/attendee-modal/attendee-modal.page.ts @@ -80,7 +80,6 @@ export class AttendeePage implements OnInit { this.setIntervenientCC.emit(this.LtaskParticipantsCc); } - /* console.log('data', this.LtaskParticipants, this.LtaskParticipantsCc ); */ this.dynamicSetIntervenient.emit({ taskParticipants: this.LtaskParticipants, taskParticipantsCc: this.LtaskParticipantsCc @@ -100,7 +99,7 @@ export class AttendeePage implements OnInit { itm.IsRequired = false; this.LtaskParticipantsCc.push(itm); } else { - // console.log('bug') + // } // run only in gabinete digital diff --git a/src/app/shared/gabinete-digital/all-processes/all-processes.page.ts b/src/app/shared/gabinete-digital/all-processes/all-processes.page.ts index 8734abb6b..ad5ffd20c 100644 --- a/src/app/shared/gabinete-digital/all-processes/all-processes.page.ts +++ b/src/app/shared/gabinete-digital/all-processes/all-processes.page.ts @@ -60,7 +60,7 @@ export class AllProcessesPage implements OnInit { async loadAllProcesses() { let allProcessesList = await this.processesService.GetTasksList("", false).toPromise(); - //console.log(allProcessesList); + // allProcessesList = allProcessesList.filter(element => element.activityInstanceName != 'Conhecimento') @@ -126,7 +126,7 @@ export class AllProcessesPage implements OnInit { if (totalDays == 0) { if (allday) { customDate = this.getCustomDate(start) + ", " + this.getCustomHours(start) + " (todo dia)"; - console.log(customDate); + return customDate; } else { @@ -188,7 +188,7 @@ export class AllProcessesPage implements OnInit { this.router.navigate(['/home/gabinete-digital/event-list/approve-event', serialNumber, 'gabinete-digital']); } else { - console.log('cant find page for this task') + } } diff --git a/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.ts b/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.ts index 5ccaf7d34..640cc2e23 100644 --- a/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.ts +++ b/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.ts @@ -133,7 +133,7 @@ export class EditEventToApproveComponent implements OnInit { async getTask() { const result = await this.processes.GetTask(this.serialNumber).toPromise(); - console.log(result); + this.eventProcess = result this.eventProcess.workflowInstanceDataFields.Category = result.workflowInstanceDataFields.EventType @@ -175,15 +175,15 @@ export class EditEventToApproveComponent implements OnInit { 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){ @@ -216,7 +216,7 @@ export class EditEventToApproveComponent implements OnInit { close() { this.modalController.dismiss(); - console.log('CLOSE'); + } @@ -365,7 +365,7 @@ export class EditEventToApproveComponent implements OnInit { this.loadedAttachments = result - // console.log('this.loadedAttachments', this.loadedAttachments, result) + // } deleteAttachment(attachment: Attachment, index) { @@ -408,7 +408,7 @@ export class EditEventToApproveComponent implements OnInit { this.loadedAttachments.push(DocumentToSave) - console.log('push', DocumentToSave) + // await this.attachmentsService.setEventAttachmentById(DocumentToSave).subscribe(()=>{ // this.getAttachments(); diff --git a/src/app/shared/gabinete-digital/events-to-approve/events-to-approve.page.ts b/src/app/shared/gabinete-digital/events-to-approve/events-to-approve.page.ts index 1396db0bb..bef6c9d0d 100644 --- a/src/app/shared/gabinete-digital/events-to-approve/events-to-approve.page.ts +++ b/src/app/shared/gabinete-digital/events-to-approve/events-to-approve.page.ts @@ -64,17 +64,17 @@ export class EventsToApprovePage implements OnInit { async LoadToApproveEvents() { this.showLoader = true; - console.log(this.segment); + this.getFromDB(); if(this.segment == 'MDGPR'){ let mdEventsOficial = await this.processes.GetTasksList('Agenda Oficial MDGPR', false).toPromise(); let mdEventsPessoal = await this.processes.GetTasksList('Agenda Pessoal MDGPR', false).toPromise(); this.eventsMDGPRList = mdEventsOficial.concat(mdEventsPessoal); this.eventsMDGPRList = this.sortService.sortArrayByDate(this.eventsMDGPRList) - console.log(this.sortService.sortArrayByDate(this.eventsMDGPRList)); + this.storage.set('event-to-aproveMD',this.eventsMDGPRList).then(() => { - console.log(' EVENTMD TO APROVE SAVED') + }) //this.eventaprovacaostore.resetmd(this.sortService.sortDate(this.eventsMDGPRList, 'CreateDate')); @@ -86,7 +86,7 @@ export class EventsToApprovePage implements OnInit { this.eventsPRList = this.sortService.sortArrayByDate(this.eventsPRList) this.storage.set('event-to-aprovePR',this.eventsPRList).then(() => { - console.log(' EVENTPR TO APROVE SAVED') + }) //this.eventaprovacaostore.resetpr(this.sortService.sortDate(this.eventsPRList, 'CreateDate')); } @@ -140,14 +140,14 @@ export class EventsToApprovePage implements OnInit { }); await modal.present(); modal.onDidDismiss().then((res) => { - console.log(res['data']); + this.LoadToApproveEvents(); }); } */ doRefresh() { - console.log('Refresh Events'); + setTimeout(()=>{ this.LoadToApproveEvents(); }, 1000) diff --git a/src/app/shared/gabinete-digital/expedientes-pr/expedientes-pr.page.ts b/src/app/shared/gabinete-digital/expedientes-pr/expedientes-pr.page.ts index 11f17114c..a1a615484 100644 --- a/src/app/shared/gabinete-digital/expedientes-pr/expedientes-pr.page.ts +++ b/src/app/shared/gabinete-digital/expedientes-pr/expedientes-pr.page.ts @@ -60,7 +60,7 @@ export class ExpedientesPrPage implements OnInit { } openExpedientDetailPage(data){ - console.log(data); + this.openExpedientDetail.emit(data); } diff --git a/src/app/shared/gabinete-digital/expedients/expedients.page.ts b/src/app/shared/gabinete-digital/expedients/expedients.page.ts index 3f9eb25a7..7f3bda3ef 100644 --- a/src/app/shared/gabinete-digital/expedients/expedients.page.ts +++ b/src/app/shared/gabinete-digital/expedients/expedients.page.ts @@ -81,7 +81,7 @@ export class ExpedientsPage implements OnInit { addProcessTODb(task) { this.storage.set('gabinete-expediente', task).then(() => { - console.log('GABINETE EXPEDIENTE SAVED') + }) } diff --git a/src/app/shared/gabinete-digital/generic/task-list/task-list.page.ts b/src/app/shared/gabinete-digital/generic/task-list/task-list.page.ts index 32d53b3c0..1b967e97c 100644 --- a/src/app/shared/gabinete-digital/generic/task-list/task-list.page.ts +++ b/src/app/shared/gabinete-digital/generic/task-list/task-list.page.ts @@ -17,7 +17,7 @@ export class TaskListPage implements OnInit { constructor( public ThemeService: ThemeService ) { - console.log('taskList', this.taskList) + } ngOnInit() {} diff --git a/src/app/shared/gabinete-digital/pedidos/pedidos.page.ts b/src/app/shared/gabinete-digital/pedidos/pedidos.page.ts index 0d5bdc40f..9e315d0c0 100644 --- a/src/app/shared/gabinete-digital/pedidos/pedidos.page.ts +++ b/src/app/shared/gabinete-digital/pedidos/pedidos.page.ts @@ -144,7 +144,7 @@ export class PedidosPage implements OnInit { }); await modal.present(); modal.onDidDismiss().then((res)=>{ - console.log('refresh list'); + this.LoadList(); }); } diff --git a/src/app/shared/gabinete-digital/pendentes/pendentes.page.ts b/src/app/shared/gabinete-digital/pendentes/pendentes.page.ts index 5841937c1..a56318704 100644 --- a/src/app/shared/gabinete-digital/pendentes/pendentes.page.ts +++ b/src/app/shared/gabinete-digital/pendentes/pendentes.page.ts @@ -70,7 +70,7 @@ export class PendentesPage implements OnInit { this.listToPresent = pendentesList this.pendentesstore.reset(pendentesList); this.storage.set('pendente-list',pendentesList).then(() => { - console.log('Pendente list SAVED') + }) this.skeletonLoader = false; }, (error) => { @@ -95,7 +95,7 @@ getFromDb() { async viewTaskDetails({ SerialNumber, WorkflowName, activityInstanceName }:customTask) { - // console.log(SerialNumber, WorkflowName, activityInstanceName) + // if(WorkflowName == 'Despacho') { this.router.navigate(['/home/gabinete-digital/despachos',SerialNumber,'gabinete-digital']); @@ -119,7 +119,7 @@ getFromDb() { this.router.navigate(['/home/gabinete-digital/despachos',SerialNumber,'gabinete-digital']); } else { - console.log('cant find page for this task', WorkflowName, activityInstanceName) + } } diff --git a/src/app/shared/header/header.page.ts b/src/app/shared/header/header.page.ts index b072d5462..d3c425fd9 100644 --- a/src/app/shared/header/header.page.ts +++ b/src/app/shared/header/header.page.ts @@ -59,8 +59,8 @@ export class HeaderPage implements OnInit { this.eventrigger.getObservable().subscribe(async (data) => { if (data.notification === "delete" || "recive") { await this.notificationLengthData(); - console.log('Current badge: ', this.notificationLength) - console.log('Deleted notification', data.notification) + + } }) */ @@ -86,14 +86,14 @@ export class HeaderPage implements OnInit { async notificationLengthData() { await this.storageservice.get("Notifications").then((value) => { - console.log("Init get store", value) + /* var data = JSON.parse(value); */ this.notificationLength = value.length; - console.log('Timer badge count 1', this.notificationLength) + }) - console.log('Timer badge count2', this.notificationLength) + } hideSearch() { diff --git a/src/app/shared/pin/pin.page.ts b/src/app/shared/pin/pin.page.ts index f6204344d..2ed510946 100644 --- a/src/app/shared/pin/pin.page.ts +++ b/src/app/shared/pin/pin.page.ts @@ -35,7 +35,6 @@ export class PinPage implements OnInit { } close() { - /* console.log(this.isEventEdited); */ this.modalController.dismiss(); } diff --git a/src/app/shared/popover/chat-options-popover/chat-options-popover.page.ts b/src/app/shared/popover/chat-options-popover/chat-options-popover.page.ts index 512e262b9..cd4eee539 100644 --- a/src/app/shared/popover/chat-options-popover/chat-options-popover.page.ts +++ b/src/app/shared/popover/chat-options-popover/chat-options-popover.page.ts @@ -40,7 +40,7 @@ export class ChatOptionsPopoverPage implements OnInit { } ngOnInit() { - console.log(this.attendees); + } @@ -90,7 +90,7 @@ export class ChatOptionsPopoverPage implements OnInit { } attachDocument(){ - console.log('Anexar Documento'); + } @@ -110,14 +110,14 @@ export class ChatOptionsPopoverPage implements OnInit { if(res){ const data = res.data; this.documents.push(data.selected); - console.log(res.data); + } }); } async bookMeeting() { - console.log(this.attendees); + this.popoverController.dismiss(); if( window.innerWidth <= 1024){ const modal = await this.modalController.create({ diff --git a/src/app/shared/popover/chat-popover/chat-popover.page.ts b/src/app/shared/popover/chat-popover/chat-popover.page.ts index 026cb6d3d..b261064d2 100644 --- a/src/app/shared/popover/chat-popover/chat-popover.page.ts +++ b/src/app/shared/popover/chat-popover/chat-popover.page.ts @@ -31,7 +31,7 @@ export class ChatPopoverPage implements OnInit { } ngOnInit() { - console.log(this.roomId); + } close(action:any){ @@ -79,7 +79,7 @@ export class ChatPopoverPage implements OnInit { let res:any = await this.wsChatMethodsService.leaveRoom(this.roomId); - console.log(res.error.error); + if(res.error){ if(res.error.error = "error-you-are-last-owner"){ @@ -107,7 +107,7 @@ export class ChatPopoverPage implements OnInit { if(this.room.t === 'p'){ this.chatService.leaveGroup(body).subscribe(res=>{ - console.log(res); + this.close('leave'); }, (e)=>{ @@ -130,7 +130,7 @@ export class ChatPopoverPage implements OnInit { } else{ this.chatService.leaveChannel(body).subscribe(res=>{ - console.log(res); + this.close('leave'); }, (e)=>{ @@ -158,12 +158,12 @@ export class ChatPopoverPage implements OnInit { if(this.room.t === 'p'){ this.chatService.deleteGroup(body).subscribe(res=>{ - console.log(res); + }); } else{ this.chatService.deleteChannel(body).subscribe(res=>{ - console.log(res); + }); } }); diff --git a/src/app/shared/popover/deploma-options/deploma-options.page.ts b/src/app/shared/popover/deploma-options/deploma-options.page.ts index f15cf74ba..26c4cd172 100644 --- a/src/app/shared/popover/deploma-options/deploma-options.page.ts +++ b/src/app/shared/popover/deploma-options/deploma-options.page.ts @@ -40,7 +40,7 @@ export class DeplomaOptionsPage implements OnInit { } ngOnInit() { - console.log(this.serialNumber); + } async openAddNoteModal(actionName:string) { diff --git a/src/app/shared/popover/despachos-options/despachos-options.page.ts b/src/app/shared/popover/despachos-options/despachos-options.page.ts index 423f88386..aa3baec80 100644 --- a/src/app/shared/popover/despachos-options/despachos-options.page.ts +++ b/src/app/shared/popover/despachos-options/despachos-options.page.ts @@ -76,7 +76,7 @@ export class DespachosOptionsPage implements OnInit { this.popoverController.dismiss(); this.processes.SetTaskToPending(this.task.SerialNumber).subscribe(res=>{ this.toastService._successMessage() - console.log(res); + this.close(); },()=>{ @@ -86,7 +86,7 @@ export class DespachosOptionsPage implements OnInit { async distartExpedientModal(){ this.popoverController.dismiss(); - console.log(this.fulltask); + const modal = await this.modalController.create({ component: DiscartExpedientModalPage, componentProps: { @@ -201,7 +201,7 @@ export class DespachosOptionsPage implements OnInit { await modal.present(); modal.onDidDismiss().then(async (res) => { - console.log(res); + if(res.data) { const DocumentToSave = res.data.documents.map((e) => { diff --git a/src/app/shared/popover/despachos-pr-options/despachos-pr-options.page.ts b/src/app/shared/popover/despachos-pr-options/despachos-pr-options.page.ts index c751e13d8..1e47a2b75 100644 --- a/src/app/shared/popover/despachos-pr-options/despachos-pr-options.page.ts +++ b/src/app/shared/popover/despachos-pr-options/despachos-pr-options.page.ts @@ -45,7 +45,7 @@ export class DespachosPrOptionsPage implements OnInit { this.activatedRoute.queryParams.subscribe(params => { if(params["serialNumber"]) { this.serialNumber = params["serialNumber"]; - console.log(params["serialNumber"]); + } }); @@ -82,9 +82,9 @@ export class DespachosPrOptionsPage implements OnInit { }); await modal.present(); modal.onDidDismiss().then( (res)=> { - console.log(res['data']); + if(res['data']=='openDiscart') { - console.log('open discart'); + this.distartExpedientModal(); @@ -99,7 +99,7 @@ export class DespachosPrOptionsPage implements OnInit { sendExpedienteToPending() { this.processes.SetTaskToPending(this.serialNumber).subscribe(res=>{ - console.log(res); + this.toastService._successMessage() this.popoverController.dismiss('close') },()=>{ @@ -110,7 +110,7 @@ export class DespachosPrOptionsPage implements OnInit { async distartExpedientModal() { this.popoverController.dismiss(); - console.log(this.fulltask); + const modal = await this.modalController.create({ component: DiscartExpedientModalPage, componentProps: { @@ -126,7 +126,7 @@ export class DespachosPrOptionsPage implements OnInit { modal.onDidDismiss().then(res=>{ if(res['data']=='close'){ this.close(); - /* console.log('2Expedient Discard closed2'); + /* this.close(); this.openMenu(); */ } @@ -230,7 +230,7 @@ export class DespachosPrOptionsPage implements OnInit { await modal.present(); modal.onDidDismiss().then(async (res) => { - console.log(res); + if(res.data){ diff --git a/src/app/shared/popover/messages-options/messages-options.page.ts b/src/app/shared/popover/messages-options/messages-options.page.ts index 07e37d951..ba6589fa9 100644 --- a/src/app/shared/popover/messages-options/messages-options.page.ts +++ b/src/app/shared/popover/messages-options/messages-options.page.ts @@ -40,7 +40,7 @@ export class MessagesOptionsPage implements OnInit { closeChatRoom(){ let body = { "roomId": this.roomId } this.chatService.removeChatRoom(body).subscribe(res=>{ - console.log(res); + }); this.close(); } diff --git a/src/app/shared/popover/opts-expediente-pr/opts-expediente-pr.page.ts b/src/app/shared/popover/opts-expediente-pr/opts-expediente-pr.page.ts index fcae6b8da..9e9eaad65 100644 --- a/src/app/shared/popover/opts-expediente-pr/opts-expediente-pr.page.ts +++ b/src/app/shared/popover/opts-expediente-pr/opts-expediente-pr.page.ts @@ -63,7 +63,7 @@ export class OptsExpedientePrPage implements OnInit { } - console.log('OptsExpedientePrPage ---- ', this.task); + } @@ -99,7 +99,7 @@ export class OptsExpedientePrPage implements OnInit { await modal.present(); modal.onDidDismiss().then(async (res) => { - console.log(res); + if(res.data){ const DocumentToSave = res.data.documents.map((e) => { return { @@ -161,7 +161,7 @@ export class OptsExpedientePrPage implements OnInit { await modal.present(); modal.onDidDismiss().then( async (res)=>{ - console.log(res['data']); + if(body == 'descartar') { if(res['data']== 'Yes'){ @@ -207,7 +207,7 @@ export class OptsExpedientePrPage implements OnInit { this.goBack(); } else if(res['data'] == 'No'){ - console.log('Update'); + const loader = this.toastService.loading() try { @@ -253,7 +253,7 @@ export class OptsExpedientePrPage implements OnInit { sendExpedienteToPending(){ this.popoverController.dismiss(); this.processes.SetTaskToPending(this.task.SerialNumber).subscribe(res=>{ - console.log(res); + this.close(); },()=>{ @@ -281,11 +281,11 @@ export class OptsExpedientePrPage implements OnInit { }); await modal.present(); modal.onDidDismiss().then( async (res)=>{ - console.log(res['data']); + let body = res['data']; - // console.log('close '+ res['data']) + // if(res['data']) { - console.log('open discart'); + const loader = this.toastService.loading() @@ -301,7 +301,7 @@ export class OptsExpedientePrPage implements OnInit { } else{ - console.log('Not open'); + } }); @@ -357,7 +357,7 @@ export class OptsExpedientePrPage implements OnInit { if(res){ const data = res.data; this.documents.push(data.selected); - console.log( this.documents); + this.documents.forEach(element =>{ let body = { "Source": "1", diff --git a/src/app/shared/popover/opts-expediente/opts-expediente.page.html b/src/app/shared/popover/opts-expediente/opts-expediente.page.html index 74d594800..b78e83d54 100644 --- a/src/app/shared/popover/opts-expediente/opts-expediente.page.html +++ b/src/app/shared/popover/opts-expediente/opts-expediente.page.html @@ -8,8 +8,8 @@
- - + + diff --git a/src/app/shared/popover/opts-expediente/opts-expediente.page.ts b/src/app/shared/popover/opts-expediente/opts-expediente.page.ts index b855bc1f8..45c33dacd 100644 --- a/src/app/shared/popover/opts-expediente/opts-expediente.page.ts +++ b/src/app/shared/popover/opts-expediente/opts-expediente.page.ts @@ -64,7 +64,7 @@ export class OptsExpedientePage implements OnInit { } async openNewGroupPage(){ - console.log(this.fulltask); + const modal = await this.modalController.create({ component: NewGroupPage, @@ -107,19 +107,19 @@ export class OptsExpedientePage implements OnInit { /* this.activatedRoute.paramMap.subscribe(params => { - console.log('YES'); - console.log(params); + + switch (params["params"].caller) { case 'events': - console.log('here-1'); + this.router.navigate(['/home',params["params"].caller]); break; case 'gabinete-digital': - console.log('here0'); + let navigationExtras: NavigationExtras = { queryParams: { "expedientes": true, @@ -127,7 +127,7 @@ export class OptsExpedientePage implements OnInit { } if( window.innerWidth < 801) { this.router.navigate(['/home/gabinete-digital/expediente']); - console.log('here'); + } else { this.router.navigate(['/home/gabinete-digital'], navigationExtras); @@ -210,7 +210,7 @@ export class OptsExpedientePage implements OnInit { await modal.present(); modal.onDidDismiss().then( async (res) => { - console.log(res); + if(res.data){ const DocumentToSave = res.data.documents.map((e) => { return { @@ -281,7 +281,7 @@ export class OptsExpedientePage implements OnInit { "AttachmentList" :documents, } - console.log(body); + const loader = this.toastService.loading() @@ -319,7 +319,7 @@ export class OptsExpedientePage implements OnInit { async openExpedientActionsModal(taskAction: any, task: any) { - console.log(taskAction, task) + this.close(); let classs; @@ -338,7 +338,7 @@ export class OptsExpedientePage implements OnInit { }); await modal.present(); modal.onDidDismiss().then(async res=>{ - console.log(res['data']); + let body = res['data']; if(res['data']){ const loader = this.toastService.loading() @@ -352,7 +352,7 @@ export class OptsExpedientePage implements OnInit { } } else{ - console.log('Not open'); + } }); } @@ -369,7 +369,7 @@ export class OptsExpedientePage implements OnInit { await modal.present(); modal.onDidDismiss().then( async (res) => { - console.log(res['data']); + if(body == 'descartar') { if(res['data']== 'Yes') { @@ -408,7 +408,7 @@ export class OptsExpedientePage implements OnInit { this.goBack(); } else if(res['data'] == 'No'){ - console.log('Update'); + const loader = this.toastService.loading() try { diff --git a/src/app/shared/popover/request-options/request-options.page.ts b/src/app/shared/popover/request-options/request-options.page.ts index 4042b3699..f79faa471 100644 --- a/src/app/shared/popover/request-options/request-options.page.ts +++ b/src/app/shared/popover/request-options/request-options.page.ts @@ -46,7 +46,7 @@ export class RequestOptionsPage implements OnInit { this.activatedRoute.queryParams.subscribe(params => { if(params["serialNumber"]) { this.serialNumber = params["serialNumber"]; - // console.log(params["serialNumber"]); + // } }); @@ -63,7 +63,7 @@ export class RequestOptionsPage implements OnInit { } ngOnInit() { - console.log(this.task); + this.profile = "mdgpr"; window.onresize = (event) => { @@ -82,7 +82,7 @@ export class RequestOptionsPage implements OnInit { sendExpedienteToPending() { this.processes.SetTaskToPending(this.task.SerialNumber).subscribe(res=>{ - console.log(res); + this.toastService._successMessage() this.close(); },()=>{ @@ -161,9 +161,9 @@ export class RequestOptionsPage implements OnInit { }); await modal.present(); modal.onDidDismiss().then(res=> { - console.log(res['data']); + if(res['data']=='openDiscart') { - console.log('open discart'); + } else { this.popoverController.dismiss('close') diff --git a/src/app/shared/publication/edit-action/edit-action.page.ts b/src/app/shared/publication/edit-action/edit-action.page.ts index d3380bafc..05f6bc4f9 100644 --- a/src/app/shared/publication/edit-action/edit-action.page.ts +++ b/src/app/shared/publication/edit-action/edit-action.page.ts @@ -95,7 +95,7 @@ export class EditActionPage implements OnInit { DateEnd: this.folder.DateEnd, ActionType: this.folder.ActionType, } - console.log(body); + const loader = this.toastService.loading() diff --git a/src/app/shared/publication/new-action/new-action.page.ts b/src/app/shared/publication/new-action/new-action.page.ts index 67a7cc726..6559d6067 100644 --- a/src/app/shared/publication/new-action/new-action.page.ts +++ b/src/app/shared/publication/new-action/new-action.page.ts @@ -64,7 +64,7 @@ export class NewActionPage implements OnInit { } segmentChanged(ev: any) { - console.log(ev.detail.value); + } get dateValid() { @@ -84,7 +84,7 @@ export class NewActionPage implements OnInit { injectValidation() { - console.log(this.dateValid) + this.Form = new FormGroup({ Subject: new FormControl(this.folder.Description, [ @@ -106,10 +106,10 @@ export class NewActionPage implements OnInit { if(this.Form.invalid) { return false } else { - console.log ('not passded') + } - console.log('pass') + this.folder = { ProcessId: null, @@ -119,7 +119,7 @@ export class NewActionPage implements OnInit { DateEnd: this.folder.DateEnd, ActionType: this.segment, } - console.log(this.folder); + const loader = this.toastService.loading() diff --git a/src/app/shared/publication/new-publication/new-publication.page.ts b/src/app/shared/publication/new-publication/new-publication.page.ts index c5d8537d6..cbdedb65b 100644 --- a/src/app/shared/publication/new-publication/new-publication.page.ts +++ b/src/app/shared/publication/new-publication/new-publication.page.ts @@ -64,11 +64,7 @@ export class NewPublicationPage implements OnInit { getPublicationDetail() { this.showLoader = true; - //console.log(this.publicationId); - /* console.log(this.folderId); */ this.publications.GetPublicationById(this.publicationId).subscribe( res =>{ - //console.log(res); - /* this.publication = res; */ this.publication = { DateIndex: res.DateIndex, DocumentId: res.DocumentId, @@ -96,7 +92,7 @@ export class NewPublicationPage implements OnInit { this.capturedImage = 'data:image/jpeg;base64,' +capturedImage.base64String; this.capturedImageTitle = capturedImage.path; - //console.log(this.capturedImage); + // } async laodPicture() { @@ -153,8 +149,8 @@ export class NewPublicationPage implements OnInit { FileExtension: 'jpeg', } - console.log('Edit change image'); - console.log(this.publication); + + const loader = this.toastService.loading() try { @@ -185,7 +181,7 @@ export class NewPublicationPage implements OnInit { const loader = this.toastService.loading() try { - console.log(this.publication); + await this.publications.UpdatePublication(this.publication.ProcessId, this.publication).toPromise() this.toastService._successMessage() @@ -210,8 +206,8 @@ export class NewPublicationPage implements OnInit { FileExtension: 'jpeg', } - console.log('Edit change image'); - console.log(this.publication); + + const loader = this.toastService.loading() try { @@ -245,7 +241,7 @@ export class NewPublicationPage implements OnInit { const loader = this.toastService.loading() try { - console.log(this.publication); + await this.publications.CreatePublication(this.folderId, this.publication).toPromise() this.toastService._successMessage() diff --git a/src/app/shared/publication/view-publications/publication-detail/publication-detail.page.ts b/src/app/shared/publication/view-publications/publication-detail/publication-detail.page.ts index cdacffb5b..5570b5f44 100644 --- a/src/app/shared/publication/view-publications/publication-detail/publication-detail.page.ts +++ b/src/app/shared/publication/view-publications/publication-detail/publication-detail.page.ts @@ -48,9 +48,6 @@ export class PublicationDetailPage implements OnInit { } ngOnInit() { - console.log(this.folderId); - - /* console.log(this.publication.FileBase64); */ this.getPublicationDetail(); } doRefresh(event) { @@ -63,11 +60,8 @@ export class PublicationDetailPage implements OnInit { getPublicationDetail(){ this.showLoader = true; - console.log(this.publicationId); - /* console.log(this.folderId); */ this.publications.GetPublicationById(this.publicationId).subscribe(res=>{ - console.log(res); - /* this.publication = res; */ + this.publication = { DateIndex: res.DateIndex, DocumentId: res.DocumentId, @@ -104,7 +98,7 @@ export class PublicationDetailPage implements OnInit { } async editPost(publicationType:any) { - console.log(this.publication); + if(window.innerWidth < 701){ const modal = await this.modalController.create({ diff --git a/src/app/shared/publication/view-publications/view-publications.page.ts b/src/app/shared/publication/view-publications/view-publications.page.ts index f124da68c..d475d81dc 100644 --- a/src/app/shared/publication/view-publications/view-publications.page.ts +++ b/src/app/shared/publication/view-publications/view-publications.page.ts @@ -64,7 +64,7 @@ export class ViewPublicationsPage implements OnInit { if(typeof(this.folderId) == 'object') { this.folderId = this.folderId['ProcessId'] } - console.log('change view to ',this.folderId) + //setTimeout(()=>{ this.getPublicationDetail(); @@ -89,7 +89,7 @@ export class ViewPublicationsPage implements OnInit { getPublicationDetail() { this.publications.GetPresidentialAction(this.folderId).subscribe(res=>{ - console.log(res); + this.item = res; }); } @@ -101,32 +101,32 @@ export class ViewPublicationsPage implements OnInit { //this.getFromDB() this.publications.GetPublicationsImages(this.folderId).subscribe(res => { - console.log('publications ids', res) + this.publicationList = new Array(); /* for(let i = 0; i < res.length; i++) { this.publications.GetPublicationById(res[i]).subscribe(ress => { - console.log('publications by ids', ress) + let item: Publication = this.publicationPipe.itemList(ress) - console.log('publications by ids 2', item) + this.publicationList.push(item); }) } */ res.forEach(element => { - console.log('publications elements', element) + this.publications.GetPublicationById(element).subscribe(ress => { - console.log('publications by ids', ress) + let item: Publication = this.publicationPipe.itemList(ress) - console.log('publications by ids 2', item) + this.publicationList.push(item); }) }); - console.log('PUBLICATIONS IMAGEs',this.publicationList) + this.storage.remove('view_publications'); this.storage.set('view_publications', this.publicationList); - console.log('PUBLICATIONS IMAGEs',this.publicationList) + this.getpublication = this.publicationList; this.showLoader = false; diff --git a/src/assets/MFPPushServiceWorker.js b/src/assets/MFPPushServiceWorker.js index 2c67c2807..a3e05af69 100644 --- a/src/assets/MFPPushServiceWorker.js +++ b/src/assets/MFPPushServiceWorker.js @@ -55,9 +55,9 @@ function triggerOpenEvent(strMsg) { } function onPushNotificationReceived(event) { - console.log('Push notification received : ', event); + if (event.data) { - console.log('Event data is : ', event.data.text()); + } event.waitUntil(displayNotification(event).then(() => triggerSeenEvent(event.data.text()))); }; @@ -90,7 +90,7 @@ function send_message_to_all_clients(msg) { self.addEventListener('install', function (event) { self.skipWaiting(); - console.log('Installed Service Worker : ', event); + //event.postMessage("SW Says 'Hello back!'"); }); @@ -100,18 +100,18 @@ self.addEventListener('message', function (event) { }); self.addEventListener('activate', function (event) { - console.log('Activated Service Worker : ', event); + event.waitUntil(self.clients.claim()); }); self.addEventListener('notificationclick', function (event) { - console.log('Notification clicked with tag' + event.notification.tag + " and data " + event.notification.data); + let nidjson = event.notification.data; event.notification.close(); event.waitUntil(triggerOpenEvent(nidjson)); }); self.addEventListener('pushsubscriptionchange', function () { - console.log('Push Subscription change'); + send_message_to_all_clients("updateRegistration:"); }); \ No newline at end of file diff --git a/src/assets/www/pdfjs/build/pdf.js b/src/assets/www/pdfjs/build/pdf.js index 61d23ebc8..dce46f633 100644 --- a/src/assets/www/pdfjs/build/pdf.js +++ b/src/assets/www/pdfjs/build/pdf.js @@ -572,13 +572,13 @@ function getVerbosityLevel() { function info(msg) { if (verbosity >= VerbosityLevel.INFOS) { - console.log("Info: ".concat(msg)); + } } function warn(msg) { if (verbosity >= VerbosityLevel.WARNINGS) { - console.log("Warning: ".concat(msg)); + } } @@ -13658,7 +13658,7 @@ function loadScript(src) { } function deprecated(details) { - console.log('Deprecated API usage: ' + details); + } function releaseImageResources(img) { diff --git a/src/assets/www/pdfjs/build/pdf.worker.js b/src/assets/www/pdfjs/build/pdf.worker.js index 9a8565a23..4055d171d 100644 --- a/src/assets/www/pdfjs/build/pdf.worker.js +++ b/src/assets/www/pdfjs/build/pdf.worker.js @@ -1703,13 +1703,13 @@ function getVerbosityLevel() { function info(msg) { if (verbosity >= VerbosityLevel.INFOS) { - console.log("Info: ".concat(msg)); + } } function warn(msg) { if (verbosity >= VerbosityLevel.WARNINGS) { - console.log("Warning: ".concat(msg)); + } } diff --git a/src/assets/www/pdfjs/web/viewer.js b/src/assets/www/pdfjs/web/viewer.js index 0d1b3c50a..6a947b02e 100644 --- a/src/assets/www/pdfjs/web/viewer.js +++ b/src/assets/www/pdfjs/web/viewer.js @@ -1452,7 +1452,7 @@ _this5.documentInfo = info; _this5.metadata = metadata; _this5.contentDispositionFilename = contentDispositionFilename; - console.log('PDF ' + pdfDocument.fingerprint + ' [' + info.PDFFormatVersion + ' ' + (info.Producer || '-').trim() + ' / ' + (info.Creator || '-').trim() + ']' + ' (PDF.js: ' + (_pdfjsLib.version || '-') + (_app_options.AppOptions.get('enableWebGL') ? ' [WebGL]' : '') + ')'); + var pdfTitle; if (metadata && metadata.has('dc:title')) { @@ -14756,7 +14756,7 @@ var dict = getL10nDictionary(); if (dict && dict.locales && dict.default_locale) { - console.log('using the embedded JSON directory, early way out'); + gL10nData = dict.locales[lang]; if (!gL10nData) { @@ -14776,7 +14776,7 @@ callback(); } else { - console.log('no resource to load, early way out'); + } gReadyState = 'complete'; @@ -15233,7 +15233,7 @@ return gL10nData[arg]; } - console.log('argument {{' + arg + '}} for #' + key + ' is undefined.'); + return matched_text; }); } diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts index 9780f3517..fbce3d375 100644 --- a/src/environments/environment.prod.ts +++ b/src/environments/environment.prod.ts @@ -1,12 +1,14 @@ export const environment = { - apiURL: 'http://gpr-dev-01.gabinetedigital.local/GabineteDigital.Services/V5/api/', - //apiURL: 'https://equilibrium.dyndns.info/GabineteDigital.Services/V5/api/', + //apiURL: 'https://gabinetedigital.dyndns.info/GabineteDigital.Services/V5/api/', + apiURL: 'https://gdapi-dev.dyndns.info/GabineteDigital.Services/V5/api/', //apiURL: 'http://gpr-dev-01.gabinetedigital.local/GabineteDigital.Services/V5/api/', //apiChatUrl: 'https://gabinetedigitalchat.dyndns.info/api/v1/', //apiWsChatUrl: 'wss://gabinetedigitalchat.dyndns.info/websocket', - apiChatUrl: 'https://www.tabularium.pt/api/v1/', - apiWsChatUrl: 'wss://www.tabularium.pt/websocket', + apiChatUrl: 'https://gdchat-dev.dyndns.info/api/v1/', + apiWsChatUrl: 'wss://gdchat-dev.dyndns.info/websocket', + /* apiChatUrl: 'https://www.tabularium.pt/api/v1/', + apiWsChatUrl: 'wss://www.tabularium.pt/websocket', */ //apiChatUrl: 'https://www.tabularium.pt/api/v1/', production: true, diff --git a/src/environments/environment.ts b/src/environments/environment.ts index ee8e98126..4629781ad 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -22,11 +22,14 @@ export const environment = { production: false, //apiURL: 'https://gabinetedigital.dyndns.info/GabineteDigital.Services/V5/api/', - apiURL: 'http://gpr-dev-01.gabinetedigital.local/GabineteDigital.Services/V5/api/', + //apiURL: 'http://gpr-dev-01.gabinetedigital.local/GabineteDigital.Services/V5/api/', + apiURL: 'https://gdapi-dev.dyndns.info/GabineteDigital.Services/V5/api/', //apiChatUrl: 'https://gabinetedigitalchat.dyndns.info/api/v1/', //apiWsChatUrl: 'wss://gabinetedigitalchat.dyndns.info/websocket', - apiChatUrl: 'https://www.tabularium.pt/api/v1/', - apiWsChatUrl: 'wss://www.tabularium.pt/websocket', + apiChatUrl: 'https://gdchat-dev.dyndns.info/api/v1/', + apiWsChatUrl: 'wss://gdchat-dev.dyndns.info/websocket', + /* apiChatUrl: 'https://www.tabularium.pt/api/v1/', + apiWsChatUrl: 'wss://www.tabularium.pt/websocket', */ domain: 'gabinetedigital.local', //gabinetedigital.local defaultuser: 'paulo.pinto@gabinetedigital.local',//paulo.pinto paulo.pinto@gabinetedigital.local defaultuserpwd: 'tabteste@006', //tabteste@006, diff --git a/src/firebase-messaging-sw.js b/src/firebase-messaging-sw.js index aa3917c40..f2423c01d 100644 --- a/src/firebase-messaging-sw.js +++ b/src/firebase-messaging-sw.js @@ -1,9 +1,7 @@ if ('serviceWorker' in navigator) { navigator.serviceWorker.register('./firebase-messaging-sw.js') .then(function(registration) { - console.log('Registration successful, scope is:', registration.scope); }).catch(function(err) { - console.log('Service worker registration failed, error:', err); }); } // Scripts for firebase and firebase messaging diff --git a/src/plugin/momentG.js b/src/plugin/momentG.js index 8b7ff0970..a8c297fb8 100644 --- a/src/plugin/momentG.js +++ b/src/plugin/momentG.js @@ -29,7 +29,7 @@ class momentG { let toChange = {} - // console.log(date.getDay(), date.getDay(), date.getMonth()) + // var e = { d : (date.getDate()).toString() ,