@@ -213,7 +213,7 @@
-
{{document.Stakeholders}} {{document.CreateDate}}
+
{{document.Stakeholders}} {{document.CreateDate | date: 'dd-MM-yy'}}
diff --git a/src/app/shared/agenda/edit-event/edit-event.component.ts b/src/app/shared/agenda/edit-event/edit-event.component.ts
index 1c8110988..b6c24c673 100644
--- a/src/app/shared/agenda/edit-event/edit-event.component.ts
+++ b/src/app/shared/agenda/edit-event/edit-event.component.ts
@@ -184,7 +184,7 @@ export class EditEventComponent implements OnInit {
getAttachments(eventId: string){
this.attachmentsService.getAttachmentsById(eventId).subscribe(res=>{
this.loadedEventAttachments = res;
- console.log('res', res);
+ console.log('res', res);
});
}
@@ -194,7 +194,40 @@ export class EditEventComponent implements OnInit {
res=>{
this.loadedEventAttachments = this.loadedEventAttachments.filter(e=> e.Id.toString() != attachmentID);
})
-
}
+
+ async getDoc() {
+ const modal = await this.modalController.create({
+ component: SearchPage,
+ cssClass: 'group-messages modal-desktop search-modal search-modal-to-desktop',
+ componentProps: {
+ type: 'AccoesPresidenciais & ArquivoDespachoElect'
+ }
+ });
+ await modal.present();
+ modal.onDidDismiss().then( async (res)=>{
+ if(res){
+ const data = res.data;
+ //data.selected
+ const DocumentToSave = {
+ SourceTitle: data.selected.Assunto,
+ ParentId: this.postEvent.EventId,
+ Source: '1',
+ SourceId: data.selected.Id,
+ ApplicationId: data.selected.ApplicationType.toString(),
+ Id: '0',
+ Link: '',
+ SerialNumber: '',
+ };
+
+ await this.attachmentsService.setEventAttachmentById(DocumentToSave).subscribe(()=>{
+ this.getAttachments(this.postEvent.EventId);
+ });
+
+ }
+ });
+ }
+
+
}
diff --git a/src/app/shared/agenda/new-event/new-event.component.html b/src/app/shared/agenda/new-event/new-event.component.html
index 9f723382f..8efe9fa8e 100644
--- a/src/app/shared/agenda/new-event/new-event.component.html
+++ b/src/app/shared/agenda/new-event/new-event.component.html
@@ -194,7 +194,7 @@
-