From d9b503dc5af7c1d11d1a57716b8672a489b74186 Mon Sep 17 00:00:00 2001 From: Miguel Lehmann Date: Thu, 23 Jan 2025 11:47:13 +0100 Subject: [PATCH] add isBacklogQuarter to quarter min and implement it in the objective menu --- frontend/src/app/services/objective-menu-actions.service.ts | 3 +-- frontend/src/app/shared/types/model/quarter-min.ts | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/services/objective-menu-actions.service.ts b/frontend/src/app/services/objective-menu-actions.service.ts index a86eb9651f..5ba726b11b 100644 --- a/frontend/src/app/services/objective-menu-actions.service.ts +++ b/frontend/src/app/services/objective-menu-actions.service.ts @@ -7,7 +7,6 @@ import { ObjectiveMenuAfterActions } from '../components/objective/objective-men import { ObjectiveService } from './objective.service'; import { RefreshDataService } from './refresh-data.service'; import { ObjectiveMenuActions } from '../components/objective/objective-menu-actions'; -import { GJ_REGEX_PATTERN } from '../shared/constant-library'; import { CompletedService } from './completed.service'; export type ObjectiveMenuAction = () => MatDialogRef; @@ -87,6 +86,6 @@ export class ObjectiveMenuActionsService { } private isInBacklogQuarter(objective: ObjectiveMin) { - return !GJ_REGEX_PATTERN.test(objective.quarter.label); + return !objective.quarter.isBacklogQuarter; } } diff --git a/frontend/src/app/shared/types/model/quarter-min.ts b/frontend/src/app/shared/types/model/quarter-min.ts index 57a32b51a2..bccb72f64c 100644 --- a/frontend/src/app/shared/types/model/quarter-min.ts +++ b/frontend/src/app/shared/types/model/quarter-min.ts @@ -1,4 +1,5 @@ export interface QuarterMin { id: number; label: string; + isBacklogQuarter: boolean; }