mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
merge
This commit is contained in:
@@ -142,7 +142,7 @@ export class DespachoService {
|
||||
"AttachmentList" :documents,
|
||||
}
|
||||
}
|
||||
console.log(body);
|
||||
|
||||
|
||||
return this.processes.CompleteTask(body)
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -26,9 +26,6 @@ export class AddNotePage implements OnInit {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
console.log( this.navParams);
|
||||
|
||||
console.log(this.hideThisFeature);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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){
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -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();
|
||||
},
|
||||
|
||||
@@ -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')
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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();
|
||||
},
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -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'){
|
||||
|
||||
@@ -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')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -98,7 +98,7 @@ export class EditEventPage implements OnInit {
|
||||
this.isEventEdited = false;
|
||||
/* this.postEvent.EventRecurrence = { Type:'-1', LastOccurrence:''}; */
|
||||
this.postEvent = this.navParams.get('event');
|
||||
// console.log(this.postEvent);
|
||||
|
||||
|
||||
this.caller = this.navParams.get('caller');
|
||||
this.initCalendarName = this.postEvent.CalendarName;
|
||||
@@ -159,21 +159,21 @@ export class EditEventPage implements OnInit {
|
||||
}
|
||||
|
||||
goBack() {
|
||||
// console.log(this.caller);
|
||||
|
||||
this.router.navigate(['/home',this.caller]);
|
||||
}
|
||||
|
||||
getRecurrenceTypes() {
|
||||
this.eventsService.getRecurrenceTypes().subscribe(res=>{
|
||||
// console.log(res);
|
||||
|
||||
this.recurringTypes = res;
|
||||
});
|
||||
}
|
||||
|
||||
onSelectedRecurringChanged(ev?:any) {
|
||||
// console.log(ev);
|
||||
|
||||
if(ev.length > 1){
|
||||
// console.log(ev.filter(data => data != '-1'));
|
||||
|
||||
this.selectedRecurringType = ev.filter(data => data != '-1');
|
||||
}
|
||||
if(ev.length == 0){
|
||||
@@ -219,7 +219,7 @@ export class EditEventPage implements OnInit {
|
||||
openInicio() {
|
||||
let input: any = document.querySelector('#new-inicio')
|
||||
if(input) {
|
||||
// console.log(input)
|
||||
|
||||
input.click()
|
||||
}
|
||||
}
|
||||
@@ -418,7 +418,7 @@ export class EditEventPage implements OnInit {
|
||||
getAttachments(eventId: string){
|
||||
this.attachmentsService.getAttachmentsById(eventId).subscribe(res=>{
|
||||
this.loadedEventAttachments = res;
|
||||
// console.log('res', res);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@@ -465,7 +465,7 @@ export class EditEventPage implements OnInit {
|
||||
SerialNumber: '',
|
||||
}
|
||||
|
||||
// console.log( this.loadedEventAttachments)
|
||||
|
||||
this.loadedEventAttachments.push(ApplicationIdDocumentToSave)
|
||||
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ export class EventActionsPopoverPage implements OnInit {
|
||||
|
||||
async approveTask() {
|
||||
let body = { "serialNumber": this.serialNumber, "action": "Aprovar" }
|
||||
console.log(body);
|
||||
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
try {
|
||||
@@ -82,7 +82,7 @@ export class EventActionsPopoverPage implements OnInit {
|
||||
|
||||
modal.onDidDismiss()
|
||||
.then( async (res) => {
|
||||
console.log(res.data);
|
||||
|
||||
|
||||
if(res.data !== ''){
|
||||
let body = { "serialNumber": this.serialNumber,
|
||||
@@ -91,7 +91,7 @@ export class EventActionsPopoverPage implements OnInit {
|
||||
"ReviewUserComment": res.data,
|
||||
}
|
||||
}
|
||||
console.log(body);
|
||||
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
@@ -114,7 +114,7 @@ export class EventActionsPopoverPage implements OnInit {
|
||||
|
||||
async rejeitar(){
|
||||
let body = { "serialNumber": this.serialNumber, "action": "Rejeitar" }
|
||||
console.log(body);
|
||||
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
try {
|
||||
|
||||
@@ -124,8 +124,8 @@ export class NewEventPage implements OnInit {
|
||||
|
||||
this.CalendarName = this.loggeduser.Profile;
|
||||
this.selectedRecurringType = "-1";
|
||||
console.log(this.postEvent);
|
||||
console.log(this.selectedSegment);
|
||||
|
||||
|
||||
|
||||
this.getRecurrenceTypes();
|
||||
|
||||
@@ -181,7 +181,7 @@ export class NewEventPage implements OnInit {
|
||||
}
|
||||
};
|
||||
|
||||
console.log(this.postEvent);
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -193,15 +193,15 @@ export class NewEventPage implements OnInit {
|
||||
|
||||
getRecurrenceTypes() {
|
||||
this.eventService.getRecurrenceTypes().subscribe(res=>{
|
||||
console.log(res);
|
||||
|
||||
this.recurringTypes = res;
|
||||
});
|
||||
}
|
||||
|
||||
onSelectedRecurringChanged(ev:any){
|
||||
console.log(ev);
|
||||
|
||||
if(ev.length > 1){
|
||||
console.log(ev.filter(data => data != '-1'));
|
||||
|
||||
this.selectedRecurringType = ev.filter(data => data != '-1');
|
||||
}
|
||||
if(ev.length == 0){
|
||||
@@ -255,7 +255,7 @@ export class NewEventPage implements OnInit {
|
||||
openInicio() {
|
||||
let input: any = document.querySelector('#new-inicio')
|
||||
if(input) {
|
||||
console.log(input)
|
||||
|
||||
input.click()
|
||||
}
|
||||
}
|
||||
@@ -300,16 +300,16 @@ export class NewEventPage implements OnInit {
|
||||
|
||||
|
||||
if(this.loggeduser.Profile == 'MDGPR') {
|
||||
console.log(this.loggeduser.Profile);
|
||||
|
||||
|
||||
console.log(this.postEvent);
|
||||
|
||||
|
||||
eventId = await this.eventService.postEventMd(this.postEvent, this.postEvent.CalendarName).toPromise();
|
||||
console.log(eventId);
|
||||
|
||||
|
||||
}
|
||||
else if(this.loggeduser.Profile == 'PR') {
|
||||
console.log(this.loggeduser.Profile);
|
||||
|
||||
|
||||
eventId = await this.eventService.postEventPr(this.postEvent, this.postEvent.CalendarName).toPromise();
|
||||
} else {
|
||||
@@ -333,7 +333,7 @@ export class NewEventPage implements OnInit {
|
||||
try {
|
||||
await this.attachmentsService.setEventAttachmentById(attachments).toPromise();
|
||||
} catch(error) {
|
||||
console.log('document not save')
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
@@ -100,7 +100,7 @@ export class ViewEventPage implements OnInit {
|
||||
JSON.parse(req).forEach(element => {
|
||||
this.eventsService.editEvent(element, 2, 3).subscribe((res) => {
|
||||
this.storage.remove('eventEdit')
|
||||
console.log('eventEdit synchnize', res)
|
||||
|
||||
})
|
||||
});
|
||||
})
|
||||
@@ -108,7 +108,7 @@ export class ViewEventPage implements OnInit {
|
||||
JSON.parse(req).forEach(element => {
|
||||
this.eventsService.editEvent(element, 2, 3).subscribe((res) => {
|
||||
this.storage.remove('eventDelete')
|
||||
console.log('eventEdit synchnize', res)
|
||||
|
||||
})
|
||||
});
|
||||
})
|
||||
@@ -175,13 +175,13 @@ export class ViewEventPage implements OnInit {
|
||||
this.eventsService.getEvent(this.eventId).subscribe(res => {
|
||||
this.loadedEvent = res;
|
||||
this.addEventToDb(res);
|
||||
console.log('Loaded one event', res)
|
||||
|
||||
/* this.today = new Date(res.StartDate);
|
||||
this.customDate = this.days[this.today.getDay()]+ ", " + this.today.getDate() +" de " + ( this.months[this.today.getMonth()]); */
|
||||
loader.remove()
|
||||
}, (error) => {
|
||||
|
||||
console.log('errorstatus ss',error.status)
|
||||
|
||||
|
||||
if (error.status === 0) {
|
||||
this.getFromDb();
|
||||
@@ -197,19 +197,19 @@ export class ViewEventPage implements OnInit {
|
||||
|
||||
const event = this.CalendarService.eventSource.find((ele) => ele.id == this.eventId)
|
||||
|
||||
// console.log('View event details', event)
|
||||
//
|
||||
|
||||
if(event?.CalendarId) {
|
||||
this.eventsService.genericGetEvent(this.eventId, event.CalendarId).subscribe(res => {
|
||||
this.loadedEvent = res;
|
||||
this.addEventToDb(res);
|
||||
console.log('Loaded one event', res)
|
||||
|
||||
/* this.today = new Date(res.StartDate);
|
||||
this.customDate = this.days[this.today.getDay()]+ ", " + this.today.getDate() +" de " + ( this.months[this.today.getMonth()]); */
|
||||
loader.remove()
|
||||
}, (error) => {
|
||||
|
||||
console.log('errorstatus ss',error.status)
|
||||
|
||||
|
||||
if (error.status === 0) {
|
||||
this.getFromDb();
|
||||
@@ -288,7 +288,7 @@ export class ViewEventPage implements OnInit {
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then((res) => {
|
||||
console.log(res);
|
||||
|
||||
|
||||
if (res) {
|
||||
setTimeout(() => {
|
||||
@@ -315,7 +315,7 @@ export class ViewEventPage implements OnInit {
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then((res) => {
|
||||
console.log(res);
|
||||
|
||||
|
||||
if (res) {
|
||||
setTimeout(() => {
|
||||
@@ -329,7 +329,7 @@ export class ViewEventPage implements OnInit {
|
||||
}
|
||||
|
||||
async editEvent() {
|
||||
console.log(this.loadedEvent);
|
||||
|
||||
|
||||
let classs;
|
||||
if (window.innerWidth <= 800) {
|
||||
@@ -348,7 +348,7 @@ export class ViewEventPage implements OnInit {
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then((res) => {
|
||||
console.log(res);
|
||||
|
||||
|
||||
if (res) {
|
||||
setTimeout(() => {
|
||||
@@ -370,7 +370,7 @@ export class ViewEventPage implements OnInit {
|
||||
const applicationId: any = this.loadedEvent.Attachments[this.dicIndex].ApplicationId
|
||||
const selectedDoc = this.loadedEvent.Attachments[this.dicIndex]
|
||||
|
||||
console.log('selectedDoc', selectedDoc)
|
||||
|
||||
|
||||
this.task = {
|
||||
serialNumber: '',
|
||||
@@ -458,7 +458,7 @@ export class ViewEventPage implements OnInit {
|
||||
addEventToDb(data) {
|
||||
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
||||
this.ionicStorage.set('eventDetails', data).then(() => {
|
||||
console.log('Details event saved')
|
||||
|
||||
})
|
||||
} else {
|
||||
let event = {
|
||||
@@ -496,7 +496,7 @@ export class ViewEventPage implements OnInit {
|
||||
} else {
|
||||
this.sqliteservice.getEventById(this.eventId).then((event) => {
|
||||
let arrayevent = [];
|
||||
console.log('EVENT ATTENDEES',event[0].Attendees)
|
||||
|
||||
let elemet = {
|
||||
Attendees: (typeof JSON.parse(event[0].Attendees) === 'undefined') ? "" : JSON.parse(event[0].Attendees),
|
||||
Body: JSON.parse(event[0].Body) || "",
|
||||
@@ -519,7 +519,7 @@ export class ViewEventPage implements OnInit {
|
||||
}
|
||||
arrayevent.push(elemet);
|
||||
this.loadedEvent = arrayevent[0];
|
||||
console.log("Event ditails local,", elemet)
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
// );
|
||||
|
||||
|
||||
@@ -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){
|
||||
|
||||
@@ -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: {
|
||||
|
||||
@@ -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 { }
|
||||
|
||||
@@ -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({
|
||||
|
||||
@@ -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 { }
|
||||
|
||||
@@ -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(){
|
||||
|
||||
@@ -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){
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -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(); */
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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(); */
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
+5
-5
@@ -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);
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -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')
|
||||
|
||||
})
|
||||
|
||||
+2
-9
@@ -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 {
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -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: {
|
||||
|
||||
+1
-1
@@ -272,7 +272,7 @@ export class BookMeetingModalPage implements OnInit {
|
||||
}
|
||||
|
||||
|
||||
console.log(this.EventRecurrenceType)
|
||||
|
||||
|
||||
if(this.task.FsId == '8') {
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
+12
-13
@@ -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'); */
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -92,8 +92,8 @@
|
||||
|
||||
<div class="aside-right flex-column height-100 overflow-y-auto">
|
||||
<div class="buttons">
|
||||
<div *ngIf="!p.userPermission([p.permissionList.Gabinete.pr_tasks])" class="option-desc"> <div>Enviar para o PR</div> </div>
|
||||
<button *ngIf="!p.userPermission([p.permissionList.Gabinete.pr_tasks])" (click)="openAddNoteModal('Aprovar')" class="btn-cancel" shape="round" >Avaliação Superior</button>
|
||||
<div *ngIf="!p.userPermission([p.permissionList.Gabinete.pr_tasks])" class="option-desc"> <div *ngIf="loggeduser.Profile == 'MDGPR'">Enviar para o PR</div> </div>
|
||||
<button *ngIf="!p.userPermission([p.permissionList.Gabinete.pr_tasks]) && loggeduser.Profile == 'MDGPR'" (click)="openAddNoteModal('Aprovar')" class="btn-cancel" shape="round" >Avaliação Superior</button>
|
||||
<div *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" class="option-desc"> <div>Solicitar revisão</div> </div>
|
||||
<button *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" (click)="openAddNoteModal('Revisão')" class="btn-cancel" shape="round" >Mandar para Revisão</button>
|
||||
<div *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks]) || p.userPermission([p.permissionList.Gabinete.pr_tasks])" class="option-desc"> <div>Outras opções</div> </div>
|
||||
|
||||
+21
-15
@@ -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,
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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');
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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)
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -90,7 +90,7 @@ export class NewActionPage implements OnInit {
|
||||
}
|
||||
|
||||
segmentChanged(ev: any) {
|
||||
console.log(ev.detail.value);
|
||||
|
||||
}
|
||||
|
||||
get dateValid() {
|
||||
|
||||
@@ -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));
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -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:{
|
||||
|
||||
@@ -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)
|
||||
// );
|
||||
|
||||
|
||||
+5
-7
@@ -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:{
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -32,7 +32,6 @@ export class OrganicEntityPage implements OnInit {
|
||||
|
||||
getOrganicEntity(){
|
||||
this.OrganicEntityService.getOrganicEntity().subscribe(res=>{
|
||||
console.log(res)
|
||||
this.organicEntities = res;
|
||||
this.showOrganicEntities = res
|
||||
});
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -49,7 +49,6 @@ export class SenderPage implements OnInit {
|
||||
}
|
||||
|
||||
selectUser(username:string){
|
||||
console.log(username);
|
||||
this.selectedUser = username;
|
||||
this.close(this.selectedUser);
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -51,7 +51,7 @@ export class AlertService {
|
||||
role: 'cancel',
|
||||
cssClass: 'secondary',
|
||||
handler: () => {
|
||||
//console.log('Confirm Cancel');
|
||||
//
|
||||
}
|
||||
}, {
|
||||
text: 'Apagar',
|
||||
|
||||
@@ -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'
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ export class AuthService {
|
||||
|
||||
try {
|
||||
response = await this.http.post<LoginUserRespose>(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
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ export class CameraService {
|
||||
|
||||
return new Promise<Photo>(async (resolve, reject)=>{
|
||||
|
||||
console.log('add camera to picture')
|
||||
|
||||
|
||||
const image = await Camera.getPhoto({
|
||||
quality: 50,
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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')
|
||||
//
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ export class WebsocketService {
|
||||
public connect(url): Rx.Subject<MessageEvent> {
|
||||
if(!this.subject){
|
||||
this.subject = this.create(url);
|
||||
console.log("Sucessful connect :"+url);
|
||||
|
||||
}
|
||||
return this.subject;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
//
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -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<chatHistory>((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}`);
|
||||
|
||||
}
|
||||
|
||||
}}
|
||||
|
||||
@@ -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<any>(`${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<any>(`${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<Event[]>(`${geturl}`, options);
|
||||
}
|
||||
@@ -642,7 +685,7 @@ export class EventsService {
|
||||
|
||||
return this.http.put<Event>(`${puturl}`, event, options).pipe(
|
||||
catchError(err => {
|
||||
console.log('Event edit saved offline')
|
||||
|
||||
this.offlinemanager.storeRequestData('eventEdit', arrayReq);
|
||||
throw new Error(err);
|
||||
})
|
||||
@@ -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<string>(`${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);
|
||||
})
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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))
|
||||
|
||||
|
||||
@@ -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}`);
|
||||
}
|
||||
|
||||
@@ -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 =>{
|
||||
|
||||
@@ -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);
|
||||
//
|
||||
// };
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@@ -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)
|
||||
|
||||
}); */
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,9 +18,9 @@ export class NativeNotificationService {
|
||||
LocalNotifications.requestPermissions()
|
||||
|
||||
LocalNotifications.checkPermissions().then((data)=>{
|
||||
// console.log('success', data)
|
||||
//
|
||||
}).catch((data)=>{
|
||||
// console.log('error', data)
|
||||
//
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ export class NetworkConnectionService {
|
||||
|
||||
constructor(){
|
||||
Network.addListener('networkStatusChange', status => {
|
||||
console.log('Network status changed', status);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
})
|
||||
|
||||
});
|
||||
|
||||
@@ -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<Tokenn>(`${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") {
|
||||
|
||||
@@ -54,7 +54,7 @@ export class ObjectQueryService {
|
||||
}
|
||||
|
||||
print() {
|
||||
console.log(this.data)
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
})
|
||||
});
|
||||
})
|
||||
|
||||
@@ -59,10 +59,10 @@ export class PhotoService {
|
||||
fileFormat: capturedPhoto.format,
|
||||
});
|
||||
|
||||
console.log(capturedPhoto);
|
||||
|
||||
|
||||
console.log(this.photos[0]);
|
||||
|
||||
|
||||
|
||||
} */
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user