mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
Improve add attachment
This commit is contained in:
@@ -187,7 +187,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="d-flex container-div width-100 ion-item-container-no-border" >
|
||||
<div (click)="getDoc()" class="d-flex container-div width-100 ion-item-container-no-border" >
|
||||
<ion-label>
|
||||
<div class="attach-icon">
|
||||
<ion-icon src="assets/images/icons-attach-doc.svg"></ion-icon>
|
||||
@@ -213,7 +213,7 @@
|
||||
</span>
|
||||
|
||||
</p>
|
||||
<p><span class="span-left">{{document.Stakeholders}}</span><span class="span-right"> {{document.CreateDate}} </span></p>
|
||||
<p><span class="span-left">{{document.Stakeholders}}</span><span class="span-right"> {{document.CreateDate | date: 'dd-MM-yy'}} </span></p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -194,7 +194,7 @@
|
||||
</ion-label>
|
||||
</div>
|
||||
|
||||
<div class="list" *ngFor="let document of documents; let i = index" >
|
||||
<div class="list " *ngFor="let document of documents; let i = index" >
|
||||
<ion-list>
|
||||
<ion-item>
|
||||
<ion-label>
|
||||
@@ -205,7 +205,7 @@
|
||||
<ion-icon class="font-20" src="assets/images/icons-delete-25.svg"></ion-icon>
|
||||
</span>
|
||||
</p>
|
||||
<p><span class="span-left">{{document.EntidadeOrganicaNome}}</span><span class="span-right"> {{document.Data}} </span></p>
|
||||
<p><span class="span-left">{{document.EntidadeOrganicaNome}}</span><span class="span-right"> {{document.Data | date: 'dd-MM-yy'}} </span></p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
|
||||
@@ -59,12 +59,12 @@
|
||||
</div>
|
||||
<div class="line"></div>
|
||||
|
||||
<div *ngIf="loadedAttachments" class="bottom-content">
|
||||
<div *ngIf="loadedAttachments" class="bottom-content width-100">
|
||||
<h5>Documentos Anexados</h5>
|
||||
<ion-list>
|
||||
<ion-item lines="none" class="ion-no-margin ion-no-padding">
|
||||
<ion-label *ngFor="let attach of loadedAttachments"
|
||||
(click)="viewDocument(attach.SourceId)">
|
||||
<ion-list class="width-100">
|
||||
<ion-item class="width-100" lines="none" class="ion-no-margin ion-no-padding">
|
||||
<ion-label class="width-100" *ngFor="let attach of loadedAttachments"
|
||||
(click)="viewDocument(attach.SourceId)">
|
||||
<p class="attach-title-item">{{attach.SourceName}}</p>
|
||||
<p><span class="span-left">{{attach.Stakeholders}}</span><span class="span-right">{{ attach.CreateDate | date: 'dd-MM-yy' }}</span></p>
|
||||
</ion-label>
|
||||
|
||||
Reference in New Issue
Block a user