OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Fire event for removed attachment only when after it is actually deleted
Henriette Dargee7a93751451e
diff --git a/frontend/src/app/shared/components/attachments/attachment-list/attachment-list.component.ts b/frontend/src/app/shared/components/attachments/attachment-list/attachment-list.component.tsindex d5dd582204f..f8cba9b772e 100644--- a/frontend/src/app/shared/components/attachments/attachment-list/attachment-list.component.ts+++ b/frontend/src/app/shared/components/attachments/attachment-list/attachment-list.component.ts@@ -31,7 +31,6 @@ import {Component,EventEmitter,Input,- OnInit,Output,} from '@angular/core';import { IAttachment } from 'core-app/core/state/attachments/attachment.model';@@ -43,7 +42,7 @@ import { AttachmentsResourceService } from 'core-app/core/state/attachments/attatemplateUrl: './attachment-list.component.html',changeDetection: ChangeDetectionStrategy.OnPush,})-export class OpAttachmentListComponent extends UntilDestroyedMixin implements OnInit {+export class OpAttachmentListComponent extends UntilDestroyedMixin {@Input() public attachments:IAttachment[] = [];@Input() public collectionKey:string;@@ -58,11 +57,9 @@ export class OpAttachmentListComponent extends UntilDestroyedMixin implements Onsuper();}- ngOnInit():void {- }-public removeAttachment(attachment:IAttachment):void {- this.attachmentsResourceService.removeAttachment(this.collectionKey, attachment).subscribe();- this.attachmentRemoved.emit();+ this.attachmentsResourceService.removeAttachment(this.collectionKey, attachment).subscribe(() => {+ this.attachmentRemoved.emit();+ });}}