From 116357b797248117c10b5c94acb5dd5b4ca7cc8d Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Wed, 17 Jun 2026 20:26:26 +0200 Subject: [PATCH 1/4] Task/move referral partners to database (#7060) * Move referral partners to database --- apps/api/src/app/user/user.service.ts | 14 ++++++++++++++ .../app/pages/pricing/pricing-page.component.ts | 14 -------------- .../client/src/app/pages/pricing/pricing-page.html | 10 +++++----- libs/common/src/lib/config.ts | 1 + libs/common/src/lib/interfaces/index.ts | 2 ++ .../lib/interfaces/referral-partner.interface.ts | 3 +++ libs/common/src/lib/interfaces/user.interface.ts | 2 ++ 7 files changed, 27 insertions(+), 19 deletions(-) create mode 100644 libs/common/src/lib/interfaces/referral-partner.interface.ts diff --git a/apps/api/src/app/user/user.service.ts b/apps/api/src/app/user/user.service.ts index 9d8d9da9d..6d6041c81 100644 --- a/apps/api/src/app/user/user.service.ts +++ b/apps/api/src/app/user/user.service.ts @@ -29,6 +29,7 @@ import { DEFAULT_DATE_RANGE, DEFAULT_LANGUAGE_CODE, PROPERTY_IS_READ_ONLY_MODE, + PROPERTY_REFERRAL_PARTNERS, PROPERTY_SYSTEM_MESSAGE, TAG_ID_EXCLUDE_FROM_ANALYSIS, locale as defaultLocale @@ -36,6 +37,7 @@ import { import { SubscriptionType } from '@ghostfolio/common/enums'; import { User as IUser, + ReferralPartner, SystemMessage, UserSettings } from '@ghostfolio/common/interfaces'; @@ -153,6 +155,17 @@ export class UserService { (impersonationUserSettings?.settings as UserSettings)?.baseCurrency ?? (settings.settings as UserSettings)?.baseCurrency; + let referralPartners: ReferralPartner[]; + + if ( + this.configurationService.get('ENABLE_FEATURE_SUBSCRIPTION') && + subscription.type === SubscriptionType.Basic + ) { + referralPartners = await this.propertyService.getByKey( + PROPERTY_REFERRAL_PARTNERS + ); + } + let systemMessage: SystemMessage; const systemMessageProperty = @@ -179,6 +192,7 @@ export class UserService { activitiesCount, id, permissions, + referralPartners, subscription, systemMessage, tags, diff --git a/apps/client/src/app/pages/pricing/pricing-page.component.ts b/apps/client/src/app/pages/pricing/pricing-page.component.ts index a1fe0c0b5..c0e3848bb 100644 --- a/apps/client/src/app/pages/pricing/pricing-page.component.ts +++ b/apps/client/src/app/pages/pricing/pricing-page.component.ts @@ -68,20 +68,6 @@ export class GfPricingPageComponent implements OnInit { 'PROFESSIONAL_DATA_PROVIDER_TOOLTIP_PREMIUM' ); - protected readonly referralBrokers = [ - 'Alpian', - 'DEGIRO', - 'finpension', - 'frankly', - 'Interactive Brokers', - 'Mintos', - 'Monefit SmartSaver', - 'Revolut', - 'Swissquote', - 'VIAC', - 'Zak' - ] as const; - protected readonly routerLinkFeatures = publicRoutes.features.routerLink; protected readonly routerLinkRegister = publicRoutes.register.routerLink; protected user: User; diff --git a/apps/client/src/app/pages/pricing/pricing-page.html b/apps/client/src/app/pages/pricing/pricing-page.html index b951baa98..23693457c 100644 --- a/apps/client/src/app/pages/pricing/pricing-page.html +++ b/apps/client/src/app/pages/pricing/pricing-page.html @@ -305,23 +305,23 @@ - @if (user?.subscription?.type === 'Basic') { + @if (user?.referralPartners?.length) {

If you plan to open an account at   @for ( - broker of referralBrokers; - track broker; + partner of user.referralPartners; + track partner.name; let i = $index; let last = $last ) { - {{ broker }} + {{ partner.name }} @if (last) { , } @else { - @if (i === referralBrokers.length - 2) { + @if (i === user.referralPartners.length - 2) {   or   diff --git a/libs/common/src/lib/config.ts b/libs/common/src/lib/config.ts index 7e7cd2ba5..3e7fbe6df 100644 --- a/libs/common/src/lib/config.ts +++ b/libs/common/src/lib/config.ts @@ -253,6 +253,7 @@ export const PROPERTY_IS_READ_ONLY_MODE = 'IS_READ_ONLY_MODE'; export const PROPERTY_IS_USER_SIGNUP_ENABLED = 'IS_USER_SIGNUP_ENABLED'; export const PROPERTY_OPENROUTER_MODEL = 'OPENROUTER_MODEL'; export const PROPERTY_OPENROUTER_MODEL_WEB_FETCH = 'OPENROUTER_MODEL_WEB_FETCH'; +export const PROPERTY_REFERRAL_PARTNERS = 'REFERRAL_PARTNERS'; export const PROPERTY_SLACK_COMMUNITY_USERS = 'SLACK_COMMUNITY_USERS'; export const PROPERTY_STRIPE_CONFIG = 'STRIPE_CONFIG'; export const PROPERTY_SYSTEM_MESSAGE = 'SYSTEM_MESSAGE'; diff --git a/libs/common/src/lib/interfaces/index.ts b/libs/common/src/lib/interfaces/index.ts index 8b8ec875c..6c076514c 100644 --- a/libs/common/src/lib/interfaces/index.ts +++ b/libs/common/src/lib/interfaces/index.ts @@ -38,6 +38,7 @@ import type { PortfolioPosition } from './portfolio-position.interface'; import type { PortfolioReportRule } from './portfolio-report-rule.interface'; import type { PortfolioSummary } from './portfolio-summary.interface'; import type { Product } from './product'; +import type { ReferralPartner } from './referral-partner.interface'; import type { AccessTokenResponse } from './responses/access-token-response.interface'; import type { AccountBalancesResponse } from './responses/account-balances-response.interface'; import type { AccountResponse } from './responses/account-response.interface'; @@ -181,6 +182,7 @@ export { PublicKeyCredentialRequestOptionsJSON, PublicPortfolioResponse, QuotesResponse, + ReferralPartner, ResponseError, RuleSettings, ScraperConfiguration, diff --git a/libs/common/src/lib/interfaces/referral-partner.interface.ts b/libs/common/src/lib/interfaces/referral-partner.interface.ts new file mode 100644 index 000000000..435070fa5 --- /dev/null +++ b/libs/common/src/lib/interfaces/referral-partner.interface.ts @@ -0,0 +1,3 @@ +export interface ReferralPartner { + name: string; +} diff --git a/libs/common/src/lib/interfaces/user.interface.ts b/libs/common/src/lib/interfaces/user.interface.ts index e60f01915..619d4ee71 100644 --- a/libs/common/src/lib/interfaces/user.interface.ts +++ b/libs/common/src/lib/interfaces/user.interface.ts @@ -3,6 +3,7 @@ import { AccountWithPlatform } from '@ghostfolio/common/types'; import { Access, Tag } from '@prisma/client'; +import { ReferralPartner } from './referral-partner.interface'; import { SubscriptionOffer } from './subscription-offer.interface'; import { SystemMessage } from './system-message.interface'; import { UserSettings } from './user-settings.interface'; @@ -15,6 +16,7 @@ export interface User { dateOfFirstActivity: Date; id: string; permissions: string[]; + referralPartners?: ReferralPartner[]; settings: UserSettings; systemMessage?: SystemMessage; subscription: { From bab02b3d68d71c9c14464b32b860d69099908e4f Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Wed, 17 Jun 2026 20:27:00 +0200 Subject: [PATCH 2/4] Task/deprecate SymbolProfile in favor of assetProfile in get holding endpoint (#7054) * Deprecate SymbolProfile in favor of assetProfile * Update changelog --- CHANGELOG.md | 1 + apps/api/src/app/portfolio/portfolio.service.ts | 12 ++++++++++++ ...nsform-data-source-in-response.interceptor.ts | 1 + .../portfolio-holding-response.interface.ts | 16 ++++++++++++++++ 4 files changed, 30 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ea139fc0..9abb2bc2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Improved the account name display in the accounts table - Improved the name display in the activities table - Improved the user id display in the users table of the admin control panel +- Deprecated `SymbolProfile` in favor of `assetProfile` in the endpoint `GET api/v1/portfolio/holding/:dataSource/:symbol` - Improved the language localization for German (`de`) - Upgraded `svgmap` from version `2.19.3` to `2.21.0` diff --git a/apps/api/src/app/portfolio/portfolio.service.ts b/apps/api/src/app/portfolio/portfolio.service.ts index 24d760888..c15353521 100644 --- a/apps/api/src/app/portfolio/portfolio.service.ts +++ b/apps/api/src/app/portfolio/portfolio.service.ts @@ -957,6 +957,18 @@ export class PortfolioService { marketPriceMin, SymbolProfile, tags, + assetProfile: { + assetClass: SymbolProfile.assetClass, + assetSubClass: SymbolProfile.assetSubClass, + countries: SymbolProfile.countries, + currency: SymbolProfile.currency, + dataSource: SymbolProfile.dataSource, + isin: SymbolProfile.isin, + name: SymbolProfile.name, + sectors: SymbolProfile.sectors, + symbol: SymbolProfile.symbol, + userId: SymbolProfile.userId + }, averagePrice: averagePrice.toNumber(), dataProviderInfo: portfolioCalculator.getDataProviderInfos()?.[0], dividendInBaseCurrency: dividendInBaseCurrency.toNumber(), diff --git a/apps/api/src/interceptors/transform-data-source-in-response/transform-data-source-in-response.interceptor.ts b/apps/api/src/interceptors/transform-data-source-in-response/transform-data-source-in-response.interceptor.ts index 57643f76c..fb8ff5dc5 100644 --- a/apps/api/src/interceptors/transform-data-source-in-response/transform-data-source-in-response.interceptor.ts +++ b/apps/api/src/interceptors/transform-data-source-in-response/transform-data-source-in-response.interceptor.ts @@ -64,6 +64,7 @@ export class TransformDataSourceInResponseInterceptor< paths: [ 'activities[*].dataSource', 'activities[*].SymbolProfile.dataSource', + 'assetProfile.dataSource', 'benchmarks[*].dataSource', 'errors[*].dataSource', 'fearAndGreedIndex.CRYPTOCURRENCIES.dataSource', diff --git a/libs/common/src/lib/interfaces/responses/portfolio-holding-response.interface.ts b/libs/common/src/lib/interfaces/responses/portfolio-holding-response.interface.ts index 76bc7dc02..3b07666c9 100644 --- a/libs/common/src/lib/interfaces/responses/portfolio-holding-response.interface.ts +++ b/libs/common/src/lib/interfaces/responses/portfolio-holding-response.interface.ts @@ -9,6 +9,19 @@ import { Tag } from '@prisma/client'; export interface PortfolioHoldingResponse { activitiesCount: number; + assetProfile: Pick< + EnhancedSymbolProfile, + | 'assetClass' + | 'assetSubClass' + | 'countries' + | 'currency' + | 'dataSource' + | 'isin' + | 'name' + | 'sectors' + | 'symbol' + | 'userId' + >; averagePrice: number; dataProviderInfo: DataProviderInfo; dateOfFirstActivity: string; @@ -31,7 +44,10 @@ export interface PortfolioHoldingResponse { netPerformanceWithCurrencyEffect: number; performances: Benchmark['performances']; quantity: number; + + /* @deprecated */ SymbolProfile: EnhancedSymbolProfile; + tags: Tag[]; value: number; } From ce286ab31495e19df62187100f1660196397363d Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Wed, 17 Jun 2026 20:37:53 +0200 Subject: [PATCH 3/4] Task/improve registration and last activity display in admin users component (#7062) * Improve display of registration and last activity * Update changelog --- CHANGELOG.md | 2 ++ apps/client/src/app/components/admin-users/admin-users.html | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9abb2bc2b..e520ba51a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Improved the styling of the checkboxes to consistently use the primary color in their states - Improved the account name display in the accounts table - Improved the name display in the activities table +- Improved the last activity display in the users table of the admin control panel +- Improved the registration display in the users table of the admin control panel - Improved the user id display in the users table of the admin control panel - Deprecated `SymbolProfile` in favor of `assetProfile` in the endpoint `GET api/v1/portfolio/holding/:dataSource/:symbol` - Improved the language localization for German (`de`) diff --git a/apps/client/src/app/components/admin-users/admin-users.html b/apps/client/src/app/components/admin-users/admin-users.html index 0899c57d1..be9bb377d 100644 --- a/apps/client/src/app/components/admin-users/admin-users.html +++ b/apps/client/src/app/components/admin-users/admin-users.html @@ -77,7 +77,7 @@ {{ formatDistanceToNow(element.createdAt) }} @@ -183,7 +183,7 @@ {{ formatDistanceToNow(element.lastActivity) }} From efbfb6bf9c5c9e793b4f1d9ae57b05a0f8f8e88a Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Wed, 17 Jun 2026 20:40:04 +0200 Subject: [PATCH 4/4] Release 3.12.0 (#7063) --- CHANGELOG.md | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e520ba51a..f6a2a9a94 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## Unreleased +## 3.12.0 - 2026-06-17 ### Changed diff --git a/package-lock.json b/package-lock.json index 81e002229..7afc46fd8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "ghostfolio", - "version": "3.11.0", + "version": "3.12.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ghostfolio", - "version": "3.11.0", + "version": "3.12.0", "hasInstallScript": true, "license": "AGPL-3.0", "dependencies": { diff --git a/package.json b/package.json index e8ae2286c..f6f31747b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ghostfolio", - "version": "3.11.0", + "version": "3.12.0", "homepage": "https://ghostfol.io", "license": "AGPL-3.0", "repository": "https://github.com/ghostfolio/ghostfolio",