diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f90be4ff..ac62bb06c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Renamed `User` to `user` in the `Subscription` database schema +- Migrated the `@ghostfolio/ui/assistant` component to control flow - Migrated the `@ghostfolio/ui/value` component to control flow ### Fixed diff --git a/apps/api/src/services/data-provider/data-provider.service.ts b/apps/api/src/services/data-provider/data-provider.service.ts index 3f02cf109..a4edd5bfa 100644 --- a/apps/api/src/services/data-provider/data-provider.service.ts +++ b/apps/api/src/services/data-provider/data-provider.service.ts @@ -18,6 +18,7 @@ import { DATE_FORMAT, getCurrencyFromSymbol, getStartOfUtcDate, + isCurrency, isDerivedCurrency } from '@ghostfolio/common/helper'; import { @@ -468,17 +469,21 @@ export class DataProviderService { )) { const dataProvider = this.getDataProvider(DataSource[dataSource]); - if ( - dataProvider.getDataProviderInfo().isPremium && - this.configurationService.get('ENABLE_FEATURE_SUBSCRIPTION') && - user?.subscription.type === 'Basic' - ) { - continue; - } - const symbols = assetProfileIdentifiers .filter(({ symbol }) => { - return !isDerivedCurrency(getCurrencyFromSymbol(symbol)); + if (isCurrency(getCurrencyFromSymbol(symbol))) { + // Keep non-derived currencies + return !isDerivedCurrency(getCurrencyFromSymbol(symbol)); + } else if ( + dataProvider.getDataProviderInfo().isPremium && + this.configurationService.get('ENABLE_FEATURE_SUBSCRIPTION') && + user?.subscription.type === 'Basic' + ) { + // Skip symbols of Premium data providers for users without subscription + return false; + } + + return true; }) .map(({ symbol }) => { return symbol; diff --git a/libs/ui/src/lib/assistant/assistant.html b/libs/ui/src/lib/assistant/assistant.html index 33b4db3ff..fa6738532 100644 --- a/libs/ui/src/lib/assistant/assistant.html +++ b/libs/ui/src/lib/assistant/assistant.html @@ -15,28 +15,26 @@ [formControl]="searchFormControl" [placeholder]="placeholder" /> -
- / -
- - + @if (deviceType !== 'mobile' && !searchFormControl.value) { +
/
+ } + @if (searchFormControl.value) { + + } @else { + + }
- -
No entries...
+ @if (isLoading) { + + } @else { +
No entries...
+ }
@@ -72,16 +72,18 @@ (clicked)="onCloseAssistant()" /> - -
No entries...
+ @if (isLoading) { + + } @else { +
No entries...
+ }