From af78b50ac775a029c7d9a931b2d11cfb0b81244b Mon Sep 17 00:00:00 2001 From: Ifycode Date: Wed, 11 Dec 2024 12:59:13 +0100 Subject: [PATCH] Fix: For archive and under review too --- .../src/app/post/post-head/post-head.component.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/apps/web-mzima-client/src/app/post/post-head/post-head.component.ts b/apps/web-mzima-client/src/app/post/post-head/post-head.component.ts index 9be9c779d5..7a000496ea 100644 --- a/apps/web-mzima-client/src/app/post/post-head/post-head.component.ts +++ b/apps/web-mzima-client/src/app/post/post-head/post-head.component.ts @@ -72,7 +72,10 @@ export class PostHeadComponent extends BaseComponent implements OnInit { underReview() { this.postsService.updateStatus(this.post.id, PostStatus.Draft).subscribe((res) => { this.post = res.result; - this.statusChanged.emit(); + this.eventBusService.next({ + type: EventType.StatusChange, + payload: this.post, + }); }); } @@ -103,7 +106,10 @@ export class PostHeadComponent extends BaseComponent implements OnInit { archive() { this.postsService.updateStatus(this.post.id, PostStatus.Archived).subscribe((res) => { this.post = res.result; - this.statusChanged.emit(); + this.eventBusService.next({ + type: EventType.StatusChange, + payload: this.post, + }); }); }