Remove relevant console log,

This commit is contained in:
Eudes Inácio
2022-04-28 09:32:27 +01:00
parent 3021e8b0e1
commit 2826cea9df
153 changed files with 1001 additions and 1132 deletions
@@ -85,10 +85,10 @@ export class ApproveEventPage implements OnInit {
getTask() {
this.processes.GetTask(this.serialNumber).subscribe(res => {
console.log(res);
this.loadedEvent = res;
this.today = new Date(res.workflowInstanceDataFields.StartDate);
// console.log(new Date(this.today));
//
this.customDate = this.days[this.today.getDay()]+ ", " + this.today.getDate() +" de " + ( this.months[this.today.getMonth()]);
})
@@ -124,7 +124,7 @@ export class ApproveEventPage implements OnInit {
async rejectTask(serialNumber:string) {
let body = { "serialNumber": serialNumber, "action": "Rejeitar" }
console.log(body);
const loader = this.toastService.loading()
@@ -179,7 +179,7 @@ export class ApproveEventPage implements OnInit {
}
async emendTask(serialNumber:string) {
console.log('Desktop');
const modal = await this.modalController.create({
component: EmendMessageModalPage,
@@ -193,7 +193,7 @@ export class ApproveEventPage implements OnInit {
modal.onDidDismiss()
.then( async (res) => {
console.log(res.data);
if(res.data !== ''){
let body = { "serialNumber": serialNumber,
@@ -202,7 +202,7 @@ export class ApproveEventPage implements OnInit {
"ReviewUserComment": res.data,
}
}
console.log(body);
const loader = this.toastService.loading()
try {
@@ -170,14 +170,14 @@ export class EditEventToApprovePage implements OnInit {
getRecurrenceTypes() {
this.eventsService.getRecurrenceTypes().subscribe(res=>{
console.log(res);
this.recurringTypes = res;
});
}
onSelectedRecurringChanged(ev:any){
if(ev.length > 1){
console.log(ev.filter(data => data != '-1'));
this.eventProcess.workflowInstanceDataFields.OccurrenceType = ev.filter(data => data != '-1');
}
if(ev.length == 0){
@@ -405,7 +405,7 @@ export class EditEventToApprovePage implements OnInit {
this.loadedAttachments = result
// console.log('this.loadedAttachments', this.loadedAttachments, result)
//
}
deleteAttachment(attachment: Attachment, index) {
@@ -448,7 +448,7 @@ export class EditEventToApprovePage implements OnInit {
this.loadedAttachments.push(DocumentToSave)
console.log('push', DocumentToSave)
// await this.attachmentsService.setEventAttachmentById(DocumentToSave).subscribe(()=>{
// this.getAttachments();
@@ -138,7 +138,7 @@ export class EditEventPage implements OnInit {
setTimeout(() => {
this.postEvent.EventRecurrence.Type = this.postEvent.EventRecurrence.Type.toString();
console.log( this.postEvent.EventRecurrence.Type);
}, 1000);
@@ -159,7 +159,7 @@ export class EditEventPage implements OnInit {
getRecurrenceTypes() {
this.eventsService.getRecurrenceTypes().subscribe(res=>{
console.log(res);
this.recurringTypes = res;
});
}
@@ -205,7 +205,7 @@ export class EditEventPage implements OnInit {
openInicio() {
let input: any = document.querySelector('#new-inicio')
if(input) {
console.log(input)
input.click()
}
}
@@ -225,9 +225,9 @@ export class EditEventPage implements OnInit {
}
onSelectedRecurringChanged(ev:any){
console.log(ev);
if(ev.length > 1){
console.log(ev.filter(data => data != '-1'));
this.postEvent.EventRecurrence.Type = ev.filter(data => data != '-1');
}
if(ev.length == 0){
@@ -437,7 +437,7 @@ export class EditEventPage implements OnInit {
SerialNumber: '',
}
console.log( this.loadedEventAttachments)
this.loadedEventAttachments.push(ApplicationIdDocumentToSave)
}
@@ -67,7 +67,7 @@ export class EventListPage implements OnInit {
async LoadToApproveEvents() {
this.showLoader = true;
console.log(this.segment);
if(this.segment == 'MDGPR') {
let mdEventsOficial = await this.processes.GetTasksList('Agenda Oficial MDGPR', false).toPromise();
let mdEventsPessoal = await this.processes.GetTasksList('Agenda Pessoal MDGPR', false).toPromise();
@@ -82,7 +82,7 @@ export class EventListPage implements OnInit {
let prEventsOficial = await this.processes.GetTasksList('Agenda Oficial PR', false).toPromise();
let prEventsPessoal = await this.processes.GetTasksList('Agenda Pessoal PR', false).toPromise();
let allEvents = prEventsOficial.concat(prEventsPessoal);
console.log(allEvents);
if(allEvents.length > 0){
this.eventsPRList = this.sortService.sortArrayByDate(allEvents).reverse();
}
@@ -94,7 +94,7 @@ export class EventListPage implements OnInit {
async openApproveModal(eventSerialNumber, data) {
let a =this.eventsMDGPRList.filter((elem)=>{
//console.log(eventSerialNumber," ",elem.serialNumber)
//
return eventSerialNumber == elem.serialNumber
});
@@ -111,14 +111,14 @@ export class EventListPage implements OnInit {
doRefresh(event) {
this.LoadToApproveEvents();
console.log('refresh');
setTimeout(() => {
event.target.complete();
}, 2000);
}
close() {
console.log('close')
this.cloneAllmobileComponent.emit();
}
@@ -274,7 +274,7 @@ export class NewEventPage implements OnInit {
openInicio() {
let input: any = document.querySelector('#new-inicio')
if(input) {
console.log(input)
input.click()
}
}
@@ -323,15 +323,15 @@ export class NewEventPage implements OnInit {
getRecurrenceTypes() {
this.eventService.getRecurrenceTypes().subscribe(res=>{
console.log(res);
this.recurringTypes = res;
});
}
onSelectedRecurringChanged(ev:any){
console.log(ev);
if(ev.length > 1){
console.log(ev.filter(data => data != '-1'));
this.postEvent.EventRecurrence.Type = ev.filter(data => data != '-1');
}
if(ev.length == 0){
@@ -347,7 +347,7 @@ export class NewEventPage implements OnInit {
this.runValidation()
if(this.Form.invalid) {
console.log('not passed')
return false
}
@@ -364,9 +364,9 @@ export class NewEventPage implements OnInit {
if(this.loggeduser.Profile == 'MDGPR') {
this.showLoader = true;
console.log(this.postEvent);
let loader = this.toastService.loading();
console.log(this.postEvent);
this.eventService.postEventMd(this.postEvent, this.postEvent.CalendarName).subscribe(
async (id) => {
loader.remove()
@@ -412,11 +412,11 @@ export class NewEventPage implements OnInit {
}
else if(this.loggeduser.Profile == 'PR') {
console.log('PR - Aqui');
console.log(this.postEvent);
this.eventService.postEventPr(this.postEvent, this.postEvent.CalendarName).subscribe(
(id) => {
console.log(id);
const eventId: any = id;
@@ -449,7 +449,7 @@ export class NewEventPage implements OnInit {
} else {
this.eventService.postEventGeneric(this.postEvent, this.postEvent.CalendarName).subscribe(
(id) => {
console.log(id);
const eventId: any = id;
@@ -102,7 +102,7 @@ export class ViewEventPage implements OnInit {
if(this.sesseionStora.user.Profile == 'MDGPR' || this.sesseionStora.user.Profile == 'PR') {
this.eventsService.getEvent(this.eventId).subscribe(res => {
console.log(res);
this.loadedEvent = res;
this.today = new Date(res.StartDate);
this.customDate = this.days[this.today.getDay()]+ ", " + this.today.getDate() +" de " + ( this.months[this.today.getMonth()]);
@@ -237,7 +237,7 @@ export class ViewEventPage implements OnInit {
const applicationId: any = this.loadedEvent.Attachments[ this.dicIndex].ApplicationId
const selectedDoc = this.loadedEvent.Attachments[ this.dicIndex]
console.log('selectedDoc', selectedDoc)
this.task = {
serialNumber: '',
@@ -39,7 +39,7 @@ export class EditGroupPage implements OnInit {
getRoomInfo(){
this.chatService.getRoomInfo(this.roomId).subscribe(room=>{
this.room = room['room'];
console.log(this.room);
this.groupName = this.room.name.split('-').join(' ');
});
}
@@ -62,7 +62,7 @@ export class EditGroupPage implements OnInit {
});
}
else{
console.log("Invalid name!");
}
this.updateGroup();
}
@@ -90,13 +90,13 @@ export class EditGroupPage implements OnInit {
text: 'Ok',
cssClass: 'btn-cancel',
handler:(value:any)=>{
console.log('button done pressed');
this.selectedDuration = [
value.days.value,
value.hours.value,
value.minutes.value,
]
console.log(this.selectedDuration);
if(value.days.value != null && value.hours.value != null && value.minutes.value != null){
if(value.days.value > 0){
if(value.days.value == 1){
@@ -59,38 +59,38 @@ export class GroupContactsPage implements OnInit {
ngOnInit() {
//this.getRoomInfo();
this.loadUsers();
console.log(this.roomId);
this.getChatInfo();
//console.log(this.isGroupCreated);
//
}
getChatInfo(){
console.log('HERE');
this.chatService.getRoomInfo(this.roomId).subscribe(room=>{
console.log('HERE 2');
console.log(room['room']);
this.getGroupContacts(room['room']);
});
}
deleteMember(data:any){
console.log(data);
let body = {
"roomId": this.roomId,
"userId": data._id,
}
console.log(body);
this.chatService.getRoomInfo(this.roomId).subscribe(room=>{
if(room['room'].t == "p"){
this.chatService.removeGroupMember(body).subscribe(res=>{
console.log(res);
this.getMembers();
this.getChatInfo();
});
}
else if(room['room'].t == "c"){
this.chatService.removeChannelMember(body).subscribe(res=>{
console.log(res);
this.getMembers();
this.getChatInfo();
});
@@ -100,7 +100,7 @@ export class GroupContactsPage implements OnInit {
getMembers(){
this.chatService.getRoomInfo(this.roomId).subscribe(res=>{
console.log(res);
let room = res['room'];
if(room.t == "p"){
@@ -170,7 +170,7 @@ export class GroupContactsPage implements OnInit {
}
return 0;
});
console.log(this.users);
this.showLoader = false;
});
@@ -200,7 +200,7 @@ export class GroupContactsPage implements OnInit {
}
return 0;
});
console.log(this.users);
this.showLoader = false;
});
@@ -227,11 +227,11 @@ export class GroupContactsPage implements OnInit {
async close(){
this.modalController.dismiss();
if(this.isGroupCreated){
console.log('go to conversa');
}
else{
this.modalController.dismiss();
console.log('go to new group page');
const modal = await this.modalController.create({
component: NewGroupPage,
componentProps: {
@@ -250,7 +250,7 @@ export class GroupContactsPage implements OnInit {
}
clicked(){
console.log('clicked');
}
selectedContact(user:any){
@@ -259,29 +259,29 @@ export class GroupContactsPage implements OnInit {
}
addContacts(roomId:any){
console.log(roomId);
this.selectedUserList = this.users.filter(function(contact) {
return contact.isChecked == true;
});
console.log( this.selectedUserList);
this.selectedUserList.forEach(user=>{
let body ={
"roomId":roomId,
"userId":user._id,
}
this.chatService.addUserToGroup(body).subscribe(res=>{
console.log(res['success']);
});
});
}
/* createGroup(){
console.log(this.groupName);
if(!this.isGroupCreated){
let body = { "name":this.groupName, }
this.chatService.addGroup(body).subscribe(res=>{
console.log('group created');
console.log(res['group']);
this.addContacts(res['group']);
this.openGroupMessages(res['group']);
@@ -39,7 +39,7 @@ import { SessionStore } from 'src/app/store/session.service';
/*
import * as pdfjsLib from 'pdfjs-dist';
if( pdfjsLib !== undefined ){
console.log( "set worker...");
pdfjsLib.GlobalWorkerOptions.workerSrc = "https://npmcdn.com/pdfjs-dist@2.4.456/build/pdf.worker.js";
}
*/
@@ -130,7 +130,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
) {
console.log('OnCONSTRUCTOR');
this.loggedUserChat = authService.ValidatedUserChat['data'];
this.isGroupCreated = true;
this.roomCountDownDate = "";
@@ -138,12 +138,12 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
}
ngOnChanges(changes: SimpleChanges): void {
console.log('OnCHANGES');
this.getRoomInfo();
//this.scrollToBottom();
this.wsChatMethodsService.getGroupRoom(this.roomId).loadHistory({});
// console.log('MESSAGES'+ this.wsChatMethodsService.getGroupRoom(this.roomId).messages);
//
this.wsChatMethodsService.openRoom(this.roomId)
this.wsChatMethodsService.getGroupRoom(this.roomId).scrollDown = this.scrollToBottomClicked
@@ -185,7 +185,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
status: status,
}
this.chatService.setUserStatus(body).subscribe(res => {
//console.log(res);
//
})
}
@@ -220,7 +220,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
});
await modal.present();
modal.onDidDismiss().then((res) => {
console.log(res);
});
}
@@ -320,13 +320,13 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
stopRecording() {
this.deleteRecording();
this.allowTyping = false;
console.log('Stop');
if (!this.recording) {
return;
}
this.recording = false;
VoiceRecorder.stopRecording().then(async (result: RecordingData) => {
console.log(result);
this.recording = false;
if (result.value && result.value.recordDataBase64) {
const recordData = result.value.recordDataBase64;
@@ -335,7 +335,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
//Save file
this.storage.set('fileName', fileName);
this.storage.set('recordData', result).then(() => {
console.log('Audio recorded saved');
})
}
})
@@ -360,10 +360,10 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
async getChatMembers() {
//return await this.chatService.getMembers(roomId).toPromise();
this.chatService.getAllUsers().subscribe(res => {
//console.log(res);
//
this.allUsers = res['users'].filter(data => data.username != this.loggedUserChat.me.username);
//console.log(this.allUsers);
//
});
}
@@ -390,7 +390,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
get watch() {
this.getRoomInfo();
console.log('here watching');
return this.roomId;
}
@@ -414,7 +414,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
//If group is private call getGroupMembers
if (room.t === 'p') {
this.chatService.getGroupMembers(this.roomId).subscribe(res => {
//console.log(res);
//
this.members = res['members'];
this.showLoader = false;
});
@@ -422,7 +422,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
//Otherwise call getChannelMembers for públic groups
else {
this.chatService.getChannelMembers(this.roomId).subscribe(res => {
console.log(res);
this.members = res['members'];
this.showLoader = false;
});
@@ -471,7 +471,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
//Converting base64 to blob
const encodedData = btoa(this.audioRecorded);
const blob = this.base64toBlob(encodedData, recordData.value.mimeType)
console.log(blob)
const formData = new FormData();
formData.append("blobFile", blob);
@@ -535,7 +535,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
});
return await popover.present(); */
console.log(this.roomId);
const modal = await this.modalController.create({
@@ -550,7 +550,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
});
await modal.present();
modal.onDidDismiss().then(res => {
console.log(res);
if (res.data == 'leave') {
this.getRoomInfo();
this.closeAllDesktopComponents.emit();
@@ -562,16 +562,16 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
this.showEmptyContainer.emit();
}
else if (res.data == 'cancel') {
console.log('CANCEL');
}
else if (res.data == 'edit') {
console.log(this.roomId);
//this.closeAllDesktopComponents.emit();
this.openEditGroupPage.emit(this.roomId);
}
else {
this.roomName = res.data.name.split('-').join(' ');
console.log(this.roomName);
};
});
@@ -579,11 +579,11 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
openSendGroupMessageOptions(ev?: any) {
if (window.innerWidth <= 701) {
console.log('mobile');
this.openChatOptions(ev);
}
else {
console.log('desktop');
this._openChatOptions();
}
}
@@ -601,7 +601,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
});
await popover.present();
popover.onDidDismiss().then(res => {
console.log(res);
if (res.data) {
//this.getRoomInfo();
//this.modalController.dismiss();
@@ -625,7 +625,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
});
}
async addContacts() {
console.log(this.members);
const modal = await this.modalController.create({
component: GroupContactsPage,
@@ -736,9 +736,9 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
resultType: CameraResultType.Base64,
source: CameraSource.Camera
});
console.log('ADDFILECHAT', file)
//const imageData = await this.fileToBase64Service.convert(file)
//console.log('ADDFILECHAT', imageData)
//
const response = await fetch('data:image/jpeg;base64,' + file.base64String!);
const blob = await response.blob();
@@ -852,9 +852,9 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
resultType: CameraResultType.Base64,
source: CameraSource.Photos
});
console.log('ADDFILECHAT', file)
//const imageData = await this.fileToBase64Service.convert(file)
//console.log('ADDFILECHAT', imageData)
//
const response = await fetch('data:image/jpeg;base64,' + file.base64String!);
const blob = await response.blob();
@@ -884,13 +884,13 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
const roomId = this.roomId
const file: any = await this.fileService.getFileFromDevice(types);
console.log('Add file', file)
if (file.type != "application/img" && file.type != "image/png" && file.type != "image/jpeg" && file.type != "image/gif") {
const encodedData = btoa(JSON.stringify(await this.getBase64(file)));
const blob = this.base64toBlob(encodedData, file.type)
console.log('Add Blob file', blob)
const formData = new FormData();
formData.append("blobFile", blob);
@@ -911,7 +911,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
})
} else {
console.log('File type invalid')
}
@@ -931,7 +931,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
resolve(reader.result)
};
reader.onerror = function (error) {
console.log('Error: ', error);
};
});
@@ -982,7 +982,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
});
await modal.present();
modal.onDidDismiss().then(async (res) => {
console.log(res['data']);
const roomId = this.roomId;
if (res['data'] == 'meeting') {
@@ -1066,18 +1066,18 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
} else {
pathFile = this.file.externalRootDirectory
}
console.log(pdfString)
console.log(pathFile)
console.log(contentFile)
this.file
.writeFile(pathFile, fileName, contentFile, { replace: true })
.then(success => {
this.fileOpener
.open(pathFile + fileName, type)
.then(() => console.log('File is opened'))
.catch(e => console.log('Error opening file', e));
.then(() => {})
.catch(e => console.error(e))
})
.catch(e => console.log('Error writing file', e))
.catch(e => console.error(e))
}
async openPreview(msg) {
@@ -1117,7 +1117,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
}
async audioPreview(msg) {
console.log(msg);
if (!msg.attachments[0].title_link || msg.attachments[0].title_link === null || msg.attachments[0].title_link === '') {
this.downloadFileMsg(msg)
} else { }
@@ -58,7 +58,7 @@ export class ContactsPage implements OnInit {
username: username,
}
this.chatService.createRoom(body).subscribe(res => {
console.log(res);
this.room = res['room'];
this.openMessage.emit(this.room._id);
});
@@ -70,7 +70,7 @@ export class ContactsPage implements OnInit {
headers: this.headers,
};
this.chatService.getAllUsers().subscribe((res:any)=>{
console.log(res.users);
//this.contacts = res.users.filter(data => data.username != this.sessionStore.user.UserName);
this.contacts = res.users.filter(data => data.username != this.sessionStore.user.UserName);
this.users = this.contacts.sort((a,b) => {
@@ -108,7 +108,7 @@ export class ContactsPage implements OnInit {
}
clicked(){
console.log('clicked');
}
createRoom(username:string){
@@ -116,7 +116,7 @@ export class ContactsPage implements OnInit {
username: username,
}
this.chatService.createRoom(body).subscribe(res => {
console.log(res);
this.room = res['room'];
this.openMessagesModal(this.room._id);
this.WsChatMethodsService.getAllRooms()
@@ -125,7 +125,7 @@ export class ContactsPage implements OnInit {
async openMessagesModal(roomId: any) {
console.log(roomId);
const modal = await this.modalController.create({
component: MessagesPage,
@@ -146,7 +146,7 @@ export class ContactsPage implements OnInit {
this.createRoom(username);
//Get direct messages (dm)
/* this.getDirectMessage(this.room._id); */
console.log(this.dm);
/* const modal = await this.modalController.create({
+39 -39
View File
@@ -142,13 +142,13 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
async checkAudioPermission() {
const permissionStatus = await navigator.permissions.query({ name: 'microphone' } as any)
console.log('permission', permissionStatus.state); // granted, denied, prompt
this.audioPermissionStatus = permissionStatus.state
permissionStatus.onchange = (data : any) => {
// console.log("Permission changed to " + data.state);
// console.log('permission', permissionStatus.state); // granted, denied, prompt
//
//
}
}
@@ -169,11 +169,11 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
gestureName: 'long-press',
onStart: ev => {
this.longPressActive = true;
console.log('Pressing');
},
onEnd: ev => {
this.longPressActive = false;
console.log('Stop pressing');
}
});
}
@@ -310,13 +310,13 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
stopRecording() {
this.deleteRecording();
this.allowTyping = false;
console.log('Stop');
if (!this.recording) {
return;
}
this.recording = false;
VoiceRecorder.stopRecording().then(async (result: RecordingData) => {
console.log(result);
this.recording = false;
if (result.value && result.value.recordDataBase64) {
const recordData = result.value.recordDataBase64;
@@ -325,7 +325,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
//Save file
this.storage.set('fileName', fileName);
this.storage.set('recordData', result).then(() => {
console.log('Audio recorded saved');
})
}
})
@@ -376,7 +376,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
});
await modal.present();
modal.onDidDismiss().then((res) => {
console.log(res);
});
}
@@ -401,7 +401,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
//Converting base64 to blob
const encodedData = btoa(this.audioRecorded);
const blob = this.base64toBlob(encodedData, recordData.value.mimeType)
console.log(blob)
const formData = new FormData();
formData.append("blobFile", blob);
@@ -430,7 +430,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
this.openViewDocumentModal(msg.file);
}
else {
console.log('PDF CLICK', msg)
var str = msg.attachments[0].image_url;
str = str.substring(1, ((str.length) - 1));
@@ -442,7 +442,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
this.frameUrl = fullUrl; */
let file = this.base64toBlob(encodedData, 'application/pdf')
let fileURL = URL.createObjectURL(file)
console.log('PDF CLICK', fileURL)
window.open(fileURL);
// this.chatService.getDocumentDetails(fullUrl);
@@ -521,7 +521,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
}
getChatMembers() {
// console.log(this.roomId);
//
//this.showLoader = true;
this.chatService.getMembers(this.roomId).subscribe(res => {
@@ -559,11 +559,11 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
openSendMessageOptions(ev?: any) {
if (window.innerWidth < 701) {
console.log('mobile');
this.openChatOptions(ev);
}
else {
console.log('desktop');
this._openChatOptions();
}
}
@@ -639,9 +639,9 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
resultType: CameraResultType.Base64,
source: CameraSource.Camera
});
console.log('ADDFILECHAT', file)
//const imageData = await this.fileToBase64Service.convert(file)
//console.log('ADDFILECHAT', imageData)
//
const response = await fetch('data:image/jpeg;base64,' + file.base64String!);
const blob = await response.blob();
@@ -674,12 +674,12 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
const lastphoto: any = await this.fileService.loadFiles();
const { capturedImage, capturedImageTitle } = await this.fileService.loadFileData(lastphoto);
const base64 = await fetch(capturedImage);
console.log('imsge take picture', image)
const blob = await base64.blob();
const formData = new FormData();
formData.append("blobFile", blob);
console.log('formData', formData)
this.wsChatMethodsService.getDmRoom(roomId).send({
file: {
@@ -717,7 +717,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
});
await modal.present();
modal.onDidDismiss().then(async res => {
console.log('webTrix ', res.data)
const data = res.data;
const roomId = this.roomId
@@ -756,9 +756,9 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
resultType: CameraResultType.Base64,
source: CameraSource.Photos
});
console.log('ADDFILECHAT', file)
//const imageData = await this.fileToBase64Service.convert(file)
//console.log('ADDFILECHAT', imageData)
//
const response = await fetch('data:image/jpeg;base64,' + file.base64String!);
const blob = await response.blob();
@@ -792,17 +792,17 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
//if (file.type == "application/pdf") {
console.log('Add file', file)
/* const imageData = await this.fileToBase64Service.convert(file).then((filee) => {
console.log('Add file', filee)
}) */
console.log('Add file', JSON.stringify(await this.getBase64(file)))
if (file.type != "application/img" && file.type != "image/png" && file.type != "image/jpeg" && file.type != "image/gif") {
const encodedData = btoa(JSON.stringify(await this.getBase64(file)));
const blob = this.base64toBlob(encodedData, file.type)
console.log('Add Blob file', blob)
const formData = new FormData();
formData.append("blobFile", blob);
@@ -823,7 +823,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
})
} else {
console.log('File type invalid')
}
@@ -843,7 +843,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
resolve(reader.result)
};
reader.onerror = function (error) {
console.log('Error: ', error);
};
});
@@ -902,7 +902,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
});
await modal.present();
modal.onDidDismiss().then(async (res) => {
console.log(res['data']);
if (res['data'] == 'meeting') {
@@ -953,7 +953,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
}
async audioPreview(msg) {
console.log(msg);
if (!msg.attachments[0].title_link || msg.attachments[0].title_link === null || msg.attachments[0].title_link === '') {
this.downloadFileMsg(msg)
} else { }
@@ -993,7 +993,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
}
viewDocument(file: any, url?: string) {
console.log()
if (file.type == "application/webtrix") {
this.openViewDocumentModal(file);
}
@@ -1013,22 +1013,22 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
} else {
pathFile = this.file.externalRootDirectory
}
console.log(pdfString)
console.log(pathFile)
console.log(contentFile)
this.file
.writeFile(pathFile, fileName, contentFile, { replace: true })
.then(success => {
this.fileOpener
.open(pathFile + fileName, type)
.then(() => console.log('File is opened'))
.catch(e => console.log('Error opening file', e));
.then(() => {})
.catch(e => console.error(e))
})
.catch(e => console.log('Error writing file', e))
.catch(e => console.error(e))
}
async openPreview(msg) {
console.log(msg);
if(msg.file.type === "application/webtrix") {
this.viewDocument(msg.file, msg.attachments.image_url)
@@ -1041,7 +1041,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
/* } else if (msg.file.type === "application/pdf") {
console.log(str);
const win = window.open("", "_blank");
let html = '';
@@ -84,8 +84,8 @@ export class ContactsPage implements OnInit {
}
return 0;
});
console.log(res);
console.log(this.users);
}); */
this.users = this.contacts.sort((a,b) => {
if(a.first < b.first){
@@ -133,7 +133,7 @@ export class ContactsPage implements OnInit {
}
clicked(){
console.log('clicked');
}
async groupMessages(){
+12 -12
View File
@@ -62,13 +62,13 @@ export class NewGroupPage implements OnInit{
}
});
console.log(this.task);
}
_ionChange(event){
console.log(event);
console.log(event.detail.checked);
this.showDuration = event.detail.checked;
if(event.detail.checked){
@@ -81,12 +81,12 @@ export class NewGroupPage implements OnInit{
close(){
//this.modalController.dismiss();
console.log('close');
this.addGroupMessage.emit();
}
async createGroup(){
console.log('NEW GROUP', this.loggedUserChat)
let name = this.groupName.split(' ').join('-');
//Take out all special characters in string
name = name.normalize("NFD").replace(/[\u0300-\u036f]/g, "");
@@ -99,11 +99,11 @@ export class NewGroupPage implements OnInit{
"countDownDate":this.thedate
}
res = await this.wsChatMethodsService.createPrivateRoom(name, SessionStore.user.UserName, customFields);
console.log(res);
}
else{
res = await this.wsChatMethodsService.createPrivateRoom(name, SessionStore.user.UserName, customFields);
console.log(res);
}
this.wsChatMethodsService.subscribeToRoomUpdate(res.result.rid, res.result);
@@ -115,7 +115,7 @@ export class NewGroupPage implements OnInit{
this.close();
let name = this.groupName.split(' ').join('-');
console.log(name);
const modal = await this.modalController.create({
component: GroupContactsPage,
@@ -153,13 +153,13 @@ export class NewGroupPage implements OnInit{
text: 'Ok',
cssClass: 'btn-cancel',
handler:(value:any)=>{
console.log('button done pressed');
console.log(value);
let now = new Date();
this.thedate = new Date(now.getFullYear(), now.getMonth(), now.getDate() + value.days.value, now.getHours() + value.hours.value, now.getMinutes() + value.minutes.value, now.getSeconds(), now.getMilliseconds());
/* let timer = setInterval(() =>{
console.log('Show TIMER');
let difference = this.thedate.getTime() - new Date().getTime();
this._day = Math.floor(difference/(1000*60*60*24));
let c_day = Math.floor(difference/(1000*60*60*24));
@@ -182,7 +182,7 @@ export class NewGroupPage implements OnInit{
value.hours.value,
value.minutes.value,
]
console.log(this.selectedDuration);
if(value.days.value != null && value.hours.value != null && value.minutes.value != null){
if(value.days.value > 0){
if(value.days.value == 1){
@@ -80,7 +80,6 @@ export class AttendeePage implements OnInit {
this.setIntervenientCC.emit(this.LtaskParticipantsCc);
}
/* console.log('data', this.LtaskParticipants, this.LtaskParticipantsCc ); */
this.dynamicSetIntervenient.emit({
taskParticipants: this.LtaskParticipants,
taskParticipantsCc: this.LtaskParticipantsCc
@@ -100,7 +99,7 @@ export class AttendeePage implements OnInit {
itm.IsRequired = false;
this.LtaskParticipantsCc.push(itm);
} else {
// console.log('bug')
//
}
// run only in gabinete digital
@@ -60,7 +60,7 @@ export class AllProcessesPage implements OnInit {
async loadAllProcesses() {
let allProcessesList = await this.processesService.GetTasksList("", false).toPromise();
//console.log(allProcessesList);
//
allProcessesList = allProcessesList.filter(element => element.activityInstanceName != 'Conhecimento')
@@ -126,7 +126,7 @@ export class AllProcessesPage implements OnInit {
if (totalDays == 0) {
if (allday) {
customDate = this.getCustomDate(start) + ", " + this.getCustomHours(start) + " (todo dia)";
console.log(customDate);
return customDate;
}
else {
@@ -188,7 +188,7 @@ export class AllProcessesPage implements OnInit {
this.router.navigate(['/home/gabinete-digital/event-list/approve-event', serialNumber, 'gabinete-digital']);
}
else {
console.log('cant find page for this task')
}
}
@@ -133,7 +133,7 @@ export class EditEventToApproveComponent implements OnInit {
async getTask() {
const result = await this.processes.GetTask(this.serialNumber).toPromise();
console.log(result);
this.eventProcess = result
this.eventProcess.workflowInstanceDataFields.Category = result.workflowInstanceDataFields.EventType
@@ -175,15 +175,15 @@ export class EditEventToApproveComponent implements OnInit {
getRecurrenceTypes() {
this.eventsService.getRecurrenceTypes().subscribe(res=>{
console.log(res);
this.recurringTypes = res;
});
}
onSelectedRecurringChanged(ev:any){
/* console.log(ev);
/*
if(ev.length > 1){
console.log(ev.filter(data => data != '-1'));
this.selectedRecurringType = ev.filter(data => data != '-1');
}
if(ev.length == 0){
@@ -216,7 +216,7 @@ export class EditEventToApproveComponent implements OnInit {
close() {
this.modalController.dismiss();
console.log('CLOSE');
}
@@ -365,7 +365,7 @@ export class EditEventToApproveComponent implements OnInit {
this.loadedAttachments = result
// console.log('this.loadedAttachments', this.loadedAttachments, result)
//
}
deleteAttachment(attachment: Attachment, index) {
@@ -408,7 +408,7 @@ export class EditEventToApproveComponent implements OnInit {
this.loadedAttachments.push(DocumentToSave)
console.log('push', DocumentToSave)
// await this.attachmentsService.setEventAttachmentById(DocumentToSave).subscribe(()=>{
// this.getAttachments();
@@ -64,17 +64,17 @@ export class EventsToApprovePage implements OnInit {
async LoadToApproveEvents() {
this.showLoader = true;
console.log(this.segment);
this.getFromDB();
if(this.segment == 'MDGPR'){
let mdEventsOficial = await this.processes.GetTasksList('Agenda Oficial MDGPR', false).toPromise();
let mdEventsPessoal = await this.processes.GetTasksList('Agenda Pessoal MDGPR', false).toPromise();
this.eventsMDGPRList = mdEventsOficial.concat(mdEventsPessoal);
this.eventsMDGPRList = this.sortService.sortArrayByDate(this.eventsMDGPRList)
console.log(this.sortService.sortArrayByDate(this.eventsMDGPRList));
this.storage.set('event-to-aproveMD',this.eventsMDGPRList).then(() => {
console.log(' EVENTMD TO APROVE SAVED')
})
//this.eventaprovacaostore.resetmd(this.sortService.sortDate(this.eventsMDGPRList, 'CreateDate'));
@@ -86,7 +86,7 @@ export class EventsToApprovePage implements OnInit {
this.eventsPRList = this.sortService.sortArrayByDate(this.eventsPRList)
this.storage.set('event-to-aprovePR',this.eventsPRList).then(() => {
console.log(' EVENTPR TO APROVE SAVED')
})
//this.eventaprovacaostore.resetpr(this.sortService.sortDate(this.eventsPRList, 'CreateDate'));
}
@@ -140,14 +140,14 @@ export class EventsToApprovePage implements OnInit {
});
await modal.present();
modal.onDidDismiss().then((res) => {
console.log(res['data']);
this.LoadToApproveEvents();
});
} */
doRefresh() {
console.log('Refresh Events');
setTimeout(()=>{
this.LoadToApproveEvents();
}, 1000)
@@ -60,7 +60,7 @@ export class ExpedientesPrPage implements OnInit {
}
openExpedientDetailPage(data){
console.log(data);
this.openExpedientDetail.emit(data);
}
@@ -81,7 +81,7 @@ export class ExpedientsPage implements OnInit {
addProcessTODb(task) {
this.storage.set('gabinete-expediente', task).then(() => {
console.log('GABINETE EXPEDIENTE SAVED')
})
}
@@ -17,7 +17,7 @@ export class TaskListPage implements OnInit {
constructor(
public ThemeService: ThemeService
) {
console.log('taskList', this.taskList)
}
ngOnInit() {}
@@ -144,7 +144,7 @@ export class PedidosPage implements OnInit {
});
await modal.present();
modal.onDidDismiss().then((res)=>{
console.log('refresh list');
this.LoadList();
});
}
@@ -70,7 +70,7 @@ export class PendentesPage implements OnInit {
this.listToPresent = pendentesList
this.pendentesstore.reset(pendentesList);
this.storage.set('pendente-list',pendentesList).then(() => {
console.log('Pendente list SAVED')
})
this.skeletonLoader = false;
}, (error) => {
@@ -95,7 +95,7 @@ getFromDb() {
async viewTaskDetails({ SerialNumber, WorkflowName, activityInstanceName }:customTask) {
// console.log(SerialNumber, WorkflowName, activityInstanceName)
//
if(WorkflowName == 'Despacho') {
this.router.navigate(['/home/gabinete-digital/despachos',SerialNumber,'gabinete-digital']);
@@ -119,7 +119,7 @@ getFromDb() {
this.router.navigate(['/home/gabinete-digital/despachos',SerialNumber,'gabinete-digital']);
}
else {
console.log('cant find page for this task', WorkflowName, activityInstanceName)
}
}
+5 -5
View File
@@ -59,8 +59,8 @@ export class HeaderPage implements OnInit {
this.eventrigger.getObservable().subscribe(async (data) => {
if (data.notification === "delete" || "recive") {
await this.notificationLengthData();
console.log('Current badge: ', this.notificationLength)
console.log('Deleted notification', data.notification)
}
}) */
@@ -86,14 +86,14 @@ export class HeaderPage implements OnInit {
async notificationLengthData() {
await this.storageservice.get("Notifications").then((value) => {
console.log("Init get store", value)
/* var data = JSON.parse(value); */
this.notificationLength = value.length;
console.log('Timer badge count 1', this.notificationLength)
})
console.log('Timer badge count2', this.notificationLength)
}
hideSearch() {
-1
View File
@@ -35,7 +35,6 @@ export class PinPage implements OnInit {
}
close() {
/* console.log(this.isEventEdited); */
this.modalController.dismiss();
}
@@ -40,7 +40,7 @@ export class ChatOptionsPopoverPage implements OnInit {
}
ngOnInit() {
console.log(this.attendees);
}
@@ -90,7 +90,7 @@ export class ChatOptionsPopoverPage implements OnInit {
}
attachDocument(){
console.log('Anexar Documento');
}
@@ -110,14 +110,14 @@ export class ChatOptionsPopoverPage implements OnInit {
if(res){
const data = res.data;
this.documents.push(data.selected);
console.log(res.data);
}
});
}
async bookMeeting() {
console.log(this.attendees);
this.popoverController.dismiss();
if( window.innerWidth <= 1024){
const modal = await this.modalController.create({
@@ -31,7 +31,7 @@ export class ChatPopoverPage implements OnInit {
}
ngOnInit() {
console.log(this.roomId);
}
close(action:any){
@@ -79,7 +79,7 @@ export class ChatPopoverPage implements OnInit {
let res:any = await this.wsChatMethodsService.leaveRoom(this.roomId);
console.log(res.error.error);
if(res.error){
if(res.error.error = "error-you-are-last-owner"){
@@ -107,7 +107,7 @@ export class ChatPopoverPage implements OnInit {
if(this.room.t === 'p'){
this.chatService.leaveGroup(body).subscribe(res=>{
console.log(res);
this.close('leave');
},
(e)=>{
@@ -130,7 +130,7 @@ export class ChatPopoverPage implements OnInit {
}
else{
this.chatService.leaveChannel(body).subscribe(res=>{
console.log(res);
this.close('leave');
},
(e)=>{
@@ -158,12 +158,12 @@ export class ChatPopoverPage implements OnInit {
if(this.room.t === 'p'){
this.chatService.deleteGroup(body).subscribe(res=>{
console.log(res);
});
}
else{
this.chatService.deleteChannel(body).subscribe(res=>{
console.log(res);
});
}
});
@@ -40,7 +40,7 @@ export class DeplomaOptionsPage implements OnInit {
}
ngOnInit() {
console.log(this.serialNumber);
}
async openAddNoteModal(actionName:string) {
@@ -76,7 +76,7 @@ export class DespachosOptionsPage implements OnInit {
this.popoverController.dismiss();
this.processes.SetTaskToPending(this.task.SerialNumber).subscribe(res=>{
this.toastService._successMessage()
console.log(res);
this.close();
},()=>{
@@ -86,7 +86,7 @@ export class DespachosOptionsPage implements OnInit {
async distartExpedientModal(){
this.popoverController.dismiss();
console.log(this.fulltask);
const modal = await this.modalController.create({
component: DiscartExpedientModalPage,
componentProps: {
@@ -201,7 +201,7 @@ export class DespachosOptionsPage implements OnInit {
await modal.present();
modal.onDidDismiss().then(async (res) => {
console.log(res);
if(res.data) {
const DocumentToSave = res.data.documents.map((e) => {
@@ -45,7 +45,7 @@ export class DespachosPrOptionsPage implements OnInit {
this.activatedRoute.queryParams.subscribe(params => {
if(params["serialNumber"]) {
this.serialNumber = params["serialNumber"];
console.log(params["serialNumber"]);
}
});
@@ -82,9 +82,9 @@ export class DespachosPrOptionsPage implements OnInit {
});
await modal.present();
modal.onDidDismiss().then( (res)=> {
console.log(res['data']);
if(res['data']=='openDiscart') {
console.log('open discart');
this.distartExpedientModal();
@@ -99,7 +99,7 @@ export class DespachosPrOptionsPage implements OnInit {
sendExpedienteToPending() {
this.processes.SetTaskToPending(this.serialNumber).subscribe(res=>{
console.log(res);
this.toastService._successMessage()
this.popoverController.dismiss('close')
},()=>{
@@ -110,7 +110,7 @@ export class DespachosPrOptionsPage implements OnInit {
async distartExpedientModal() {
this.popoverController.dismiss();
console.log(this.fulltask);
const modal = await this.modalController.create({
component: DiscartExpedientModalPage,
componentProps: {
@@ -126,7 +126,7 @@ export class DespachosPrOptionsPage implements OnInit {
modal.onDidDismiss().then(res=>{
if(res['data']=='close'){
this.close();
/* console.log('2Expedient Discard closed2');
/*
this.close();
this.openMenu(); */
}
@@ -230,7 +230,7 @@ export class DespachosPrOptionsPage implements OnInit {
await modal.present();
modal.onDidDismiss().then(async (res) => {
console.log(res);
if(res.data){
@@ -40,7 +40,7 @@ export class MessagesOptionsPage implements OnInit {
closeChatRoom(){
let body = { "roomId": this.roomId }
this.chatService.removeChatRoom(body).subscribe(res=>{
console.log(res);
});
this.close();
}
@@ -63,7 +63,7 @@ export class OptsExpedientePrPage implements OnInit {
}
console.log('OptsExpedientePrPage ---- ', this.task);
}
@@ -99,7 +99,7 @@ export class OptsExpedientePrPage implements OnInit {
await modal.present();
modal.onDidDismiss().then(async (res) => {
console.log(res);
if(res.data){
const DocumentToSave = res.data.documents.map((e) => {
return {
@@ -161,7 +161,7 @@ export class OptsExpedientePrPage implements OnInit {
await modal.present();
modal.onDidDismiss().then( async (res)=>{
console.log(res['data']);
if(body == 'descartar') {
if(res['data']== 'Yes'){
@@ -207,7 +207,7 @@ export class OptsExpedientePrPage implements OnInit {
this.goBack();
}
else if(res['data'] == 'No'){
console.log('Update');
const loader = this.toastService.loading()
try {
@@ -253,7 +253,7 @@ export class OptsExpedientePrPage implements OnInit {
sendExpedienteToPending(){
this.popoverController.dismiss();
this.processes.SetTaskToPending(this.task.SerialNumber).subscribe(res=>{
console.log(res);
this.close();
},()=>{
@@ -281,11 +281,11 @@ export class OptsExpedientePrPage implements OnInit {
});
await modal.present();
modal.onDidDismiss().then( async (res)=>{
console.log(res['data']);
let body = res['data'];
// console.log('close '+ res['data'])
//
if(res['data']) {
console.log('open discart');
const loader = this.toastService.loading()
@@ -301,7 +301,7 @@ export class OptsExpedientePrPage implements OnInit {
}
else{
console.log('Not open');
}
});
@@ -357,7 +357,7 @@ export class OptsExpedientePrPage implements OnInit {
if(res){
const data = res.data;
this.documents.push(data.selected);
console.log( this.documents);
this.documents.forEach(element =>{
let body = {
"Source": "1",
@@ -64,7 +64,7 @@ export class OptsExpedientePage implements OnInit {
}
async openNewGroupPage(){
console.log(this.fulltask);
const modal = await this.modalController.create({
component: NewGroupPage,
@@ -107,19 +107,19 @@ export class OptsExpedientePage implements OnInit {
/* this.activatedRoute.paramMap.subscribe(params => {
console.log('YES');
console.log(params);
switch (params["params"].caller) {
case 'events':
console.log('here-1');
this.router.navigate(['/home',params["params"].caller]);
break;
case 'gabinete-digital':
console.log('here0');
let navigationExtras: NavigationExtras = {
queryParams: {
"expedientes": true,
@@ -127,7 +127,7 @@ export class OptsExpedientePage implements OnInit {
}
if( window.innerWidth < 801) {
this.router.navigate(['/home/gabinete-digital/expediente']);
console.log('here');
} else {
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
@@ -210,7 +210,7 @@ export class OptsExpedientePage implements OnInit {
await modal.present();
modal.onDidDismiss().then( async (res) => {
console.log(res);
if(res.data){
const DocumentToSave = res.data.documents.map((e) => {
return {
@@ -281,7 +281,7 @@ export class OptsExpedientePage implements OnInit {
"AttachmentList" :documents,
}
console.log(body);
const loader = this.toastService.loading()
@@ -319,7 +319,7 @@ export class OptsExpedientePage implements OnInit {
async openExpedientActionsModal(taskAction: any, task: any) {
console.log(taskAction, task)
this.close();
let classs;
@@ -338,7 +338,7 @@ export class OptsExpedientePage implements OnInit {
});
await modal.present();
modal.onDidDismiss().then(async res=>{
console.log(res['data']);
let body = res['data'];
if(res['data']){
const loader = this.toastService.loading()
@@ -352,7 +352,7 @@ export class OptsExpedientePage implements OnInit {
}
}
else{
console.log('Not open');
}
});
}
@@ -369,7 +369,7 @@ export class OptsExpedientePage implements OnInit {
await modal.present();
modal.onDidDismiss().then( async (res) => {
console.log(res['data']);
if(body == 'descartar') {
if(res['data']== 'Yes') {
@@ -408,7 +408,7 @@ export class OptsExpedientePage implements OnInit {
this.goBack();
}
else if(res['data'] == 'No'){
console.log('Update');
const loader = this.toastService.loading()
try {
@@ -46,7 +46,7 @@ export class RequestOptionsPage implements OnInit {
this.activatedRoute.queryParams.subscribe(params => {
if(params["serialNumber"]) {
this.serialNumber = params["serialNumber"];
// console.log(params["serialNumber"]);
//
}
});
@@ -63,7 +63,7 @@ export class RequestOptionsPage implements OnInit {
}
ngOnInit() {
console.log(this.task);
this.profile = "mdgpr";
window.onresize = (event) => {
@@ -82,7 +82,7 @@ export class RequestOptionsPage implements OnInit {
sendExpedienteToPending() {
this.processes.SetTaskToPending(this.task.SerialNumber).subscribe(res=>{
console.log(res);
this.toastService._successMessage()
this.close();
},()=>{
@@ -161,9 +161,9 @@ export class RequestOptionsPage implements OnInit {
});
await modal.present();
modal.onDidDismiss().then(res=> {
console.log(res['data']);
if(res['data']=='openDiscart') {
console.log('open discart');
} else {
this.popoverController.dismiss('close')
@@ -95,7 +95,7 @@ export class EditActionPage implements OnInit {
DateEnd: this.folder.DateEnd,
ActionType: this.folder.ActionType,
}
console.log(body);
const loader = this.toastService.loading()
@@ -64,7 +64,7 @@ export class NewActionPage implements OnInit {
}
segmentChanged(ev: any) {
console.log(ev.detail.value);
}
get dateValid() {
@@ -84,7 +84,7 @@ export class NewActionPage implements OnInit {
injectValidation() {
console.log(this.dateValid)
this.Form = new FormGroup({
Subject: new FormControl(this.folder.Description, [
@@ -106,10 +106,10 @@ export class NewActionPage implements OnInit {
if(this.Form.invalid) {
return false
} else {
console.log ('not passded')
}
console.log('pass')
this.folder = {
ProcessId: null,
@@ -119,7 +119,7 @@ export class NewActionPage implements OnInit {
DateEnd: this.folder.DateEnd,
ActionType: this.segment,
}
console.log(this.folder);
const loader = this.toastService.loading()
@@ -64,11 +64,7 @@ export class NewPublicationPage implements OnInit {
getPublicationDetail() {
this.showLoader = true;
//console.log(this.publicationId);
/* console.log(this.folderId); */
this.publications.GetPublicationById(this.publicationId).subscribe( res =>{
//console.log(res);
/* this.publication = res; */
this.publication = {
DateIndex: res.DateIndex,
DocumentId: res.DocumentId,
@@ -96,7 +92,7 @@ export class NewPublicationPage implements OnInit {
this.capturedImage = 'data:image/jpeg;base64,' +capturedImage.base64String;
this.capturedImageTitle = capturedImage.path;
//console.log(this.capturedImage);
//
}
async laodPicture() {
@@ -153,8 +149,8 @@ export class NewPublicationPage implements OnInit {
FileExtension: 'jpeg',
}
console.log('Edit change image');
console.log(this.publication);
const loader = this.toastService.loading()
try {
@@ -185,7 +181,7 @@ export class NewPublicationPage implements OnInit {
const loader = this.toastService.loading()
try {
console.log(this.publication);
await this.publications.UpdatePublication(this.publication.ProcessId, this.publication).toPromise()
this.toastService._successMessage()
@@ -210,8 +206,8 @@ export class NewPublicationPage implements OnInit {
FileExtension: 'jpeg',
}
console.log('Edit change image');
console.log(this.publication);
const loader = this.toastService.loading()
try {
@@ -245,7 +241,7 @@ export class NewPublicationPage implements OnInit {
const loader = this.toastService.loading()
try {
console.log(this.publication);
await this.publications.CreatePublication(this.folderId, this.publication).toPromise()
this.toastService._successMessage()
@@ -48,9 +48,6 @@ export class PublicationDetailPage implements OnInit {
}
ngOnInit() {
console.log(this.folderId);
/* console.log(this.publication.FileBase64); */
this.getPublicationDetail();
}
doRefresh(event) {
@@ -63,11 +60,8 @@ export class PublicationDetailPage implements OnInit {
getPublicationDetail(){
this.showLoader = true;
console.log(this.publicationId);
/* console.log(this.folderId); */
this.publications.GetPublicationById(this.publicationId).subscribe(res=>{
console.log(res);
/* this.publication = res; */
this.publication = {
DateIndex: res.DateIndex,
DocumentId: res.DocumentId,
@@ -104,7 +98,7 @@ export class PublicationDetailPage implements OnInit {
}
async editPost(publicationType:any) {
console.log(this.publication);
if(window.innerWidth < 701){
const modal = await this.modalController.create({
@@ -64,7 +64,7 @@ export class ViewPublicationsPage implements OnInit {
if(typeof(this.folderId) == 'object') {
this.folderId = this.folderId['ProcessId']
}
console.log('change view to ',this.folderId)
//setTimeout(()=>{
this.getPublicationDetail();
@@ -89,7 +89,7 @@ export class ViewPublicationsPage implements OnInit {
getPublicationDetail() {
this.publications.GetPresidentialAction(this.folderId).subscribe(res=>{
console.log(res);
this.item = res;
});
}
@@ -101,32 +101,32 @@ export class ViewPublicationsPage implements OnInit {
//this.getFromDB()
this.publications.GetPublicationsImages(this.folderId).subscribe(res => {
console.log('publications ids', res)
this.publicationList = new Array();
/* for(let i = 0; i < res.length; i++) {
this.publications.GetPublicationById(res[i]).subscribe(ress => {
console.log('publications by ids', ress)
let item: Publication = this.publicationPipe.itemList(ress)
console.log('publications by ids 2', item)
this.publicationList.push(item);
})
} */
res.forEach(element => {
console.log('publications elements', element)
this.publications.GetPublicationById(element).subscribe(ress => {
console.log('publications by ids', ress)
let item: Publication = this.publicationPipe.itemList(ress)
console.log('publications by ids 2', item)
this.publicationList.push(item);
})
});
console.log('PUBLICATIONS IMAGEs',this.publicationList)
this.storage.remove('view_publications');
this.storage.set('view_publications', this.publicationList);
console.log('PUBLICATIONS IMAGEs',this.publicationList)
this.getpublication = this.publicationList;
this.showLoader = false;