diff --git a/src/app/modals/document-detail/document-detail.page.ts b/src/app/modals/document-detail/document-detail.page.ts index 629d48c91..c8a57b312 100644 --- a/src/app/modals/document-detail/document-detail.page.ts +++ b/src/app/modals/document-detail/document-detail.page.ts @@ -223,7 +223,7 @@ export class DocumentDetailPage implements OnInit { backdropDismiss: false }); - modal.onDidDismiss().then(res=>{ + modal.onDidDismiss().then(res => { //this.RouteService.goBack(); }, (error) => { console.log(error) diff --git a/src/app/modals/view-document/view-document.page.ts b/src/app/modals/view-document/view-document.page.ts index 3bb165703..9fdad3232 100644 --- a/src/app/modals/view-document/view-document.page.ts +++ b/src/app/modals/view-document/view-document.page.ts @@ -58,7 +58,7 @@ export class ViewDocumentPage implements OnInit { ngOnInit() { this.processes.GetViewer(this.docId, this.applicationId).subscribe(async(res)=> { - + const link: string = res.replace('//pdfjs/web/', '/pdfjs/web/') this.trustedUrl = this.sanitazer.bypassSecurityTrustResourceUrl(link); @@ -125,7 +125,7 @@ export class ViewDocumentPage implements OnInit { } async openBookMeetingModal() { - console.log('this.Document', this.Document) + console.log('this.Document----------', this.Document) let classs; if( window.innerWidth < 701) { classs = 'book-meeting-modal modal modal-desktop' @@ -164,6 +164,8 @@ export class ViewDocumentPage implements OnInit { classs = 'modal modal-desktop showAsideOptions' } // check passing + + console.log('this.Document----------openExpedientActionsModal', this.Document) const modal = await this.modalController.create({ component: ExpedientTaskModalPage, componentProps: { @@ -175,7 +177,7 @@ export class ViewDocumentPage implements OnInit { cssClass: classs, }); - modal.onDidDismiss().then( + modal.onDidDismiss().then( async(res)=>{} , (error) => { console.log(error) diff --git a/src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.ts b/src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.ts index c930038f9..b33935a0b 100644 --- a/src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.ts +++ b/src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.ts @@ -124,35 +124,28 @@ export class ExpedientTaskModalPage implements OnInit { this.SearchFolder = this.navParams.get('SearchFolder'); this.aplicationId = this.navParams.get('aplicationId') - // this.document = this.navParams.get('document') + this.document = this.navParams.get('document') this.taskType = this.navParams.get('taskAction'); - - // if(this.document) { - // const doc: any = this.document - - // this.documents.push({ - // ApplicationId: (doc.ApplicationType || doc.ApplicationId), - // ApplicationType: (doc.ApplicationType || doc.ApplicationId), - // SourceId: (doc.Id || doc.DocId || doc.SourceId), - // Id: (doc.Id || doc.DocId || doc.SourceId), - // EntidadeOrganicaNome: (doc.sender || doc.SourceName || doc. EntidadeOrganicaNome), - // Sender: (doc.sender || doc.SourceName || doc. EntidadeOrganicaNome), - // Data: (doc.DocDate || doc.Data), - // DocDate: (doc.DocDate || doc.Data), - // Assunto: doc.Assunto, - // } as any) - // } - - - const DocumentToSave = this.documents.map((e) => { - return { - ApplicationId: e.ApplicationType, - SourceId: e.Id + try { + if(this.document) { + const doc: any = this.document + this.documents.push({ + ApplicationId: (doc.ApplicationType || doc.ApplicationId), + ApplicationType: (doc.ApplicationType || doc.ApplicationId), + SourceId: (doc.Id || doc.DocId || doc.SourceId), + Id: (doc.Id || doc.DocId || doc.SourceId), + EntidadeOrganicaNome: (doc.sender || doc.SourceName || doc. EntidadeOrganicaNome), + Sender: (doc.sender || doc.SourceName || doc. EntidadeOrganicaNome), + Data: (doc.DocDate || doc.Data), + DocDate: (doc.DocDate || doc.Data), + Assunto: doc.Assunto, + } as any) } - }); - + } catch (error) { + console.log(error) + } console.log('this.document', this.document) diff --git a/src/app/services/chat/message.service.ts b/src/app/services/chat/message.service.ts index 5256bcca3..3a3cf1f4b 100644 --- a/src/app/services/chat/message.service.ts +++ b/src/app/services/chat/message.service.ts @@ -319,6 +319,8 @@ export class MessageService { if(params?.attachments) { if(params?.attachments[0]?.image_url) { delete params?.attachments[0]?.image_url + delete params?.file?.image_url + // delete } } diff --git a/src/app/store/notification-holder.service.ts b/src/app/store/notification-holder.service.ts index c37aa9906..4748c0d5a 100644 --- a/src/app/store/notification-holder.service.ts +++ b/src/app/store/notification-holder.service.ts @@ -43,11 +43,15 @@ export class NotificationHolderService { notificationObject(notification) { const element = notification + const i = this._notificationList.length + 1 + let notificationObject; + if (element.notification) { notificationObject = { - id: notification?.id, + id: notification?.id || uuidv4(), + index: i, title: element.notification.title, Service: element.data.Service, Object: element.data.Object, @@ -65,7 +69,8 @@ export class NotificationHolderService { } else if (element.data) { notificationObject = { - id: notification?.id, + id: notification?.id || uuidv4(), + index: i, title: element.title, Service: element.data.Service, Object: element.data.Object, @@ -84,19 +89,20 @@ export class NotificationHolderService { } else { { notificationObject = { - id: notification?.id, - title: element.title, - Service: element.Service, - Object: element.Object, - IdObject: element.IdObject, + id: notification?.id || uuidv4(), FolderId: element.FolderId, - body: element.body, - dateInit: element.dateInit, - dateEnd: element.dateEnd, + IdObject: element.IdObject, Location: element.Location, - TypeAgenda: element.TypeAgenda, + Object: element.Object, Role: element.Role, + Service: element.Service, Status: element.Status, + TypeAgenda: element.TypeAgenda, + body: element.body, + dateEnd: element.dateEnd, + dateInit: element.dateInit, + index: element.index, + title: element.title, read: false, } }