diff --git a/CHANGELOG.md b/CHANGELOG.md index 221a6881f..328d7749e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,10 +7,33 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +### Changed + +- Improved the error message of the currency code validation +- Tightened the currency code validation by requiring uppercase letters + +### Fixed + +- Improved the file selector of the activities import functionality to accept case-insensitive file extensions (`.CSV` and `.JSON`) + +## 2.155.0 - 2025-04-23 + ### Added - Added the endpoints (`DELETE`, `GET` and `POST`) for the watchlist +### Changed + +- Simplified the data source check in the DTO of the activity creation +- Simplified the data source check in the DTO of the asset profile update +- 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 + +- Fixed an issue in the settings dialog to customize the rule thresholds of the _X-ray_ page (experimental) + ## 2.154.0 - 2025-04-21 ### Added diff --git a/apps/api/src/app/admin/update-asset-profile.dto.ts b/apps/api/src/app/admin/update-asset-profile.dto.ts index 45923410a..5056dccdb 100644 --- a/apps/api/src/app/admin/update-asset-profile.dto.ts +++ b/apps/api/src/app/admin/update-asset-profile.dto.ts @@ -32,7 +32,7 @@ export class UpdateAssetProfileDto { @IsOptional() currency?: string; - @IsEnum(DataSource, { each: true }) + @IsEnum(DataSource) @IsOptional() dataSource?: DataSource; diff --git a/apps/api/src/app/import/import.service.ts b/apps/api/src/app/import/import.service.ts index babe7c3e3..b6fe0d949 100644 --- a/apps/api/src/app/import/import.service.ts +++ b/apps/api/src/app/import/import.service.ts @@ -167,9 +167,9 @@ export class ImportService { for (const account of accountsDto) { // Check if there is any existing account with the same ID - const accountWithSameId = existingAccounts.find( - (existingAccount) => existingAccount.id === account.id - ); + const accountWithSameId = existingAccounts.find((existingAccount) => { + return existingAccount.id === account.id; + }); // If there is no account or if the account belongs to a different user then create a new account if (!accountWithSameId || accountWithSameId.userId !== user.id) { diff --git a/apps/api/src/app/order/create-order.dto.ts b/apps/api/src/app/order/create-order.dto.ts index f40e65ba1..c2b10fd81 100644 --- a/apps/api/src/app/order/create-order.dto.ts +++ b/apps/api/src/app/order/create-order.dto.ts @@ -49,7 +49,7 @@ export class CreateOrderDto { @IsOptional() customCurrency?: string; - @IsEnum(DataSource, { each: true }) + @IsEnum(DataSource) @IsOptional() dataSource?: DataSource; diff --git a/apps/api/src/app/subscription/subscription.service.ts b/apps/api/src/app/subscription/subscription.service.ts index f95334684..063c40608 100644 --- a/apps/api/src/app/subscription/subscription.service.ts +++ b/apps/api/src/app/subscription/subscription.service.ts @@ -122,7 +122,7 @@ export class SubscriptionService { data: { expiresAt, price, - User: { + user: { connect: { id: userId } 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/apps/api/src/validators/is-currency-code.ts b/apps/api/src/validators/is-currency-code.ts index 34a82c481..d04da7808 100644 --- a/apps/api/src/validators/is-currency-code.ts +++ b/apps/api/src/validators/is-currency-code.ts @@ -25,19 +25,24 @@ export class IsExtendedCurrencyConstraint implements ValidatorConstraintInterface { public defaultMessage() { - return '$value must be a valid ISO4217 currency code'; + return '$property must be a valid ISO4217 currency code'; } public validate(currency: any) { // Return true if currency is a standard ISO 4217 code or a derived currency return ( - isISO4217CurrencyCode(currency) || - [ - ...DERIVED_CURRENCIES.map((derivedCurrency) => { - return derivedCurrency.currency; - }), - 'USX' - ].includes(currency) + this.isUpperCase(currency) && + (isISO4217CurrencyCode(currency) || + [ + ...DERIVED_CURRENCIES.map((derivedCurrency) => { + return derivedCurrency.currency; + }), + 'USX' + ].includes(currency)) ); } + + private isUpperCase(aString: string) { + return aString === aString?.toUpperCase(); + } } diff --git a/apps/client/src/app/components/rule/rule-settings-dialog/rule-settings-dialog.component.ts b/apps/client/src/app/components/rule/rule-settings-dialog/rule-settings-dialog.component.ts index b57bcb0fd..7ee9c66cf 100644 --- a/apps/client/src/app/components/rule/rule-settings-dialog/rule-settings-dialog.component.ts +++ b/apps/client/src/app/components/rule/rule-settings-dialog/rule-settings-dialog.component.ts @@ -1,5 +1,6 @@ import { XRayRulesSettings } from '@ghostfolio/common/interfaces'; +import { CommonModule } from '@angular/common'; import { Component, Inject } from '@angular/core'; import { FormsModule } from '@angular/forms'; import { MatButtonModule } from '@angular/material/button'; @@ -13,7 +14,13 @@ import { MatSliderModule } from '@angular/material/slider'; import { IRuleSettingsDialogParams } from './interfaces/interfaces'; @Component({ - imports: [FormsModule, MatButtonModule, MatDialogModule, MatSliderModule], + imports: [ + CommonModule, + FormsModule, + MatButtonModule, + MatDialogModule, + MatSliderModule + ], selector: 'gf-rule-settings-dialog', styleUrls: ['./rule-settings-dialog.scss'], templateUrl: './rule-settings-dialog.html' diff --git a/apps/client/src/app/pages/portfolio/activities/import-activities-dialog/import-activities-dialog.component.ts b/apps/client/src/app/pages/portfolio/activities/import-activities-dialog/import-activities-dialog.component.ts index 82e78a180..20f135801 100644 --- a/apps/client/src/app/pages/portfolio/activities/import-activities-dialog/import-activities-dialog.component.ts +++ b/apps/client/src/app/pages/portfolio/activities/import-activities-dialog/import-activities-dialog.component.ts @@ -247,9 +247,10 @@ export class ImportActivitiesDialog implements OnDestroy { reader.onload = async (readerEvent) => { const fileContent = readerEvent.target.result as string; + const fileExtension = file.name.split('.').pop()?.toLowerCase(); try { - if (file.name.endsWith('.json')) { + if (fileExtension === 'json') { const content = JSON.parse(fileContent); this.accounts = content.accounts; @@ -294,7 +295,7 @@ export class ImportActivitiesDialog implements OnDestroy { } return; - } else if (file.name.endsWith('.csv')) { + } else if (fileExtension === 'csv') { const content = fileContent.split('\n').slice(1); try { diff --git a/apps/client/src/locales/messages.ca.xlf b/apps/client/src/locales/messages.ca.xlf index 41a5e9078..456e15790 100644 --- a/apps/client/src/locales/messages.ca.xlf +++ b/apps/client/src/locales/messages.ca.xlf @@ -1003,7 +1003,7 @@ libs/ui/src/lib/assistant/assistant.html - 46 + 44 @@ -1603,7 +1603,7 @@ libs/ui/src/lib/assistant/assistant.html - 166 + 168 @@ -4639,7 +4639,7 @@ libs/ui/src/lib/assistant/assistant.html - 107 + 109 @@ -4739,7 +4739,7 @@ libs/ui/src/lib/assistant/assistant.html - 127 + 129 @@ -6035,11 +6035,11 @@ No entries... libs/ui/src/lib/assistant/assistant.html - 63 + 62 libs/ui/src/lib/assistant/assistant.html - 84 + 85 @@ -6055,7 +6055,7 @@ Date Range libs/ui/src/lib/assistant/assistant.html - 93 + 95 @@ -6063,7 +6063,7 @@ Reset Filters libs/ui/src/lib/assistant/assistant.html - 185 + 187 @@ -6071,7 +6071,7 @@ Apply Filters libs/ui/src/lib/assistant/assistant.html - 195 + 197 @@ -7473,7 +7473,7 @@ Tag libs/ui/src/lib/assistant/assistant.html - 155 + 157 diff --git a/apps/client/src/locales/messages.de.xlf b/apps/client/src/locales/messages.de.xlf index 1cc922c39..10f26cddb 100644 --- a/apps/client/src/locales/messages.de.xlf +++ b/apps/client/src/locales/messages.de.xlf @@ -1666,7 +1666,7 @@ libs/ui/src/lib/assistant/assistant.html - 107 + 109 @@ -2186,7 +2186,7 @@ libs/ui/src/lib/assistant/assistant.html - 46 + 44 @@ -2314,7 +2314,7 @@ libs/ui/src/lib/assistant/assistant.html - 166 + 168 @@ -3358,7 +3358,7 @@ libs/ui/src/lib/assistant/assistant.html - 127 + 129 @@ -5963,11 +5963,11 @@ Keine Einträge vorhanden... libs/ui/src/lib/assistant/assistant.html - 63 + 62 libs/ui/src/lib/assistant/assistant.html - 84 + 85 @@ -6183,7 +6183,7 @@ Zeitraum libs/ui/src/lib/assistant/assistant.html - 93 + 95 @@ -6383,7 +6383,7 @@ Filter zurücksetzen libs/ui/src/lib/assistant/assistant.html - 185 + 187 @@ -6407,7 +6407,7 @@ Filter anwenden libs/ui/src/lib/assistant/assistant.html - 195 + 197 @@ -7497,7 +7497,7 @@ Tag libs/ui/src/lib/assistant/assistant.html - 155 + 157 diff --git a/apps/client/src/locales/messages.es.xlf b/apps/client/src/locales/messages.es.xlf index 555c95ac1..8ba704729 100644 --- a/apps/client/src/locales/messages.es.xlf +++ b/apps/client/src/locales/messages.es.xlf @@ -1651,7 +1651,7 @@ libs/ui/src/lib/assistant/assistant.html - 107 + 109 @@ -2171,7 +2171,7 @@ libs/ui/src/lib/assistant/assistant.html - 46 + 44 @@ -2299,7 +2299,7 @@ libs/ui/src/lib/assistant/assistant.html - 166 + 168 @@ -3343,7 +3343,7 @@ libs/ui/src/lib/assistant/assistant.html - 127 + 129 @@ -5940,11 +5940,11 @@ No entries... libs/ui/src/lib/assistant/assistant.html - 63 + 62 libs/ui/src/lib/assistant/assistant.html - 84 + 85 @@ -6160,7 +6160,7 @@ Date Range libs/ui/src/lib/assistant/assistant.html - 93 + 95 @@ -6360,7 +6360,7 @@ Reiniciar filtros libs/ui/src/lib/assistant/assistant.html - 185 + 187 @@ -6384,7 +6384,7 @@ Aplicar filtros libs/ui/src/lib/assistant/assistant.html - 195 + 197 @@ -7474,7 +7474,7 @@ Tag libs/ui/src/lib/assistant/assistant.html - 155 + 157 diff --git a/apps/client/src/locales/messages.fr.xlf b/apps/client/src/locales/messages.fr.xlf index fa1007391..78893b590 100644 --- a/apps/client/src/locales/messages.fr.xlf +++ b/apps/client/src/locales/messages.fr.xlf @@ -654,7 +654,7 @@ libs/ui/src/lib/assistant/assistant.html - 166 + 168 @@ -1906,7 +1906,7 @@ libs/ui/src/lib/assistant/assistant.html - 107 + 109 @@ -2798,7 +2798,7 @@ libs/ui/src/lib/assistant/assistant.html - 46 + 44 @@ -3342,7 +3342,7 @@ libs/ui/src/lib/assistant/assistant.html - 127 + 129 @@ -5939,11 +5939,11 @@ Pas d’entrées ... libs/ui/src/lib/assistant/assistant.html - 63 + 62 libs/ui/src/lib/assistant/assistant.html - 84 + 85 @@ -6159,7 +6159,7 @@ Intervalle de Date libs/ui/src/lib/assistant/assistant.html - 93 + 95 @@ -6359,7 +6359,7 @@ Réinitialiser les Filtres libs/ui/src/lib/assistant/assistant.html - 185 + 187 @@ -6383,7 +6383,7 @@ Appliquer les Filtres libs/ui/src/lib/assistant/assistant.html - 195 + 197 @@ -7473,7 +7473,7 @@ Étiquette libs/ui/src/lib/assistant/assistant.html - 155 + 157 diff --git a/apps/client/src/locales/messages.it.xlf b/apps/client/src/locales/messages.it.xlf index 081535681..c8c1a086d 100644 --- a/apps/client/src/locales/messages.it.xlf +++ b/apps/client/src/locales/messages.it.xlf @@ -1651,7 +1651,7 @@ libs/ui/src/lib/assistant/assistant.html - 107 + 109 @@ -2171,7 +2171,7 @@ libs/ui/src/lib/assistant/assistant.html - 46 + 44 @@ -2299,7 +2299,7 @@ libs/ui/src/lib/assistant/assistant.html - 166 + 168 @@ -3343,7 +3343,7 @@ libs/ui/src/lib/assistant/assistant.html - 127 + 129 @@ -5940,11 +5940,11 @@ Nessun risultato... libs/ui/src/lib/assistant/assistant.html - 63 + 62 libs/ui/src/lib/assistant/assistant.html - 84 + 85 @@ -6160,7 +6160,7 @@ Intervallo di date libs/ui/src/lib/assistant/assistant.html - 93 + 95 @@ -6360,7 +6360,7 @@ Reset Filtri libs/ui/src/lib/assistant/assistant.html - 185 + 187 @@ -6384,7 +6384,7 @@ Applica i Filtri libs/ui/src/lib/assistant/assistant.html - 195 + 197 @@ -7474,7 +7474,7 @@ Tag libs/ui/src/lib/assistant/assistant.html - 155 + 157 diff --git a/apps/client/src/locales/messages.nl.xlf b/apps/client/src/locales/messages.nl.xlf index 6852f7260..7c5066ad6 100644 --- a/apps/client/src/locales/messages.nl.xlf +++ b/apps/client/src/locales/messages.nl.xlf @@ -1650,7 +1650,7 @@ libs/ui/src/lib/assistant/assistant.html - 107 + 109 @@ -2170,7 +2170,7 @@ libs/ui/src/lib/assistant/assistant.html - 46 + 44 @@ -2298,7 +2298,7 @@ libs/ui/src/lib/assistant/assistant.html - 166 + 168 @@ -3342,7 +3342,7 @@ libs/ui/src/lib/assistant/assistant.html - 127 + 129 @@ -5939,11 +5939,11 @@ No entries... libs/ui/src/lib/assistant/assistant.html - 63 + 62 libs/ui/src/lib/assistant/assistant.html - 84 + 85 @@ -6159,7 +6159,7 @@ Date Range libs/ui/src/lib/assistant/assistant.html - 93 + 95 @@ -6359,7 +6359,7 @@ Reset Filters libs/ui/src/lib/assistant/assistant.html - 185 + 187 @@ -6383,7 +6383,7 @@ Apply Filters libs/ui/src/lib/assistant/assistant.html - 195 + 197 @@ -7473,7 +7473,7 @@ Tag libs/ui/src/lib/assistant/assistant.html - 155 + 157 diff --git a/apps/client/src/locales/messages.pl.xlf b/apps/client/src/locales/messages.pl.xlf index e7c42b11b..4970c3d53 100644 --- a/apps/client/src/locales/messages.pl.xlf +++ b/apps/client/src/locales/messages.pl.xlf @@ -1495,7 +1495,7 @@ libs/ui/src/lib/assistant/assistant.html - 166 + 168 @@ -4251,7 +4251,7 @@ libs/ui/src/lib/assistant/assistant.html - 107 + 109 @@ -4351,7 +4351,7 @@ libs/ui/src/lib/assistant/assistant.html - 127 + 129 @@ -4751,7 +4751,7 @@ libs/ui/src/lib/assistant/assistant.html - 46 + 44 @@ -5499,11 +5499,11 @@ Brak wpisów... libs/ui/src/lib/assistant/assistant.html - 63 + 62 libs/ui/src/lib/assistant/assistant.html - 84 + 85 @@ -6159,7 +6159,7 @@ Zakres Dat libs/ui/src/lib/assistant/assistant.html - 93 + 95 @@ -6359,7 +6359,7 @@ Resetuj Filtry libs/ui/src/lib/assistant/assistant.html - 185 + 187 @@ -6383,7 +6383,7 @@ Zastosuj Filtry libs/ui/src/lib/assistant/assistant.html - 195 + 197 @@ -7473,7 +7473,7 @@ Tag libs/ui/src/lib/assistant/assistant.html - 155 + 157 diff --git a/apps/client/src/locales/messages.pt.xlf b/apps/client/src/locales/messages.pt.xlf index 414bacda8..84a3a0061 100644 --- a/apps/client/src/locales/messages.pt.xlf +++ b/apps/client/src/locales/messages.pt.xlf @@ -654,7 +654,7 @@ libs/ui/src/lib/assistant/assistant.html - 166 + 168 @@ -1890,7 +1890,7 @@ libs/ui/src/lib/assistant/assistant.html - 107 + 109 @@ -2694,7 +2694,7 @@ libs/ui/src/lib/assistant/assistant.html - 46 + 44 @@ -3342,7 +3342,7 @@ libs/ui/src/lib/assistant/assistant.html - 127 + 129 @@ -5939,11 +5939,11 @@ No entries... libs/ui/src/lib/assistant/assistant.html - 63 + 62 libs/ui/src/lib/assistant/assistant.html - 84 + 85 @@ -6159,7 +6159,7 @@ Date Range libs/ui/src/lib/assistant/assistant.html - 93 + 95 @@ -6359,7 +6359,7 @@ Reset Filters libs/ui/src/lib/assistant/assistant.html - 185 + 187 @@ -6383,7 +6383,7 @@ Apply Filters libs/ui/src/lib/assistant/assistant.html - 195 + 197 @@ -7473,7 +7473,7 @@ Tag libs/ui/src/lib/assistant/assistant.html - 155 + 157 diff --git a/apps/client/src/locales/messages.tr.xlf b/apps/client/src/locales/messages.tr.xlf index 78a66fc99..97457c7a0 100644 --- a/apps/client/src/locales/messages.tr.xlf +++ b/apps/client/src/locales/messages.tr.xlf @@ -1447,7 +1447,7 @@ libs/ui/src/lib/assistant/assistant.html - 166 + 168 @@ -3731,7 +3731,7 @@ libs/ui/src/lib/assistant/assistant.html - 107 + 109 @@ -3831,7 +3831,7 @@ libs/ui/src/lib/assistant/assistant.html - 127 + 129 @@ -4223,7 +4223,7 @@ libs/ui/src/lib/assistant/assistant.html - 46 + 44 @@ -5939,11 +5939,11 @@ Girdi yok... libs/ui/src/lib/assistant/assistant.html - 63 + 62 libs/ui/src/lib/assistant/assistant.html - 84 + 85 @@ -6159,7 +6159,7 @@ Date Range libs/ui/src/lib/assistant/assistant.html - 93 + 95 @@ -6359,7 +6359,7 @@ Reset Filters libs/ui/src/lib/assistant/assistant.html - 185 + 187 @@ -6383,7 +6383,7 @@ Apply Filters libs/ui/src/lib/assistant/assistant.html - 195 + 197 @@ -7473,7 +7473,7 @@ Tag libs/ui/src/lib/assistant/assistant.html - 155 + 157 diff --git a/apps/client/src/locales/messages.uk.xlf b/apps/client/src/locales/messages.uk.xlf index 47fb7663a..dae661112 100644 --- a/apps/client/src/locales/messages.uk.xlf +++ b/apps/client/src/locales/messages.uk.xlf @@ -1019,7 +1019,7 @@ libs/ui/src/lib/assistant/assistant.html - 46 + 44 @@ -1495,7 +1495,7 @@ libs/ui/src/lib/assistant/assistant.html - 166 + 168 @@ -4879,7 +4879,7 @@ libs/ui/src/lib/assistant/assistant.html - 107 + 109 @@ -4999,7 +4999,7 @@ libs/ui/src/lib/assistant/assistant.html - 127 + 129 @@ -6681,11 +6681,11 @@ Немає записів... libs/ui/src/lib/assistant/assistant.html - 63 + 62 libs/ui/src/lib/assistant/assistant.html - 84 + 85 @@ -6701,7 +6701,7 @@ Діапазон дат libs/ui/src/lib/assistant/assistant.html - 93 + 95 @@ -6709,7 +6709,7 @@ Тег libs/ui/src/lib/assistant/assistant.html - 155 + 157 @@ -6717,7 +6717,7 @@ Скинути фільтри libs/ui/src/lib/assistant/assistant.html - 185 + 187 @@ -6725,7 +6725,7 @@ Застосувати фільтри libs/ui/src/lib/assistant/assistant.html - 195 + 197 diff --git a/apps/client/src/locales/messages.xlf b/apps/client/src/locales/messages.xlf index ad4e1a3ad..d8a7b552c 100644 --- a/apps/client/src/locales/messages.xlf +++ b/apps/client/src/locales/messages.xlf @@ -1438,7 +1438,7 @@ libs/ui/src/lib/assistant/assistant.html - 166 + 168 @@ -3937,7 +3937,7 @@ libs/ui/src/lib/assistant/assistant.html - 107 + 109 @@ -4026,7 +4026,7 @@ libs/ui/src/lib/assistant/assistant.html - 127 + 129 @@ -4383,7 +4383,7 @@ libs/ui/src/lib/assistant/assistant.html - 46 + 44 @@ -5084,11 +5084,11 @@ No entries... libs/ui/src/lib/assistant/assistant.html - 63 + 62 libs/ui/src/lib/assistant/assistant.html - 84 + 85 @@ -5616,7 +5616,7 @@ Date Range libs/ui/src/lib/assistant/assistant.html - 93 + 95 @@ -5801,7 +5801,7 @@ Reset Filters libs/ui/src/lib/assistant/assistant.html - 185 + 187 @@ -5829,7 +5829,7 @@ Apply Filters libs/ui/src/lib/assistant/assistant.html - 195 + 197 @@ -6766,7 +6766,7 @@ Tag libs/ui/src/lib/assistant/assistant.html - 155 + 157 diff --git a/apps/client/src/locales/messages.zh.xlf b/apps/client/src/locales/messages.zh.xlf index 12ed4498b..6305867a3 100644 --- a/apps/client/src/locales/messages.zh.xlf +++ b/apps/client/src/locales/messages.zh.xlf @@ -1504,7 +1504,7 @@ libs/ui/src/lib/assistant/assistant.html - 166 + 168 @@ -4260,7 +4260,7 @@ libs/ui/src/lib/assistant/assistant.html - 107 + 109 @@ -4360,7 +4360,7 @@ libs/ui/src/lib/assistant/assistant.html - 127 + 129 @@ -4760,7 +4760,7 @@ libs/ui/src/lib/assistant/assistant.html - 46 + 44 @@ -5540,11 +5540,11 @@ 没有条目... libs/ui/src/lib/assistant/assistant.html - 63 + 62 libs/ui/src/lib/assistant/assistant.html - 84 + 85 @@ -6144,7 +6144,7 @@ 日期范围 libs/ui/src/lib/assistant/assistant.html - 93 + 95 @@ -6352,7 +6352,7 @@ 重置过滤器 libs/ui/src/lib/assistant/assistant.html - 185 + 187 @@ -6384,7 +6384,7 @@ 应用过滤器 libs/ui/src/lib/assistant/assistant.html - 195 + 197 @@ -7474,7 +7474,7 @@ Tag libs/ui/src/lib/assistant/assistant.html - 155 + 157 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...
+ }
diff --git a/libs/ui/src/lib/value/value.component.html b/libs/ui/src/lib/value/value.component.html index 0ead7497e..e252ef8a2 100644 --- a/libs/ui/src/lib/value/value.component.html +++ b/libs/ui/src/lib/value/value.component.html @@ -13,42 +13,45 @@
+
-
-
- @if (value === null) { - *****% - } @else { - {{ formattedValue }}% - } -
-
- @if (value === null) { - ***** - } @else { - {{ formattedValue }} - } -
- - {{ unit }} - -
- {{ unit }} -
+ @if (isPercent) { +
+ @if (value === null) { + *****% + } @else { + {{ formattedValue }}% + } +
+ } @else { +
+ @if (value === null) { + ***** + } @else { + {{ formattedValue }} + } +
+ } + @if (unit) { + + {{ unit }} + +
+ {{ unit }} +
+ } - + @if (isString) {
+ @if (value === undefined) { + + }
diff --git a/package-lock.json b/package-lock.json index 51ddd7bc2..a45d5d875 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "ghostfolio", - "version": "2.154.0", + "version": "2.155.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ghostfolio", - "version": "2.154.0", + "version": "2.155.0", "hasInstallScript": true, "license": "AGPL-3.0", "dependencies": { diff --git a/package.json b/package.json index 4d8616297..64fc87aa0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ghostfolio", - "version": "2.154.0", + "version": "2.155.0", "homepage": "https://ghostfol.io", "license": "AGPL-3.0", "repository": "https://github.com/ghostfolio/ghostfolio", diff --git a/prisma/schema.prisma b/prisma/schema.prisma index b649b38b6..b88a5f9f8 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -226,8 +226,8 @@ model Subscription { id String @id @default(uuid()) price Float? updatedAt DateTime @updatedAt + user User @relation(fields: [userId], onDelete: Cascade, references: [id]) userId String - User User @relation(fields: [userId], onDelete: Cascade, references: [id]) @@index([userId]) } diff --git a/test/import/invalid-data-source.json b/test/import/invalid-data-source.json new file mode 100644 index 000000000..472e295ee --- /dev/null +++ b/test/import/invalid-data-source.json @@ -0,0 +1,18 @@ +{ + "meta": { + "date": "2021-01-01T00:00:00.000Z", + "version": "dev" + }, + "activities": [ + { + "currency": "USD", + "dataSource": "", + "date": "2021-01-01T00:00:00.000Z", + "fee": 0, + "quantity": 20, + "symbol": "AAPL", + "type": "BUY", + "unitPrice": 100.0 + } + ] +}