diff --git a/src/app/home/home.page.html b/src/app/home/home.page.html index 7785c21b1..dac104c08 100644 --- a/src/app/home/home.page.html +++ b/src/app/home/home.page.html @@ -37,7 +37,7 @@ - Chat ... + Chat diff --git a/src/app/modals/profile/profile.page.html b/src/app/modals/profile/profile.page.html index 02166f8f9..669d3361c 100644 --- a/src/app/modals/profile/profile.page.html +++ b/src/app/modals/profile/profile.page.html @@ -84,7 +84,7 @@
- {{notificationStatus}} + @@ -95,7 +95,7 @@
+ *ngFor="let item of NotificationHolderService.notificationList; let i = index">
diff --git a/src/app/modals/profile/profile.page.ts b/src/app/modals/profile/profile.page.ts index 57ce30227..2dd30a9fe 100644 --- a/src/app/modals/profile/profile.page.ts +++ b/src/app/modals/profile/profile.page.ts @@ -12,6 +12,7 @@ import { ThemeService } from 'src/app/services/theme.service' import { environment } from 'src/environments/environment'; import { ProcessesService } from 'src/app/services/processes.service'; import { EventsService } from 'src/app/services/events.service'; +import { NotificationHolderService } from 'src/app/store/notification-holder.service'; @Component({ selector: 'app-profile', @@ -21,7 +22,6 @@ import { EventsService } from 'src/app/services/events.service'; export class ProfilePage implements OnInit { userLoginPreference = '' - notificationdata: any[] = []; DataArray: Array = []; service: "agenda"; @@ -56,6 +56,7 @@ export class ProfilePage implements OnInit { private processesService: ProcessesService, private eventsService: EventsService, private storageService: StorageService, + public NotificationHolderService: NotificationHolderService ) { @@ -84,10 +85,8 @@ export class ProfilePage implements OnInit { ngOnInit() { - this.getNotificationData(); - - - this.getProfilpicture(); + // this.getNotificationData(); + this.getProfilpicture(); } @@ -109,87 +108,87 @@ export class ProfilePage implements OnInit { asyncNotification() { } - async getNotificationData() { + // async getNotificationData() { - //const keyExist = await this.storageservice.keyExist("Notifications") + // //const keyExist = await this.storageservice.keyExist("Notifications") - //if(keyExist) { - await this.storageservice.get("Notifications").then((value) => { + // //if(keyExist) { + // await this.storageservice.get("Notifications").then((value) => { - console.log('Getnotifications 111', value) + // console.log('Getnotifications 111', value) - this.DataArray = [] - value.forEach((element, i) => { - console.log('Getnotifications', element, i) - let notificationObject; - if (element.notification) { + // this.DataArray = [] + // value.forEach((element, i) => { + // console.log('Getnotifications', element, i) + // let notificationObject; + // if (element.notification) { - notificationObject = { - index: i, - title: element.notification.title, - Service: element.data.Service, - Object: element.data.Object, - IdObject: element.data.IdObject, - FolderId: element.data.FolderId, - body: element.notification.body, - dateInit: this.getFormatedTime(element.data.dateInit), - dateEnd: this.getFormatedTime(element.data.dateEnd), - Location: element.data.Location, - TypeAgenda: element.data.TypeAgenda, - Role: element.data.Role, - Status: element.data.Status, - read: false, - } + // notificationObject = { + // index: i, + // title: element.notification.title, + // Service: element.data.Service, + // Object: element.data.Object, + // IdObject: element.data.IdObject, + // FolderId: element.data.FolderId, + // body: element.notification.body, + // dateInit: this.getFormatedTime(element.data.dateInit), + // dateEnd: this.getFormatedTime(element.data.dateEnd), + // Location: element.data.Location, + // TypeAgenda: element.data.TypeAgenda, + // Role: element.data.Role, + // Status: element.data.Status, + // read: false, + // } - } else if (element.data) { - notificationObject = { - index: i, - title: element.title, - Service: element.data.Service, - Object: element.data.Object, - IdObject: element.data.IdObject, - FolderId: element.data.FolderId, - body: element.body, - dateInit: this.getFormatedTime(element.data.dateInit), - dateEnd: this.getFormatedTime(element.data.dateEnd), - Location: element.data.Location, - TypeAgenda: element.data.TypeAgenda, - Role: element.data.Role, - Status: element.data.Status, - read: false, - } + // } else if (element.data) { + // notificationObject = { + // index: i, + // title: element.title, + // Service: element.data.Service, + // Object: element.data.Object, + // IdObject: element.data.IdObject, + // FolderId: element.data.FolderId, + // body: element.body, + // dateInit: this.getFormatedTime(element.data.dateInit), + // dateEnd: this.getFormatedTime(element.data.dateEnd), + // Location: element.data.Location, + // TypeAgenda: element.data.TypeAgenda, + // Role: element.data.Role, + // Status: element.data.Status, + // read: false, + // } - } else { - { - notificationObject = { - FolderId: element.FolderId, - IdObject: element.IdObject, - Location: element.Location, - 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, - } - } - } + // } else { + // { + // notificationObject = { + // FolderId: element.FolderId, + // IdObject: element.IdObject, + // Location: element.Location, + // 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, + // } + // } + // } - this.DataArray.push(notificationObject) - }); - this.notificationdata = this.DataArray.reverse(); - }).catch((error) => { - console.error('storage getnotification: ', error) - }) - // } + // this.DataArray.push(notificationObject) + // }); + // this.notificationdata = this.DataArray.reverse(); + // }).catch((error) => { + // console.error('storage getnotification: ', error) + // }) + // // } - } + // } getFormatedTime(dateString) { @@ -215,7 +214,7 @@ export class ProfilePage implements OnInit { this.isloading = false }, (error) => { - this.notificationdata[i].read = true; + this.NotificationHolderService.notificationList[i].read = true; this.isloading = false }) } @@ -230,7 +229,7 @@ export class ProfilePage implements OnInit { }, (error) => { console.log('evento não existe') - this.notificationdata[i].read = true; + this.NotificationHolderService.notificationList[i].read = true; this.isloading = false }) @@ -274,7 +273,7 @@ export class ProfilePage implements OnInit { this.isloading = false }, (error) => { - this.notificationdata[i].read = true; + this.NotificationHolderService.notificationList[i].read = true; this.isloading = false }) @@ -290,8 +289,12 @@ export class ProfilePage implements OnInit { } } else if (Service === "chat") { + let navigationExtras: NavigationExtras = { queryParams: { "roomId": IdObject, } }; + + this.zone.run(() => this.router.navigate(['/home/chat'])); this.zone.run(() => this.router.navigate(['/home/chat'], navigationExtras)); + this.deleteNotification(index); } @@ -359,21 +362,8 @@ export class ProfilePage implements OnInit { } deleteNotification(index) { - this.notificationdata = this.notificationdata.filter(item => item.index != index); - - this.storageservice.store("Notifications", this.notificationdata).then((store) => { - - this.storageservice.get("Notifications").then((value) => { - - this.eventTriger.publishSomeData({ - notification: "deleted" - }) - - }).catch((error) => { - console.error('storage delete notification: ', error) - }) - }); - + const notificationdata = this.NotificationHolderService.notificationList.find(item => item.index == index); + this.NotificationHolderService.removeNotification(notificationdata) } logout() { @@ -452,7 +442,7 @@ export class ProfilePage implements OnInit { keppNotification(index) { - this.notificationdata[index].read = false; + this.NotificationHolderService.notificationList[index].read = false; } doNotKeppNotification(index) { diff --git a/src/app/services/notifications.service.ts b/src/app/services/notifications.service.ts index e2be3a0cb..04a3bb73b 100644 --- a/src/app/services/notifications.service.ts +++ b/src/app/services/notifications.service.ts @@ -13,6 +13,9 @@ import { ActionPerformed, PushNotificationSchema, PushNotifications, Token, } fr import { notificationObject } from '../models/notifications'; import { Capacitor } from '@capacitor/core'; import { AngularFireMessaging } from '@angular/fire/messaging'; +import { NotificationHolderService } from 'src/app/store/notification-holder.service'; + + @Injectable({ providedIn: 'root' }) @@ -23,6 +26,7 @@ export class NotificationsService { DataArray = new Array(); + callbacks: { [key: string]: { type: notificationObject, @@ -44,7 +48,8 @@ export class NotificationsService { private router: Router, private zone: NgZone, private eventtrigger: EventTrigger, - private afMessaging: AngularFireMessaging,) { + private afMessaging: AngularFireMessaging, + public NotificationHolderService: NotificationHolderService) { } @@ -179,45 +184,11 @@ export class NotificationsService { storenotification(notification) { - console.log('Store Notification ',notification) - this.storageService.get("Notifications").then((store) => { - - store.push(notification) - console.log('Store Notification ',store) - - if(this.platform.is('mobile')) { - - const result = store.reduce((accumulator, current) => { - let exists = accumulator.find(item => { - return item.id === current.id; - }); - - if(!exists) { - accumulator = accumulator.concat(current); - } - return accumulator; - }, []); - - console.log('Notification Result',result); - this.storageService.store("Notifications", result).then(() => { - this.eventtrigger.publishSomeData({ - notification: "recive" - }) - }) - } else { - this.storageService.store("Notifications", store).then(() => { - this.eventtrigger.publishSomeData({ - notification: "recive" - }) - }) - } - }).catch((error) => { - if (!error) { - this.storageService.store("Notifications", [notification]) - } - }) + this.NotificationHolderService.addNotification(notification) + + } onReciveBackground() { diff --git a/src/app/shared/header/header.page.html b/src/app/shared/header/header.page.html index 4afde412a..3f7f7f3d4 100644 --- a/src/app/shared/header/header.page.html +++ b/src/app/shared/header/header.page.html @@ -42,7 +42,7 @@
- + @@ -68,8 +68,8 @@
-
- {{notificationLength}}
+
+ {{NotificationHolderService.notificationList.length}}
@@ -230,8 +230,8 @@
-
- {{notificationLength}}
+
+ {{NotificationHolderService.notificationList.length}}
diff --git a/src/app/shared/header/header.page.ts b/src/app/shared/header/header.page.ts index 7cfd9bd36..c2ab2444a 100644 --- a/src/app/shared/header/header.page.ts +++ b/src/app/shared/header/header.page.ts @@ -15,6 +15,7 @@ import { EventTrigger } from 'src/app/services/eventTrigger.service' import { ActiveTabService } from 'src/app/services/active-tab.service'; import { NotificationsService } from 'src/app/services/notifications.service'; import { AttachmentsService } from 'src/app/services/attachments.service'; +import { NotificationHolderService } from 'src/app/store/notification-holder.service'; @Component({ selector: 'app-header', @@ -57,7 +58,8 @@ export class HeaderPage implements OnInit { private cdRef: ChangeDetectorRef, private storageService: StorageService, private zone: NgZone, - private attachmentService: AttachmentsService + private attachmentService: AttachmentsService, + public NotificationHolderService: NotificationHolderService ) { this.loggeduser = SessionStore.user; router.events.subscribe((val) => { diff --git a/src/app/store/notification-holder.service.spec.ts b/src/app/store/notification-holder.service.spec.ts new file mode 100644 index 000000000..191e1e1a4 --- /dev/null +++ b/src/app/store/notification-holder.service.spec.ts @@ -0,0 +1,16 @@ +import { TestBed } from '@angular/core/testing'; + +import { NotificationHolderService } from './notification-holder.service'; + +describe('NotificationHolderService', () => { + let service: NotificationHolderService; + + beforeEach(() => { + TestBed.configureTestingModule({}); + service = TestBed.inject(NotificationHolderService); + }); + + it('should be created', () => { + expect(service).toBeTruthy(); + }); +}); diff --git a/src/app/store/notification-holder.service.ts b/src/app/store/notification-holder.service.ts new file mode 100644 index 000000000..de7b9e922 --- /dev/null +++ b/src/app/store/notification-holder.service.ts @@ -0,0 +1,118 @@ +import { Injectable } from '@angular/core'; +import { StorageService } from '../services/storage.service'; + +@Injectable({ + providedIn: 'root' +}) +export class NotificationHolderService { + + notificationList = [] + + constructor( + private storageService: StorageService, + ) { + + try { + this.restore() + } catch(error) {} + + } + + restore() { + this.storageService.get("Notifications").then((store) => { + if(Array.isArray(store)) { + this.notificationList = store + } + }).catch((error) => {}) + } + + save() { + this.storageService.store("Notifications", this.notificationList) + } + + addNotification(notification) { + + const element = notification + const i = this.notificationList.length + 1 + + let notificationObject; + if (element.notification) { + + notificationObject = { + index: i, + title: element.notification.title, + Service: element.data.Service, + Object: element.data.Object, + IdObject: element.data.IdObject, + FolderId: element.data.FolderId, + body: element.notification.body, + dateInit: this.getFormatedTime(element.data.dateInit), + dateEnd: this.getFormatedTime(element.data.dateEnd), + Location: element.data.Location, + TypeAgenda: element.data.TypeAgenda, + Role: element.data.Role, + Status: element.data.Status, + read: false, + } + + } else if (element.data) { + notificationObject = { + index: i, + title: element.title, + Service: element.data.Service, + Object: element.data.Object, + IdObject: element.data.IdObject, + FolderId: element.data.FolderId, + body: element.body, + dateInit: this.getFormatedTime(element.data.dateInit), + dateEnd: this.getFormatedTime(element.data.dateEnd), + Location: element.data.Location, + TypeAgenda: element.data.TypeAgenda, + Role: element.data.Role, + Status: element.data.Status, + read: false, + } + + } else { + { + notificationObject = { + FolderId: element.FolderId, + IdObject: element.IdObject, + Location: element.Location, + 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, + } + } + } + + this.notificationList.push(notificationObject) + this.save() + } + + + getFormatedTime(dateString) { + var date = new Date(dateString); + var hours = date.getHours() /* > 12 ? date.getHours() - 12 : date.getHours() */; + var am_pm = date.getHours() >= 12 ? "pm" : "am"; + var minutes = date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes(); + let time = hours + ":" + minutes /* + " " + am_pm */; + return time; + } + + removeNotification(notification) { + this.notificationList = this.notificationList.filter( (e) => { + return e.index != notification.index + }) + this.save() + } + +} diff --git a/version/git-version.ts b/version/git-version.ts index 3d5ff4945..688fe6233 100644 --- a/version/git-version.ts +++ b/version/git-version.ts @@ -1,12 +1,12 @@ export let versionData = { - "shortSHA": "f1717f71c", - "SHA": "f1717f71cce09e76f6c4a558ef58d912b0f588b0", - "branch": "developer-prod", - "lastCommitAuthor": "'Eudes Inácio'", - "lastCommitTime": "'Mon Sep 11 21:14:00 2023 +0100'", - "lastCommitMessage": "dateLabel added to chat web", - "lastCommitNumber": "5259", - "change": "", - "changeStatus": "On branch developer-prod\nYour branch is up to date with 'origin/developer-prod'.\n\nChanges to be committed:\n (use \"git restore --staged ...\" to unstage)\n\tmodified: src/app/services/chat/message.service.ts\n\tmodified: src/app/services/chat/room.service.ts\n\tmodified: src/app/shared/chat/messages/messages.page.html\n\tmodified: src/app/shared/chat/messages/messages.page.scss\n\tmodified: src/app/shared/chat/messages/messages.page.ts", - "changeAuthor": "eudes.inacio" -} \ No newline at end of file + "shortSHA": "680f57313", + "SHA": "680f57313f4d97d944e96c6e3457b7f1a9f379f0", + "branch": "notification-header/feature", + "lastCommitAuthor": "'Peter Maquiran'", + "lastCommitTime": "'Thu Aug 31 12:00:52 2023 +0100'", + "lastCommitMessage": "add attachments", + "lastCommitNumber": "5253", + "change": "diff --git a/src/app/modals/create-process/create-process.page.ts b/src/app/modals/create-process/create-process.page.ts\nindex 6b58016d7..a27c5e424 100644\n--- a/src/app/modals/create-process/create-process.page.ts\n+++ b/src/app/modals/create-process/create-process.page.ts\n@@ -282,7 +282,8 @@ export class CreateProcessPage implements OnInit {\n const DocumentToSave = this.documents.map((e: any) => {\n return {\n ApplicationId: e.ApplicationType || e.ApplicationId,\n- SourceId: e.Id || e.DocId || e.SourceId\n+ SourceId: e.Id || e.DocId || e.SourceId,\n+ SourceName: e.Assunto || e.SourceName || e.Description,\n }\n });\n \ndiff --git a/src/app/modals/document-detail/document-detail.page.ts b/src/app/modals/document-detail/document-detail.page.ts\nindex 629d48c91..1bfcca6e3 100644\n--- a/src/app/modals/document-detail/document-detail.page.ts\n+++ b/src/app/modals/document-detail/document-detail.page.ts\n@@ -129,7 +129,7 @@ export class DocumentDetailPage implements OnInit {\n \n async viewDocumentModal() {\n \n- const selectedDoc = this.LoadedDocument.Documents[ this.dicIndex]\n+ const selectedDoc = this.LoadedDocument\n \n let task = {\n serialNumber: '',\n@@ -154,7 +154,7 @@ export class DocumentDetailPage implements OnInit {\n url: '',\n title_link: '',\n },\n- Document: this.LoadedDocument.Documents[ this.dicIndex],\n+ Document: this.LoadedDocument,\n applicationId: task.workflowInstanceDataFields.SourceSecFsID,\n docId: task.workflowInstanceDataFields.SourceID ,\n folderId: '',\n@@ -192,7 +192,8 @@ export class DocumentDetailPage implements OnInit {\n componentProps: {\n taskAction: taskAction,\n task: this.DocumentTask,\n- aplicationId: this.LoadedDocument.ApplicationId || this.LoadedDocument.ApplicationID\n+ aplicationId: this.LoadedDocument.ApplicationId || this.LoadedDocument.ApplicationID,\n+ document: this.LoadedDocument\n },\n cssClass: classs,\n });\n@@ -213,6 +214,7 @@ export class DocumentDetailPage implements OnInit {\n } else {\n classs = 'modal modal-desktop showAsideOptions'\n }\n+\n const modal = await this.modalController.create({\n component: DocumentSetUpMeetingPage,\n componentProps: {\n@@ -238,7 +240,8 @@ export class DocumentDetailPage implements OnInit {\n cssClass: 'exp-options',\n componentProps: {\n task: this.task,\n- LoadedDocument: this.LoadedDocument\n+ LoadedDocument: this.LoadedDocument,\n+ document: this.LoadedDocument,\n },\n translucent: true\n });\ndiff --git a/src/app/modals/document-set-up-meeting/document-set-up-meeting.page.ts b/src/app/modals/document-set-up-meeting/document-set-up-meeting.page.ts\nindex 8c68182d4..f7bb03bb0 100644\n--- a/src/app/modals/document-set-up-meeting/document-set-up-meeting.page.ts\n+++ b/src/app/modals/document-set-up-meeting/document-set-up-meeting.page.ts\n@@ -22,7 +22,7 @@ import { SessionStore } from 'src/app/store/session.service';\n import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';\n import { environment } from 'src/environments/environment';\n import { TaskService } from 'src/app/services/task.service'\n-\n+import { AttachmentsService } from 'src/app/services/attachments.service';\n \n const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {\n parse: {\n@@ -111,15 +111,47 @@ export class DocumentSetUpMeetingPage implements OnInit {\n public ThemeService: ThemeService,\n public _eventService: EventsService,\n private httpErroHandle: HttpErrorHandle,\n- public TaskService: TaskService\n+ public TaskService: TaskService,\n+ private attachmentsService: AttachmentsService,\n ) {\n this.loggeduser = SessionStore.user;\n this.document = this.navParams.get('document')\n \n- if(Array.isArray(this.document)) {\n- this.attachments = this.document\n- } else {\n- this.attachments = [this.document]\n+\n+ if(this.document) {\n+ console.log('this.document', this.document)\n+ if(Array.isArray(this.document)) {\n+ const docs: any = this.document\n+ for(let doc of docs ) {\n+ this.attachments.push({\n+ ApplicationId: (doc.ApplicationType || doc.ApplicationId), \n+ ApplicationType: (doc.ApplicationType || doc.ApplicationId),\n+ SourceId: (doc.Id || doc.DocId || doc.SourceId), \n+ Id: (doc.Id || doc.DocId || doc.SourceId), \n+ EntidadeOrganicaNome: (doc.Stakeholders || doc.sender || doc.EntidadeOrganicaNome ),\n+ Sender: (doc.Stakeholders || doc.sender || doc. EntidadeOrganicaNome ),\n+ Data: (doc.DocDate || doc.Data),\n+ DocDate: (doc.DocDate || doc.Data),\n+ Assunto: doc.Assunto || doc.SourceName || doc.Description,\n+ SourceName: doc.Assunto || doc.SourceName || doc.Description,\n+ } as any)\n+ }\n+ } else {\n+ const doc: any = this.document\n+ this.attachments.push({\n+ ApplicationId: (doc.ApplicationType || doc.ApplicationId), \n+ ApplicationType: (doc.ApplicationType || doc.ApplicationId),\n+ SourceId: (doc.Id || doc.DocId || doc.SourceId), \n+ Id: (doc.Id || doc.DocId || doc.SourceId), \n+ EntidadeOrganicaNome: (doc.Stakeholders || doc.sender || doc.EntidadeOrganicaNome ),\n+ Sender: (doc.Stakeholders || doc.sender || doc. EntidadeOrganicaNome ),\n+ Data: (doc.DocDate || doc.Data),\n+ DocDate: (doc.DocDate || doc.Data),\n+ Assunto: doc.Assunto || doc.SourceName || doc.Description,\n+ SourceName: doc.Assunto || doc.SourceName || doc.Description,\n+ } as any)\n+ }\n+\n }\n \n \n@@ -278,7 +310,7 @@ export class DocumentSetUpMeetingPage implements OnInit {\n let Attendees = this.taskParticipants.concat(this.taskParticipantsCc);\n \n if(this.document.Documents) {\n- this.document.Documents.forEach((e)=> {\n+ this.attachments.forEach((e: any)=> {\n this.docs.push({\n ApplicationId: e.ApplicationId || e.ApplicationType,\n Source: 1,\n@@ -287,14 +319,6 @@ export class DocumentSetUpMeetingPage implements OnInit {\n })\n })\n }\n- else{\n- this.docs.push({\n- ApplicationId: this.document.ApplicationId || this.document.ApplicationType,\n- Source: 1,\n- SourceId: this.document.DocId || this.document.docID || this.document.docId || this.document.SourceId || this.document.Id,\n- SourceName: this.document.Assunto\n- })\n- }\n \n let postEvent = {\n EventId: '',\n@@ -318,13 +342,14 @@ export class DocumentSetUpMeetingPage implements OnInit {\n Type: this.EventRecurrenceType,\n LastOccurrence: this.Occurrence,\n },\n- // Attachments: this.docs,\n+ Attachments: this.attachments,\n }\n \n const laoder = this.toastService.loading()\n \n this.eventService.create({ body: postEvent, calendar: this.postData.CalendarName }).subscribe(async (respose) => {\n laoder.remove();\n+ // this.saveAttachment()\n this.httpErroHandle.httpsSucessMessagge('new event');\n this.modalController.dismiss()\n }, (error) => {\n@@ -336,6 +361,17 @@ export class DocumentSetUpMeetingPage implements OnInit {\n \n }\n \n+ async saveAttachment() {\n+ this.attachments.forEach( async (attachments, i) => {\n+ try {\n+ await this.attachmentsService.setEventAttachmentById(attachments).toPromise();\n+ } catch(error) {\n+ \n+ }\n+\n+ });\n+ }\n+\n async addParticipants() {\n \n this.adding = \"intervenient\";\ndiff --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\nindex 66826fc22..b9f20c744 100644\n--- a/src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.ts\n+++ b/src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.ts\n@@ -130,19 +130,37 @@ export class ExpedientTaskModalPage implements OnInit {\n \n \n if(this.document) {\n- const doc: any = this.document\n-\n- this.documents.push({\n- ApplicationId: (doc.ApplicationType || doc.ApplicationId), \n- ApplicationType: (doc.ApplicationType || doc.ApplicationId),\n- SourceId: (doc.Id || doc.DocId || doc.SourceId), \n- Id: (doc.Id || doc.DocId || doc.SourceId), \n- EntidadeOrganicaNome: (doc.sender || doc.SourceName || doc. EntidadeOrganicaNome),\n- Sender: (doc.sender || doc.SourceName || doc. EntidadeOrganicaNome),\n- Data: (doc.DocDate || doc.Data),\n- DocDate: (doc.DocDate || doc.Data),\n- Assunto: doc.Assunto,\n- } as any)\n+ \n+ if(Array.isArray(this.document)) {\n+ const docs: any = this.document\n+ for(let doc of docs ) {\n+ this.documents.push({\n+ ApplicationId: (doc.ApplicationType || doc.ApplicationId), \n+ ApplicationType: (doc.ApplicationType || doc.ApplicationId),\n+ SourceId: (doc.Id || doc.DocId || doc.SourceId), \n+ Id: (doc.Id || doc.DocId || doc.SourceId), \n+ EntidadeOrganicaNome: (doc.Stakeholders || doc.sender || doc.EntidadeOrganicaNome ),\n+ Sender: (doc.Stakeholders || doc.sender || doc. EntidadeOrganicaNome ),\n+ Data: (doc.DocDate || doc.Data),\n+ DocDate: (doc.DocDate || doc.Data),\n+ Assunto: doc.Assunto || doc.SourceName || doc.Description,\n+ } as any)\n+ }\n+ } else {\n+ const doc: any = this.document\n+ this.documents.push({\n+ ApplicationId: (doc.ApplicationType || doc.ApplicationId), \n+ ApplicationType: (doc.ApplicationType || doc.ApplicationId),\n+ SourceId: (doc.Id || doc.DocId || doc.SourceId), \n+ Id: (doc.Id || doc.DocId || doc.SourceId), \n+ EntidadeOrganicaNome: (doc.Stakeholders || doc.sender || doc.EntidadeOrganicaNome ),\n+ Sender: (doc.Stakeholders || doc.sender || doc. EntidadeOrganicaNome ),\n+ Data: (doc.DocDate || doc.Data),\n+ DocDate: (doc.DocDate || doc.Data),\n+ Assunto: doc.Assunto || doc.SourceName || doc.Description,\n+ } as any)\n+ }\n+\n }\n \n \ndiff --git a/src/app/shared/agenda/edit-event-to-approve/edit-event-to-approve.page.html b/src/app/shared/agenda/edit-event-to-approve/edit-event-to-approve.page.html\nindex 38fc8af46..b5a0f5b4e 100644\n--- a/src/app/shared/agenda/edit-event-to-approve/edit-event-to-approve.page.html\n+++ b/src/app/shared/agenda/edit-event-to-approve/edit-event-to-approve.page.html\n@@ -283,7 +283,7 @@\n \n \n Adicionar Intervenientes*\n- {{participant.Name}}\n+ {{participant.EmailAddress }}\n \n \n \n@@ -306,7 +306,7 @@\n \n \n Adicionar Intervenientes\n- {{participant.Name}}\n+ {{participant.EmailAddress }}\n \n \n \ndiff --git a/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.html b/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.html\nindex c306e743e..fe896ef2a 100644\n--- a/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.html\n+++ b/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.html\n@@ -225,7 +225,7 @@\n \n \n Adicionar Intervenientes*\n- {{participant.Name}}\n+ {{participant.EmailAddress}}\n \n \n \n@@ -248,7 +248,7 @@\n \n \n Adicionar Intervenientes\n- {{participant.Name}}\n+ {{participant.EmailAddress }}\n \n \n ", + "changeStatus": "On branch notification-header/feature\nChanges to be committed:\n (use \"git restore --staged ...\" to unstage)\n\tmodified: src/app/modals/profile/profile.page.html\n\tmodified: src/app/modals/profile/profile.page.ts\n\tmodified: src/app/services/notifications.service.ts\n\tmodified: src/app/shared/header/header.page.html\n\tmodified: src/app/shared/header/header.page.ts\n\tnew file: src/app/store/notification-holder.service.spec.ts\n\tnew file: src/app/store/notification-holder.service.ts\n\nChanges not staged for commit:\n (use \"git add ...\" to update what will be committed)\n (use \"git restore ...\" to discard changes in working directory)\n\tmodified: src/app/modals/create-process/create-process.page.ts\n\tmodified: src/app/modals/document-detail/document-detail.page.ts\n\tmodified: src/app/modals/document-set-up-meeting/document-set-up-meeting.page.ts\n\tmodified: src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.ts\n\tmodified: src/app/shared/agenda/edit-event-to-approve/edit-event-to-approve.page.html\n\tmodified: src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.html", + "changeAuthor": "peter.maquiran" +}