mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Improve
This commit is contained in:
@@ -142,6 +142,10 @@ export class EditEventPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
ngOnChanges(changes: any): void {
|
||||
// this.loadedEventAttachments = this.loadedEventAttachments.concat(this.postEvent.Attachments)
|
||||
}
|
||||
|
||||
close() {
|
||||
this.closeComponent.emit();
|
||||
this.setIntervenient.emit([]);
|
||||
@@ -282,7 +286,6 @@ export class EditEventPage implements OnInit {
|
||||
|
||||
async saveDocument() {
|
||||
|
||||
console.log(this.loadedEventAttachments)
|
||||
|
||||
await this.loadedEventAttachments.forEach( async (e)=>{
|
||||
|
||||
@@ -303,10 +306,10 @@ export class EditEventPage implements OnInit {
|
||||
};
|
||||
|
||||
await this.attachmentsService.setEventAttachmentById(DocumentToSave).toPromise();
|
||||
this.getAttachments(this.postEvent.EventId);
|
||||
await this.getAttachments(this.postEvent.EventId);
|
||||
|
||||
} else if(remove) {
|
||||
this.attachmentsService.deleteEventAttachmentById(e.Id).subscribe( res=> {})
|
||||
await this.attachmentsService.deleteEventAttachmentById(e.Id).toPromise()
|
||||
}
|
||||
|
||||
})
|
||||
@@ -365,11 +368,9 @@ export class EditEventPage implements OnInit {
|
||||
window['temp.path:/home/agenda/edit-event.component.ts'] = {}
|
||||
}
|
||||
|
||||
getAttachments(eventId: string){
|
||||
this.attachmentsService.getAttachmentsById(eventId).subscribe(res=>{
|
||||
this.loadedEventAttachments = res;
|
||||
console.log('res', res);
|
||||
});
|
||||
async getAttachments(eventId: string){
|
||||
const rest: any = this.attachmentsService.getAttachmentsById(eventId).toPromise()
|
||||
this.loadedEventAttachments = rest;
|
||||
}
|
||||
|
||||
deleteAttachment(attachmentID: string, index) {
|
||||
|
||||
Reference in New Issue
Block a user