From 6eb1217e78831fd6d9134fd1bee1af5cc66d9778 Mon Sep 17 00:00:00 2001 From: Yanick Minder Date: Tue, 5 Nov 2024 10:15:07 +0100 Subject: [PATCH] display correct options for draft and use replay subject --- .../src/app/components/objective/objective.component.html | 2 -- frontend/src/app/components/objective/objective.component.ts | 4 ++-- frontend/src/app/services/objective-menu-actions.service.ts | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/frontend/src/app/components/objective/objective.component.html b/frontend/src/app/components/objective/objective.component.html index f7c1a03f97..6d6e8115dc 100644 --- a/frontend/src/app/components/objective/objective.component.html +++ b/frontend/src/app/components/objective/objective.component.html @@ -1,5 +1,3 @@ -test -
(); + public objective$ = new ReplaySubject(); menuEntries = this.objective$.pipe(map((objective) => this.objectiveMenuActionsService.getMenu(objective))); protected readonly trackByFn = trackByFn; diff --git a/frontend/src/app/services/objective-menu-actions.service.ts b/frontend/src/app/services/objective-menu-actions.service.ts index 2057c8d3a3..d79d961d2f 100644 --- a/frontend/src/app/services/objective-menu-actions.service.ts +++ b/frontend/src/app/services/objective-menu-actions.service.ts @@ -55,7 +55,7 @@ export class ObjectiveMenuActionsService { } private getDraftMenuActions(objective: ObjectiveMin): ObjectiveMenuEntry[] { - return [this.getReleaseAction(objective)]; + return [this.getReleaseAction(objective), this.actions.editObjectiveAction(objective)]; } private getOngoingMenuActions(objective: ObjectiveMin): ObjectiveMenuEntry[] {