From 72141bdc3eab991bb0c632267a755f5562a22679 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Thu, 6 Aug 2026 11:35:11 +0200 Subject: [PATCH] Refactoring --- apps/api/src/helper/activity.helper.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/apps/api/src/helper/activity.helper.ts b/apps/api/src/helper/activity.helper.ts index a1e011cf0..07748a8bf 100644 --- a/apps/api/src/helper/activity.helper.ts +++ b/apps/api/src/helper/activity.helper.ts @@ -1,12 +1,8 @@ +import { NON_INVESTMENT_ACTIVITY_TYPES } from '@ghostfolio/common/config'; + import { Type as ActivityType } from '@prisma/client'; import { endOfToday, isAfter } from 'date-fns'; -const ACTIVITY_TYPES_NEVER_DRAFT: ActivityType[] = [ - 'FEE', - 'INTEREST', - 'LIABILITY' -]; - export function isDraftTagToBeAssigned({ date, endOfTodayDate = endOfToday(), @@ -18,7 +14,7 @@ export function isDraftTagToBeAssigned({ storedDate?: Date; type: ActivityType; }) { - if (ACTIVITY_TYPES_NEVER_DRAFT.includes(type)) { + if (NON_INVESTMENT_ACTIVITY_TYPES.includes(type)) { return false; }