From e9c8e0fbd9f5ef8db9a13fcf53dba2269aaaec01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eudes=20In=C3=A1cio?= Date: Sun, 2 Jun 2024 13:53:46 +0100 Subject: [PATCH] lot of changes --- src/app/models/search-document.ts | 20 +- .../agenda/new-event/new-event.page.html | 4 +- .../pages/agenda/new-event/new-event.page.ts | 1 + src/app/pages/search/search.page.html | 39 ++-- src/app/pages/search/search.page.scss | 30 +++ src/app/pages/search/search.page.ts | 92 ++++++++- .../Agenda/agenda-data-repository.service.ts | 18 +- .../Repositorys/Agenda/agenda-data.service.ts | 9 + .../Agenda/mapper/EventDetailsMapper.ts | 3 +- src/app/services/Repositorys/Agenda/utils.ts | 24 +++ .../approve-event/approve-event.page.ts | 116 ++++++----- .../edit-event-to-approve.page.html | 4 +- .../edit-event-to-approve.page.ts | 186 +++++++++--------- .../agenda/edit-event/edit-event.page.html | 4 +- .../agenda/edit-event/edit-event.page.ts | 79 +++----- .../agenda/new-event/new-event.page.html | 4 +- .../shared/agenda/new-event/new-event.page.ts | 51 ++--- .../agenda/view-event/view-event.page.html | 4 +- .../agenda/view-event/view-event.page.ts | 4 + 19 files changed, 428 insertions(+), 264 deletions(-) diff --git a/src/app/models/search-document.ts b/src/app/models/search-document.ts index 970cda23f..b081717db 100644 --- a/src/app/models/search-document.ts +++ b/src/app/models/search-document.ts @@ -10,9 +10,23 @@ export class SearchList { ApplicationName: string; } +export class SearchList_v2 { + docId: number; + sourceName: string; + description: string; + applicationId: number; + classificator: string; + dateEntry: string; + docNumber: string; + subject: string; + userId: number + + +} + export class Attachments { Id?: number - ParentId?:any + ParentId?: any Source: number SourceId: any SourceName: any @@ -36,7 +50,7 @@ export class SearchDocumentDetails { export class SearchFolderDetails { ApplicationID: number ApplicationId: number - Assunto:string + Assunto: string DateDispatch: string DispatchNumber: string Docs: string @@ -44,7 +58,7 @@ export class SearchFolderDetails { DocumentsTotal: 2 IntervenerList: string[] Interveners: string - Nature:string + Nature: string Sender: null | string SenderId: null | string Status: string diff --git a/src/app/pages/agenda/new-event/new-event.page.html b/src/app/pages/agenda/new-event/new-event.page.html index f0d8ae412..bc2b566e7 100644 --- a/src/app/pages/agenda/new-event/new-event.page.html +++ b/src/app/pages/agenda/new-event/new-event.page.html @@ -369,13 +369,13 @@

- {{document.Assunto}} + {{document.subject}} {{document.appName}}

-

{{(document.EntidadeOrganicaNome || document.Sender)}} {{(document.Data || document.DocDate) | date: 'dd-MM-yyyy HH:mm'}}

+

{{(document.EntidadeOrganicaNome || document.Sender)}} {{(document.dateEntry || document.DocDate) | date: 'dd-MM-yyyy HH:mm'}}

diff --git a/src/app/pages/agenda/new-event/new-event.page.ts b/src/app/pages/agenda/new-event/new-event.page.ts index 48c6418de..deee90114 100644 --- a/src/app/pages/agenda/new-event/new-event.page.ts +++ b/src/app/pages/agenda/new-event/new-event.page.ts @@ -680,6 +680,7 @@ export class NewEventPage implements OnInit { componentProps: { type: 'AccoesPresidenciais & ArquivoDespachoElect', showSearchInput: true, + eventAgenda: true, select: true } }); diff --git a/src/app/pages/search/search.page.html b/src/app/pages/search/search.page.html index e01e8fe8c..9a41ecc73 100644 --- a/src/app/pages/search/search.page.html +++ b/src/app/pages/search/search.page.html @@ -44,7 +44,7 @@ @@ -316,4 +331,4 @@ - + \ No newline at end of file diff --git a/src/app/pages/search/search.page.scss b/src/app/pages/search/search.page.scss index b84f9a735..5264e045f 100644 --- a/src/app/pages/search/search.page.scss +++ b/src/app/pages/search/search.page.scss @@ -290,3 +290,33 @@ ion-slide { .swiper-container { width: 100%; } + + +a { + text-decoration: none; + display: inline-block; + padding: 8px 16px; +} + +a:hover { + background-color: #ddd; + color: black; +} + +.previous { + background-color: #f1f1f1; + color: black; +} + +.next { + background-color: #ffb81c; + color: white; +} + +.round { + border-radius: 50%; +} + +.nextAndPreviewDiv { + display:inline-flex +} \ No newline at end of file diff --git a/src/app/pages/search/search.page.ts b/src/app/pages/search/search.page.ts index f8d0ced12..21ec1afc8 100644 --- a/src/app/pages/search/search.page.ts +++ b/src/app/pages/search/search.page.ts @@ -18,6 +18,8 @@ import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-pick import { NgxMatDateFormats } from '@angular-material-components/datetime-picker'; import { momentG } from 'src/plugin/momentG'; import { Cy } from 'cypress/enum' +import { AgendaDataRepositoryService } from 'src/app/services/Repositorys/Agenda/agenda-data-repository.service'; +import { SessionStore } from 'src/app/store/session.service'; const CUSTOM_DATE_FORMATS: NgxMatDateFormats = { parse: { @@ -91,9 +93,13 @@ export class SearchPage implements OnInit { select: boolean = false; showSearchInput = false + eventAgenda = false; checkRoutPublication: boolean; checkDateEnd: boolean; datePickerPlaceholder: string; + pageNumber = 1; + pageSize = 10; + totalPage: number; @ViewChild('picker1') picker1: any; @@ -107,7 +113,8 @@ export class SearchPage implements OnInit { private navParams: NavParams, public ThemeService: ThemeService, private router: Router, - private httpErrorhandle: HttpErrorHandle) { + private httpErrorhandle: HttpErrorHandle, + private agendaDataRepository: AgendaDataRepositoryService) { this.ordinance = "recent"; this.currentPath = window.location.pathname; @@ -117,6 +124,7 @@ export class SearchPage implements OnInit { this.select = this.navParams.get('select'); this.showSearchInput = this.navParams.get('showSearchInput'); + this.eventAgenda = this.navParams.get('eventAgenda') if (this.type == null || this.type == undefined) { @@ -141,8 +149,8 @@ export class SearchPage implements OnInit { } myInterval = setInterval(() => { - document.querySelectorAll('.ngx-mat-timepicker input').forEach((e :any) => { - if(e) { + document.querySelectorAll('.ngx-mat-timepicker input').forEach((e: any) => { + if (e) { e.disabled = true; } }) @@ -204,7 +212,7 @@ export class SearchPage implements OnInit { ngOnInit() { - if(this.currentPath.includes('/home/publications')) { + if (this.currentPath.includes('/home/publications')) { this.checkRoutPublication = false; this.checkDateEnd = true; this.datePickerPlaceholder = 'Data Inicio*' @@ -382,8 +390,34 @@ export class SearchPage implements OnInit { } else { this.showLoader = true; - this.search.basicSearch(this.searchSubject, searchDocumentDate,searchDocumentDateEnd, this.searchSenderId + this.agendaDataRepository.getDocumentAttachments(361, SessionStore.user.UserId, this.searchSubject, this.pageNumber, this.pageSize).subscribe((values) => { + this.totalPage = values.data.total / this.pageSize; + this.totalPage = Math.round(this.totalPage) + console.log(values.data.result) + this.searchDocuments = this.sortArrayISODate(values.data.result); + this.reorderList(this.ordinance); + + // hide show document + if (this.searchDocuments.length >= 1) { + this.showDocuments = true; + } else { + this.showDocuments = false + } + + this.showLoader = false; + this.loadWordCloud(); + }, error => { + this.showLoader = false; + // this.searchResult = "Registo não encontrado" + this.httpErrorhandle.httpStatusHandle(error) + // console.log(error) + }) + return + this.search.basicSearch(this.searchSubject, searchDocumentDate, searchDocumentDateEnd, this.searchSenderId , this.searchOrganicEntiryCode, this.searchDocTypeId, '0').subscribe(res => { + console.log(this.searchDocTypeId) + + return if (!res.Categories.length) { this.searchResult = "Não encontramos o que procura"; @@ -418,6 +452,32 @@ export class SearchPage implements OnInit { }); } } + else if (this.type == "AccoesPresidenciais & ArquivoDespachoElect" && this.eventAgenda == true) { + this.showLoader = true; + this.agendaDataRepository.getDocumentAttachments(361, SessionStore.user.UserId, this.searchSubject, this.pageNumber, this.pageSize).subscribe((values) => { + this.totalPage = values.data.total / this.pageSize; + this.totalPage = Math.round(this.totalPage) + console.log(values.data.result) + this.searchDocuments = this.sortArrayISODate(values.data.result); + this.reorderList(this.ordinance); + + // hide show document + if (this.searchDocuments.length >= 1) { + this.showDocuments = true; + } else { + this.showDocuments = false + } + + this.showLoader = false; + this.loadWordCloud(); + }, error => { + this.showLoader = false; + // this.searchResult = "Registo não encontrado" + this.httpErrorhandle.httpStatusHandle(error) + // console.log(error) + }) + + } else if (this.type == "AccoesPresidenciais & ArquivoDespachoElect") { this.searchCategories = []; @@ -536,7 +596,7 @@ export class SearchPage implements OnInit { } else { this.showLoader = true; - this.search.basicSearch(this.searchSubject, searchDocumentDate,searchDocumentDateEnd, this.searchSenderId + this.search.basicSearch(this.searchSubject, searchDocumentDate, searchDocumentDateEnd, this.searchSenderId , this.searchOrganicEntiryCode, this.searchDocTypeId, '8').subscribe(res => { if (!res.Categories.length) { this.searchResult = "Não encontramos o que procura"; @@ -579,7 +639,7 @@ export class SearchPage implements OnInit { } }); } - if (this.searchSubject.trim() == "" && searchDocumentDate == null&& searchDocumentDateEnd == null && this.searchSenderId == null && this.searchOrganicEntiryCode == null && this.searchDocTypeId == null) { + if (this.searchSubject.trim() == "" && searchDocumentDate == null && searchDocumentDateEnd == null && this.searchSenderId == null && this.searchOrganicEntiryCode == null && this.searchDocTypeId == null) { this.searchResult = "Campo de pesquisa esta vazio, entre com assunto que deseja pesquisa"; console.log('enter text'); @@ -793,13 +853,13 @@ export class SearchPage implements OnInit { // }); - if (this.searchSubject.trim() == "" && searchDocumentDate == null && searchDocumentDateEnd == null && this.searchSenderId == null && this.searchOrganicEntiryCode == null && this.searchDocTypeId == null) { + if (this.searchSubject.trim() == "" && searchDocumentDate == null && searchDocumentDateEnd == null && this.searchSenderId == null && this.searchOrganicEntiryCode == null && this.searchDocTypeId == null) { this.searchResult = "Campo de pesquisa esta vazio, entre com assunto que deseja pesquisa"; console.log('enter text'); } else { this.showLoader = true; - this.search.basicSearchPublication(this.searchSubject, searchDocumentDate,searchDocumentDateEnd, this.searchSenderId + this.search.basicSearchPublication(this.searchSubject, searchDocumentDate, searchDocumentDateEnd, this.searchSenderId , this.searchOrganicEntiryCode, this.searchDocTypeId, '386').subscribe(res => { if (!res.Categories.length) { this.searchResult = "Não encontramos o que procura"; @@ -1136,4 +1196,18 @@ export class SearchPage implements OnInit { await modal.present(); } + nextButton(event) { + event.preventDefault(); + this.pageNumber++; + this.basicSearch() + } + + previeweButton(event) { + event.preventDefault(); + if (this.pageNumber > 1) { + this.pageNumber--; + this.basicSearch() + } + } + } diff --git a/src/app/services/Repositorys/Agenda/agenda-data-repository.service.ts b/src/app/services/Repositorys/Agenda/agenda-data-repository.service.ts index 530f62d8e..407df2103 100644 --- a/src/app/services/Repositorys/Agenda/agenda-data-repository.service.ts +++ b/src/app/services/Repositorys/Agenda/agenda-data-repository.service.ts @@ -93,7 +93,7 @@ export class AgendaDataRepositoryService { type: this.utils.calendarTypeSeleted(eventData.Category), category: this.utils.calendarCategorySeleted(eventData.CalendarName), attendees: this.utils.attendeesAdded(eventData.Attendees), - attachments: this.utils.documentAdded(documents), + attachments: documents, recurrence: { frequency: 0, occurrences: 0, @@ -125,8 +125,10 @@ export class AgendaDataRepositoryService { return this.agendaDataService.updateEvent(eventId, eventInput) } - addEventAttendee(id,attendeeData) { - return this.agendaDataService.addEventAttendee(id,attendeeData); + addEventAttendee(id,attendeeData,) { + console.log(attendeeData) + console.log(this.utils.attendeesEdit(attendeeData)) + return this.agendaDataService.addEventAttendee(id,{ attendees: this.utils.attendeesAdded(attendeeData) }); } addEventAttachment(id,attachmentData) { @@ -153,6 +155,14 @@ export class AgendaDataRepositoryService { } eventToaprovalStatus(eventId, status) { - return this.agendaDataService.updateEventStatus(eventId,this.utils.statusEventAproval(status)) + let statusObject = { + status: this.utils.statusEventAproval(status), + comment: "" + } + return this.agendaDataService.updateEventStatus(eventId,statusObject) + } + + getDocumentAttachments(applicationId,userId,subject,pageNumber,pageSize) { + return this.agendaDataService.getDocumentAttachment(applicationId,userId,subject,pageNumber,pageSize) } } diff --git a/src/app/services/Repositorys/Agenda/agenda-data.service.ts b/src/app/services/Repositorys/Agenda/agenda-data.service.ts index 0c99ec684..3931f05b1 100644 --- a/src/app/services/Repositorys/Agenda/agenda-data.service.ts +++ b/src/app/services/Repositorys/Agenda/agenda-data.service.ts @@ -106,4 +106,13 @@ export class AgendaDataService { getToken(): Observable { return this.http.get(`${this.baseUrl}/Users/token`); } + + getDocumentAttachment(aplicationId,userId,value,PageNumber,PageSize): Observable { + const params = new HttpParams() + .set('userId', userId) + .set('Value', value) + .set('PageNumber', PageNumber) + .set('PageSize', PageSize); + return this.http.get(`${this.baseUrl}/Documents/Attachments${aplicationId}`, {params}); + } } diff --git a/src/app/services/Repositorys/Agenda/mapper/EventDetailsMapper.ts b/src/app/services/Repositorys/Agenda/mapper/EventDetailsMapper.ts index 9c4baac3a..42e439fd6 100644 --- a/src/app/services/Repositorys/Agenda/mapper/EventDetailsMapper.ts +++ b/src/app/services/Repositorys/Agenda/mapper/EventDetailsMapper.ts @@ -21,7 +21,8 @@ export class EventMapper { "EndDate": dto.endDate, "EventType": "Single", "Attendees": dto.attendees.map((e) => ({ - Id: e.id, + //Id: e.id, + wxUserId: e.wxUserId, EmailAddress: e.emailAddress, Name: e.name, IsRequired: e.attendeeType == '0' ? true : false, diff --git a/src/app/services/Repositorys/Agenda/utils.ts b/src/app/services/Repositorys/Agenda/utils.ts index bac0f0df7..70b03e4c5 100644 --- a/src/app/services/Repositorys/Agenda/utils.ts +++ b/src/app/services/Repositorys/Agenda/utils.ts @@ -73,6 +73,19 @@ export class Utils { } + editDocumentAdded(documents: any[]) { + console.log('document added', documents) + return documents.map((element) => { + return { + docId: parseInt(element.SourceId), + sourceName: element.SourceName, + description: "", + applicationId: parseInt(element.ApplicationId) + }; + }); + + } + atendeesSeletedType(type) { var selectedType = { @@ -105,4 +118,15 @@ export class Utils { } return selectedType[type]; } + + attendeesEdit(taskParticipants: any[]) { + return taskParticipants.map((e) => { + return { + name: e.Name, + emailAddress: e.EmailAddress, + attendeeType: this.atendeesSeletedType(JSON.stringify(e.IsRequired)), + wxUserId: e.wxUserId || e.Id, + } + }); + } } diff --git a/src/app/shared/agenda/approve-event/approve-event.page.ts b/src/app/shared/agenda/approve-event/approve-event.page.ts index f743d9924..4798e9164 100644 --- a/src/app/shared/agenda/approve-event/approve-event.page.ts +++ b/src/app/shared/agenda/approve-event/approve-event.page.ts @@ -23,19 +23,19 @@ export class ApproveEventPage implements OnInit { event: Event; @Input() loadedEvent: EventToApproveDetails; - loadedAttachments:any; - customDate:any; - today:any; + loadedAttachments: any; + customDate: any; + today: any; show: boolean = false; months = ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"]; days = ["Domingo", "Segunda-feira", "Terça-feira", "Quarta-feira", "Quinta-feira", "Sexta-feira", "Sábado"]; - @Input() serialNumber:string; - @Input() showComponent:string; + @Input() serialNumber: string; + @Input() showComponent: string; @Input() componentTransparent: any - @Input() InstanceId:string; - @Input() showAside:boolean; + @Input() InstanceId: string; + @Input() showAside: boolean; @Output() approveEventDismiss = new EventEmitter(); @Output() closeEventToApprove = new EventEmitter(); @@ -53,12 +53,12 @@ export class ApproveEventPage implements OnInit { public ThemeService: ThemeService, private httpErroHandle: HttpErrorHandle, public TaskService: TaskService, - public AgendaDataRepositoryService: AgendaDataRepositoryService + private agendaDataRepository: AgendaDataRepositoryService ) { // Event to approve list - window['edit-approve-event-desktop'] = ()=> { + window['edit-approve-event-desktop'] = () => { this.getTask() } } @@ -80,31 +80,38 @@ export class ApproveEventPage implements OnInit { async getTask() { - const res = await this.AgendaDataRepositoryService.getEventToApproveById(this.serialNumber) + const res = await this.agendaDataRepository.getEventToApproveById(this.serialNumber) - if(res.isOk()) { + if (res.isOk()) { this.loadedEvent = res.value; - console.log('attachment',res.value) + console.log('attachment', res.value) this.loadedAttachments = this.loadedEvent.Attachments this.today = new Date(res.value.workflowInstanceDataFields.StartDate); // - this.customDate = this.days[this.today.getDay()]+ ", " + this.today.getDate() +" de " + ( this.months[this.today.getMonth()]); + this.customDate = this.days[this.today.getDay()] + ", " + this.today.getDate() + " de " + (this.months[this.today.getMonth()]); } else { console.log(res.error.status) } } - async approveTask(serialNumber:string) { + async approveTask(serialNumber: string) { let body = { "serialNumber": serialNumber, "action": "Aprovar" } const loader = this.toastService.loading() try { - await this.processes.PostTaskAction(body).toPromise() - this.modalController.dismiss(serialNumber); - this.httpErroHandle.httpsSucessMessagge('Aprovar') - this.TaskService.loadEventosParaAprovacao(); + this.agendaDataRepository.eventToaprovalStatus(serialNumber, 'Approved').subscribe((value) => { + console.log(value) + this.modalController.dismiss(serialNumber); + this.httpErroHandle.httpsSucessMessagge('Aprovar') + this.TaskService.loadEventosParaAprovacao(); + }, ((error) => { + console.log('aprove event error: ', error) + this.httpErroHandle.httpStatusHandle(error) + })) + /* await this.processes.PostTaskAction(body).toPromise() */ + } catch (error) { this.httpErroHandle.httpStatusHandle(error) } finally { @@ -114,7 +121,7 @@ export class ApproveEventPage implements OnInit { } - async rejectTask(serialNumber:string) { + async rejectTask(serialNumber: string) { let body = { "serialNumber": serialNumber, "action": "Rejeitar" } @@ -139,13 +146,13 @@ export class ApproveEventPage implements OnInit { try { this.loadedAttachments = await this.attachmentsService.getAttachmentsById(this.InstanceId).toPromise(); } catch (error) { - console.error('getAttchaments',error) + console.error('getAttchaments', error) } } - async viewDocument(DocId:string, Document) { + async viewDocument(DocId: string, Document) { const modal = await this.modalController.create({ component: ViewDocumentPage, @@ -168,7 +175,7 @@ export class ApproveEventPage implements OnInit { } - async openOptions(ev:any) { + async openOptions(ev: any) { const popover = await this.popoverController.create({ component: EventActionsPopoverPage, componentProps: { @@ -178,7 +185,7 @@ export class ApproveEventPage implements OnInit { event: ev, translucent: true }); - return await popover.present().then(() =>{ + return await popover.present().then(() => { this.TaskService.loadEventosParaAprovacao() this.getTask() }, (error) => { @@ -186,11 +193,11 @@ export class ApproveEventPage implements OnInit { }) } - async emendTask(serialNumber:string) { + async emendTask(serialNumber: string) { const modal = await this.modalController.create({ component: EmendMessageModalPage, - componentProps:{ + componentProps: { }, cssClass: 'emend-message-modal', backdropDismiss: false @@ -199,46 +206,53 @@ export class ApproveEventPage implements OnInit { modal.onDidDismiss() - .then( async (res) => { + .then(async (res) => { - if(res.data.option == 'save') { + if (res.data.option == 'save') { - let body = { "serialNumber": serialNumber, - "action": "Emendar", + let body = { + "serialNumber": serialNumber, + "action": "Emendar", "dataFields": { - "ReviewUserComment": res.data, + "ReviewUserComment": res.data, + } } + + const loader = this.toastService.loading(); + + try { + /* await this.processes.PostTaskAction(body).toPromise(); */ + this.agendaDataRepository.eventToaprovalStatus(serialNumber, 'Revision').subscribe((value) => { + this.httpErroHandle.httpsSucessMessagge('Rever') + this.TaskService.loadEventosParaAprovacao(); + this.close(); + },((error) => { + console.log('send event to revision error: ', error) + this.httpErroHandle.httpStatusHandle(error) + })); + + } catch (error) { + this.httpErroHandle.httpStatusHandle(error) + } finally { + loader.remove() + } + + } else { + } - const loader = this.toastService.loading(); - - try { - await this.processes.PostTaskAction(body).toPromise(); - this.httpErroHandle.httpsSucessMessagge('Rever') - this.TaskService.loadEventosParaAprovacao(); - this.close(); - } catch (error) { - this.httpErroHandle.httpStatusHandle(error) - } finally { - loader.remove() - } - - } else { - - } - - }, (error) => { - console.log(error) - }); + }, (error) => { + console.log(error) + }); await modal.present(); } goToEventsToApprove() { - if(window.location.pathname.startsWith('/home/agenda')) { + if (window.location.pathname.startsWith('/home/agenda')) { this.close() } else { let navigationExtras: NavigationExtras = { diff --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 index fa4668f76..a58c9c342 100644 --- 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 @@ -352,7 +352,7 @@

- {{document.Description}} + {{document.subject}} Correspondencia AccoesPresidenciais ArquivoDespachoElect @@ -360,7 +360,7 @@

-

{{document.Stakeholders}} {{document.CreateDate }}

+

{{document.Stakeholders}} {{document.dateEntry }}

diff --git a/src/app/shared/agenda/edit-event-to-approve/edit-event-to-approve.page.ts b/src/app/shared/agenda/edit-event-to-approve/edit-event-to-approve.page.ts index bc6f80262..2b20fb006 100644 --- a/src/app/shared/agenda/edit-event-to-approve/edit-event-to-approve.page.ts +++ b/src/app/shared/agenda/edit-event-to-approve/edit-event-to-approve.page.ts @@ -56,11 +56,11 @@ export class EditEventToApprovePage implements OnInit { showLoader = false - get dateStart () { + get dateStart() { return this.dateControlStart.value } - get dateEnd () { + get dateEnd() { return this.dateControlEnd.value } @@ -69,12 +69,12 @@ export class EditEventToApprovePage implements OnInit { @ViewChild('inicio') inicio: any; @ViewChild('picker1') picker1: any; - loadedAttachments: Attachment[]= [] + loadedAttachments: any[] = [] eventProcess = { serialNumber: "", taskStartDate: "", - workflowInstanceDataFields:{ + workflowInstanceDataFields: { Body: "", OccurrenceType: '', Category: '', @@ -97,9 +97,9 @@ export class EditEventToApprovePage implements OnInit { } show = false - isRecurring:string; + isRecurring: string; isEventEdited: boolean; - profile:string; + profile: string; eventAttendees: EventPerson[]; loadedEventAttachments: Attachment[]; @@ -111,6 +111,8 @@ export class EditEventToApprovePage implements OnInit { Form: FormGroup; validateFrom = false + addedAttachmentsList = []; + deletedAttachmentsList = []; @Output() openAttendeesComponent = new EventEmitter(); @Output() clearContact = new EventEmitter(); @@ -118,7 +120,7 @@ export class EditEventToApprovePage implements OnInit { @Output() setIntervenientCC = new EventEmitter(); @Output() closeComponent = new EventEmitter(); @Output() closeEventToApprove = new EventEmitter(); - @Output() approveEventDismiss = new EventEmitter(); + @Output() approveEventDismiss = new EventEmitter(); @Input() saveData: any; @Input() serialNumber: string @@ -130,7 +132,7 @@ export class EditEventToApprovePage implements OnInit { private eventsService: EventsService, public alertController: AlertController, private attachmentsService: AttachmentsService, - private processes:ProcessesService, + private processes: ProcessesService, private toastService: ToastService, public ThemeService: ThemeService, public httpErrorHandler: HttpErrorHandle, @@ -142,7 +144,7 @@ export class EditEventToApprovePage implements OnInit { ngOnInit() { - if(this.restoreTemporaryData()){ + if (this.restoreTemporaryData()) { this.setOtherData() } else { this.getTask(); @@ -156,60 +158,60 @@ export class EditEventToApprovePage implements OnInit { const res: any = await this.agendaDataRepository.getEventToApproveById(this.serialNumber) console.log('evento to apro to edit', res.value) - this.eventProcess = res.value; + this.eventProcess = res.value; - this.eventProcess.workflowInstanceDataFields.LastOccurrence = new Date(this.eventProcess.workflowInstanceDataFields.LastOccurrence) + this.eventProcess.workflowInstanceDataFields.LastOccurrence = new Date(this.eventProcess.workflowInstanceDataFields.LastOccurrence) - this.restoreDatepickerData() + this.restoreDatepickerData() - // description - let body : any =this.eventProcess.workflowInstanceDataFields.Body.replace(/<[^>]+>/g, '') - this.eventProcess.workflowInstanceDataFields.Body = body - this.eventProcess.workflowInstanceDataFields.Category = this.eventProcess.workflowInstanceDataFields.EventType + // description + let body: any = this.eventProcess.workflowInstanceDataFields.Body.replace(/<[^>]+>/g, '') + this.eventProcess.workflowInstanceDataFields.Body = body + this.eventProcess.workflowInstanceDataFields.Category = this.eventProcess.workflowInstanceDataFields.EventType - this.InstanceId = this.eventProcess.workflowInstanceDataFields.InstanceId - this.loadedAttachments = res.value.Attachments; - console.log(this.loadedAttachments) - this.getAttachments() + this.InstanceId = this.eventProcess.workflowInstanceDataFields.InstanceId + this.loadedAttachments = res.value.Attachments; + console.log(this.loadedAttachments) + this.getAttachments() - this.setOtherData() + this.setOtherData() - this.saveTemporaryData() + this.saveTemporaryData() } getRecurrenceTypes() { - this.eventsService.getRecurrenceTypes().subscribe(res=>{ - + this.eventsService.getRecurrenceTypes().subscribe(res => { + this.recurringTypes = res; }); } - onSelectedRecurringChanged(ev:any) { + onSelectedRecurringChanged(ev: any) { this.calculetedLastOccurrence(ev); - if(ev.length > 1) { - + if (ev.length > 1) { + this.eventProcess.workflowInstanceDataFields.OccurrenceType = ev.filter(data => data != '-1'); } - if(ev.length == 0) { + if (ev.length == 0) { this.eventProcess.workflowInstanceDataFields.OccurrenceType = "-1"; } } - calculetedLastOccurrence(type:number){ - var valor; + calculetedLastOccurrence(type: number) { + var valor; var opcao: boolean; if (type == 0) { valor = 7; opcao = true; - } else if(type == 1){ + } else if (type == 1) { valor = 30; opcao = true; - } else if(type == 2){ + } else if (type == 2) { valor = 1; opcao = false; - }else if(type == 3){ + } else if (type == 3) { valor = 5; opcao = false; } @@ -217,28 +219,28 @@ export class EditEventToApprovePage implements OnInit { } - defineLastOccurrence(valor:number, opcao:boolean){ + defineLastOccurrence(valor: number, opcao: boolean) { var time = new Date(this.eventProcess.workflowInstanceDataFields.EndDate); if (opcao == true) { time.setDate(time.getDate() + valor); this.eventProcess.workflowInstanceDataFields.LastOccurrence = time; } else { time = new Date( - time.getFullYear() + valor, - time.getMonth(), - time.getDate(), - time.getHours(), + time.getFullYear() + valor, + time.getMonth(), + time.getDate(), + time.getHours(), time.getMinutes() ); this.eventProcess.workflowInstanceDataFields.LastOccurrence = time; } - + } setOtherData() { - if(this.eventProcess.workflowInstanceDataFields.ParticipantsList) { + if (this.eventProcess.workflowInstanceDataFields.ParticipantsList) { this.eventProcess.workflowInstanceDataFields.ParticipantsList.forEach(e => { - if(e.IsRequired) { + if (e.IsRequired) { this.taskParticipants.push(e); } else { this.taskParticipantsCc.push(e); @@ -246,10 +248,10 @@ export class EditEventToApprovePage implements OnInit { }) } - this.taskParticipants = removeDuplicate(this.taskParticipants) - this.taskParticipantsCc = removeDuplicate(this.taskParticipantsCc) + this.taskParticipants = removeDuplicate(this.taskParticipants) + this.taskParticipantsCc = removeDuplicate(this.taskParticipantsCc) - if(this.eventProcess.workflowInstanceDataFields.IsRecurring == false) { + if (this.eventProcess.workflowInstanceDataFields.IsRecurring == false) { this.isRecurring = "Não se repete"; } else { @@ -280,7 +282,7 @@ export class EditEventToApprovePage implements OnInit { runValidation() { - this.validateFrom = true + this.validateFrom = true } injectValidation() { @@ -318,7 +320,7 @@ export class EditEventToApprovePage implements OnInit { this.injectValidation() this.runValidation() - if(this.Form.invalid) return false + if (this.Form.invalid) return false // set dates to eventProcess object this.dateControlStart = new FormControl(moment(new Date(this.eventProcess.workflowInstanceDataFields.StartDate)).add(1, 'hours')); @@ -326,7 +328,7 @@ export class EditEventToApprovePage implements OnInit { // this.restoreDatepickerData() // this.getDatepickerData() - this.taskParticipantsCc.forEach( e => { + this.taskParticipantsCc.forEach(e => { e.IsRequired = false }) @@ -336,9 +338,9 @@ export class EditEventToApprovePage implements OnInit { this.eventProcess.workflowInstanceDataFields.ParticipantsList = this.taskParticipants.concat(this.taskParticipantsCc) - this.eventProcess.workflowInstanceDataFields.ParticipantsList.forEach(e=>{ + this.eventProcess.workflowInstanceDataFields.ParticipantsList.forEach(e => { - if(e.hasOwnProperty('$type')) { + if (e.hasOwnProperty('$type')) { delete e.$type } }) @@ -375,48 +377,52 @@ export class EditEventToApprovePage implements OnInit { console.log('edit event error: ', error) })); - this.agendaDataRepository.addEventAttendee(this.eventProcess.serialNumber, { attendees: this.attendeesAdded(this.eventProcess.workflowInstanceDataFields.ParticipantsList) }).subscribe((value) => { + this.agendaDataRepository.addEventAttendee(this.eventProcess.serialNumber, this.eventProcess.workflowInstanceDataFields.ParticipantsList).subscribe((value) => { console.log(value) }, ((error) => { console.log('add Attendee error: ', error) })); - this.agendaDataRepository.addEventAttachment(this.eventProcess.serialNumber, { attachments: this.documentAdded(this.loadedAttachments) }).subscribe((value) => { - console.log(value) - }, ((error) => { - this.showLoader = false - console.log('add attachment error: ', error) - })); + if (this.addedAttachmentsList.length > 0) { + this.agendaDataRepository.addEventAttachment(this.eventProcess.serialNumber, { attachments: this.loadedAttachments }).subscribe((value) => { + console.log(value) + }, ((error) => { + this.showLoader = false + console.log('add attachment error: ', error) + })); + } + if (this.deletedAttachmentsList.length > 0) { this.agendaDataRepository.removeEventAttachment(this.eventProcess.serialNumber, { attachments: [] }).subscribe((value) => { console.log(value) }, ((error) => { this.showLoader = false console.log('remove attachment error: ', error) })); - + } + this.close() this.httpErrorHandler.httpsSucessMessagge('Editar evento'); - } catch(e) { + } catch (e) { this.httpErrorHandler.httpStatusHandle(e); this.toastService._badRequest('Evento não editado'); } - - this.loadedAttachments.forEach((document:any)=>{ - if(document['action'] == 'add') { + + this.loadedAttachments.forEach((document: any) => { + if (document['action'] == 'add') { delete document.action - this.attachmentsService.setEventAttachmentById(document).subscribe(()=>{ + this.attachmentsService.setEventAttachmentById(document).subscribe(() => { window['edit-approve-event-desktop']() - }, error =>{ + }, error => { this.toastService.badRequest(); }); - } else if(document['action'] == 'delete') { + } else if (document['action'] == 'delete') { delete document.action - this.attachmentsService.deleteEventAttachmentById(document.Id).subscribe( res=>{ + this.attachmentsService.deleteEventAttachmentById(document.Id).subscribe(res => { window['edit-approve-event-desktop']() - }, error =>{ + }, error => { this.toastService.badRequest() }) } @@ -459,10 +465,10 @@ export class EditEventToApprovePage implements OnInit { } async gravasAction() { - + await this.save(); - if(this.eventProcess['activityInstanceName'] == 'Editar Evento') { + if (this.eventProcess['activityInstanceName'] == 'Editar Evento') { this.reenviar(); } @@ -472,11 +478,11 @@ export class EditEventToApprovePage implements OnInit { let body = { serialNumber: this.eventProcess.serialNumber, action: "Reenviar", - dataFields: { + dataFields: { ReviewUserComment: "", } } - + const loader = this.toastService.loading(); try { @@ -484,13 +490,13 @@ export class EditEventToApprovePage implements OnInit { this.toastService._successMessage(); this.goToApproveEventList(); } catch (error) { - if(error.status == 0) { + if (error.status == 0) { this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão') } else { - + this.toastService._badRequest(); } - } finally { + } finally { loader.remove() } } @@ -500,16 +506,16 @@ export class EditEventToApprovePage implements OnInit { this.modalController.dismiss(); } - dynamicSetIntervenient({taskParticipants, taskParticipantsCc}) { - this.taskParticipants = removeDuplicate(taskParticipants) ; - this.taskParticipantsCc = removeDuplicate(taskParticipantsCc) ; + dynamicSetIntervenient({ taskParticipants, taskParticipantsCc }) { + this.taskParticipants = removeDuplicate(taskParticipants); + this.taskParticipantsCc = removeDuplicate(taskParticipantsCc); } async addParticipants() { //this.saveTemporaryData(); - + this.openAttendeesComponent.emit({ type: "intervenient" }); @@ -539,9 +545,9 @@ export class EditEventToApprovePage implements OnInit { restoreTemporaryData(): boolean { - const restoredData = window['temp.path:/shared/agenda/edit-event-to-approve.ts'] + const restoredData = window['temp.path:/shared/agenda/edit-event-to-approve.ts'] - if(JSON.stringify(restoredData) != "{}" && undefined != restoredData) { + if (JSON.stringify(restoredData) != "{}" && undefined != restoredData) { this.eventProcess = restoredData.eventProcess // restore dater for date and hours picker @@ -559,10 +565,10 @@ export class EditEventToApprovePage implements OnInit { try { result = await this.attachmentsService.getAttachmentsById(this.InstanceId).toPromise(); } catch (error) { - console.error('getAttachment',error) + console.error('getAttachment', error) } - - result.forEach((e)=>{ + + result.forEach((e) => { e.action = false }) @@ -572,8 +578,10 @@ export class EditEventToApprovePage implements OnInit { } deleteAttachment(attachment: Attachment, index) { + const id: any = this.loadedEventAttachments[index].Id console.log(attachment) this.loadedAttachments[index]['action'] = 'delete' + this.deletedAttachmentsList.push(id) } async getDoc() { @@ -583,16 +591,17 @@ export class EditEventToApprovePage implements OnInit { componentProps: { type: 'AccoesPresidenciais & ArquivoDespachoElect', showSearchInput: true, + eventAgenda: true, select: true, } }); await modal.present(); - modal.onDidDismiss().then( async (res)=>{ - if(res){ + modal.onDidDismiss().then(async (res) => { + if (res) { const data: SearchList = res.data.selected; console.log(data) - const DocumentToSave: any = { + /* const DocumentToSave: any = { SourceTitle: data.Assunto, ParentId: this.InstanceId, Source: '1', @@ -607,11 +616,12 @@ export class EditEventToApprovePage implements OnInit { Description: data.DocTypeDesc, SourceName: data.Assunto, Stakeholders: data.EntidadeOrganicaNome, - }; + }; */ - this.loadedAttachments.push(DocumentToSave) - + this.loadedAttachments.push(data) + this.addedAttachmentsList.push(data) + // await this.attachmentsService.setEventAttachmentById(DocumentToSave).subscribe(()=>{ // this.getAttachments(); diff --git a/src/app/shared/agenda/edit-event/edit-event.page.html b/src/app/shared/agenda/edit-event/edit-event.page.html index d2a9c46be..af5d8851a 100644 --- a/src/app/shared/agenda/edit-event/edit-event.page.html +++ b/src/app/shared/agenda/edit-event/edit-event.page.html @@ -345,7 +345,7 @@

- {{document.SourceName}} + {{document.subject}} Correspondencia AccoesPresidenciais ArquivoDespachoElect @@ -353,7 +353,7 @@

-

{{document.Stakeholders}} {{document.CreateDate | +

{{document.Stakeholders}} {{document.dateEntry | date: 'dd-MM-yyyy HH:mm'}}

diff --git a/src/app/shared/agenda/edit-event/edit-event.page.ts b/src/app/shared/agenda/edit-event/edit-event.page.ts index 27154aff5..1489a7bd3 100644 --- a/src/app/shared/agenda/edit-event/edit-event.page.ts +++ b/src/app/shared/agenda/edit-event/edit-event.page.ts @@ -17,6 +17,7 @@ import { HttpErrorHandle } from 'src/app/services/http-error-handle.service'; import { ContactsService } from 'src/app/services/contacts.service' import { DomSanitizerService } from 'src/app/services/DomSanitizer.service'; import { AgendaDataRepositoryService } from 'src/app/services/Repositorys/Agenda/agenda-data-repository.service'; +import { SearchList_v2 } from 'src/app/models/search-document'; @Component({ selector: 'app-edit-event', @@ -35,7 +36,7 @@ export class EditEventPage implements OnInit { segment: string = "true"; eventAttendees: EventPerson[]; // minDate: string; - loadedEventAttachments: Attachment[] = []; + loadedEventAttachments: any[] = []; recurringTypes = []; selectedRecurringType: any; deletedAttachmentsList = []; @@ -344,39 +345,6 @@ export class EditEventPage implements OnInit { } - atendeesSeletedType(type) { - var selectedType = { - 'true': 1, - 'false': 2, - 'other': 3, - } - return selectedType[type]; - } - - documentAdded(documents: any[]) { - console.log('document added', documents) - return documents.map((element) => { - return { - docId: parseInt(element.SourceId), - sourceName: element.SourceName, - description: "", - applicationId: parseInt(element.ApplicationId) - }; - }); - - } - - attendeesAdded(taskParticipants: any[]) { - return taskParticipants.map((e) => { - return { - name: e.Name, - emailAddress: e.EmailAddress, - attendeeType: this.atendeesSeletedType(JSON.stringify(e.IsRequired)), - wxUserId: e.wxUserId, - } - }); - } - async save_v2() { this.injectValidation() this.runValidation() @@ -385,16 +353,6 @@ export class EditEventPage implements OnInit { return false } - /* this._postEvent.Attendees = this.taskParticipants.concat(this.taskParticipantsCc); - console.log('1',this._postEvent.Attendees) - console.log('2',this.postEvent.Attendees) - if (JSON.stringify(this._postEvent.Attendees) === JSON.stringify(this.postEvent.Attendees)) { - console.log(true) - } else { - console.log(false) - } - return */ - this._postEvent.Attendees = this.taskParticipants.concat(this.taskParticipantsCc); this.showLoader = true; @@ -406,7 +364,7 @@ export class EditEventPage implements OnInit { console.log('edit event error: ', error) })); - this.agendaDataRepository.addEventAttendee(this._postEvent.EventId, { attendees: this.attendeesAdded(this._postEvent.Attendees) }).subscribe((value) => { + this.agendaDataRepository.addEventAttendee(this._postEvent.EventId, this._postEvent.Attendees).subscribe((value) => { console.log(value) }, ((error) => { console.log('add Attendee error: ', error) @@ -416,7 +374,7 @@ export class EditEventPage implements OnInit { await this.saveDocument() if (this.addedAttachmentsList.length > 0) { - this.agendaDataRepository.addEventAttachment(this._postEvent.EventId, { "attachments": this.documentAdded(this._postEvent.Attachments) }).subscribe((value) => { + this.agendaDataRepository.addEventAttachment(this._postEvent.EventId, { "attachments": this._postEvent.Attachments }).subscribe((value) => { console.log(value) }, ((error) => { this.showLoader = false @@ -627,13 +585,17 @@ export class EditEventPage implements OnInit { const id: any = this.loadedEventAttachments[index].Id - if (id == 'add') { + this.loadedEventAttachments[index]['remove'] = true + console.log(id) + this.deletedAttachmentsList.push(id) + + /* if (id == 'add') { this.loadedEventAttachments = this.loadedEventAttachments.filter((e, i) => i != index) } else { this.loadedEventAttachments[index]['remove'] = true console.log(id) this.deletedAttachmentsList.push(id) - } + } */ } @@ -644,6 +606,7 @@ export class EditEventPage implements OnInit { cssClass: 'modal-width-100-width-background modal', componentProps: { type: 'AccoesPresidenciais & ArquivoDespachoElect', + eventAgenda: true, showSearchInput: true, select: true, } @@ -654,7 +617,7 @@ export class EditEventPage implements OnInit { const data = res.data; console.log(data) - const ApplicationIdDocumentToSave: any = { + /* const ApplicationIdDocumentToSave: any = { SourceName: data.selected.Assunto, ParentId: this._postEvent.EventId, SourceId: data.selected.Id, @@ -666,10 +629,24 @@ export class EditEventPage implements OnInit { Source: '1', Link: '', SerialNumber: '', + }*/ + + + let newDocObject: SearchList_v2 = { + docId: data.selected.docId, + sourceName: data.selected.sourceName, + description: data.selected.description, + applicationId: data.selected.applicationId, + classificator: data.selected.classificator, + dateEntry: data.selected.dateEntry, + docNumber: data.selected.docNumber, + subject: data.selected.subject, + userId: data.selected.userId + } - this.loadedEventAttachments.push(ApplicationIdDocumentToSave) - this.addedAttachmentsList.push(ApplicationIdDocumentToSave) + this.loadedEventAttachments.push(data.selected) + this.addedAttachmentsList.push(data.selected) } }); diff --git a/src/app/shared/agenda/new-event/new-event.page.html b/src/app/shared/agenda/new-event/new-event.page.html index 739299f43..31eb8e0c9 100644 --- a/src/app/shared/agenda/new-event/new-event.page.html +++ b/src/app/shared/agenda/new-event/new-event.page.html @@ -390,14 +390,14 @@

- {{document.Assunto}} + {{document.subject}} {{ TaskService.attachmentAppName(document)}} {{document.appName}}

-

{{(document.EntidadeOrganicaNome || document.Sender)}} {{(document.Data || document.DocDate) | date: 'dd-MM-yyyy HH:mm'}}

+

{{(document.EntidadeOrganicaNome || document.Sender)}} {{(document.dateEntry) | date: 'dd-MM-yyyy HH:mm'}}

diff --git a/src/app/shared/agenda/new-event/new-event.page.ts b/src/app/shared/agenda/new-event/new-event.page.ts index 644fac968..a4b3f47a7 100644 --- a/src/app/shared/agenda/new-event/new-event.page.ts +++ b/src/app/shared/agenda/new-event/new-event.page.ts @@ -7,7 +7,7 @@ import { Event } from 'src/app/models/event.model'; import { ModalController } from '@ionic/angular'; import { removeDuplicate } from 'src/plugin/removeDuplicate.js' import { SearchPage } from 'src/app/pages/search/search.page'; -import { SearchList } from "src/app/models/search-document"; +import { SearchList, SearchList_v2 } from "src/app/models/search-document"; import { EventAttachment, EventAttachment_v2 } from 'src/app/models/attachment.model'; import { ToastService } from 'src/app/services/toast.service'; @@ -104,7 +104,7 @@ export class NewEventPage implements OnInit { @Output() cloneAllmobileComponent = new EventEmitter(); @Output() backToChat = new EventEmitter(); - documents: SearchList[] = []; + documents: SearchList_v2[] = []; loggeduser: LoginUserRespose; @ViewChild('picker') picker: any; @@ -424,6 +424,7 @@ export class NewEventPage implements OnInit { cssClass: 'modal-width-100-width-background modal', componentProps: { type: 'AccoesPresidenciais & ArquivoDespachoElect', + eventAgenda: true, showSearchInput: true, select: true } @@ -432,7 +433,15 @@ export class NewEventPage implements OnInit { modal.onDidDismiss().then((res) => { if (res) { const data = res.data; + /* let newDocObject: SearchList_v2 = { + docId: parseInt(data.selected.Id), + sourceName: data.selected.Assunto, + description: "", + applicationId: data.selected.ApplicationType + } */ + console.log('get doc', data) this.documents.push(data.selected); + console.log('pushed') } }); @@ -537,7 +546,7 @@ export class NewEventPage implements OnInit { this.hhtpErrorHandle.httpsSucessMessagge('new event') } - async save() { + /* async save() { this.injectValidation() this.runValidation() @@ -552,9 +561,9 @@ export class NewEventPage implements OnInit { } this.postEvent.Attendees = this.taskParticipants.concat(this.taskParticipantsCc); - this.postEvent.Subject = /* this.domSanitazerService.sanitizeInput( */this.postEvent.Subject/* ); */ - this.postEvent.Location = /* this.domSanitazerService.sanitizeInput( */this.postEvent.Location/* ); */ - this.postEvent.Body.Text = /* this.domSanitazerService.sanitizeInput( */this.postEvent.Body.Text/* ); */ + this.postEvent.Subject = this.postEvent.Subject + this.postEvent.Location = this.postEvent.Location + this.postEvent.Body.Text = this.postEvent.Body.Text @@ -724,20 +733,6 @@ export class NewEventPage implements OnInit { this.hhtpErrorHandle.httpsSucessMessagge('new event to aprove') - - - /* DocumentToSave.forEach((attachments, i) => { - this.attachmentsService.setEventAttachmentById(attachments).subscribe((res) => { - if (DocumentToSave.length == (i + 1)) { - this.afterSave(); - } - }); - }); - - if (DocumentToSave.length == 0) { - this.afterSave(); - } */ - }, (error) => { loader.remove() this.showLoader = false @@ -768,20 +763,6 @@ export class NewEventPage implements OnInit { this.afterSave(); this.hhtpErrorHandle.httpsSucessMessagge('new event to aprove') - - - /* DocumentToSave.forEach((attachments, i) => { - this.attachmentsService.setEventAttachmentById(attachments).subscribe((res) => { - if (DocumentToSave.length == (i + 1)) { - this.afterSave(); - } - }); - }); - - if (DocumentToSave.length == 0) { - this.afterSave(); - } */ - }, (error) => { loader.remove() this.showLoader = false @@ -921,7 +902,7 @@ export class NewEventPage implements OnInit { }); } - } + } */ selectedCalendarId() { diff --git a/src/app/shared/agenda/view-event/view-event.page.html b/src/app/shared/agenda/view-event/view-event.page.html index a370d39df..4c3acd6ac 100644 --- a/src/app/shared/agenda/view-event/view-event.page.html +++ b/src/app/shared/agenda/view-event/view-event.page.html @@ -121,12 +121,12 @@ class="ion-no-margin ion-no-padding pa-0">

- {{attach.SourceName || 'Sem título'}} + {{attach.subject || 'Sem título'}} {{attach.Stakeholders}}

- {{ attach.CreateDate | date: 'dd-MM-yyyy HH:mm' }} + {{ attach.dateEntry | date: 'dd-MM-yyyy HH:mm' }}