diff --git a/CHANGELOG.md b/CHANGELOG.md index 15066245a..d1092b049 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Removed the deprecated `firstBuyDate` in the portfolio calculator +## 2.234.0 - 2026-01-30 + +### Changed + +- Improved the usability of the create asset profile dialog in the market data section of the admin control panel +- Improved the language localization for Chinese (`zh`) +- Improved the language localization for German (`de`) +- Improved the language localization for Spanish (`es`) +- Upgraded `angular` from version `21.0.6` to `21.1.1` +- Upgraded `lodash` from version `4.17.21` to `4.17.23` +- Upgraded `Nx` from version `22.3.3` to `22.4.1` +- Upgraded `prettier` from version `3.8.0` to `3.8.1` + ## 2.233.0 - 2026-01-23 ### Changed diff --git a/apps/api/src/app/portfolio/portfolio.controller.ts b/apps/api/src/app/portfolio/portfolio.controller.ts index 03796dad6..a5a1d95ee 100644 --- a/apps/api/src/app/portfolio/portfolio.controller.ts +++ b/apps/api/src/app/portfolio/portfolio.controller.ts @@ -329,7 +329,7 @@ export class PortfolioController { types: ['DIVIDEND'] }); - let dividends = await this.portfolioService.getDividends({ + let dividends = this.portfolioService.getDividends({ activities, groupBy }); diff --git a/apps/api/src/app/portfolio/portfolio.service.ts b/apps/api/src/app/portfolio/portfolio.service.ts index f7e5dd10d..05df6a8fc 100644 --- a/apps/api/src/app/portfolio/portfolio.service.ts +++ b/apps/api/src/app/portfolio/portfolio.service.ts @@ -325,13 +325,13 @@ export class PortfolioService { }; } - public async getDividends({ + public getDividends({ activities, groupBy }: { activities: Activity[]; groupBy?: GroupBy; - }): Promise { + }): InvestmentItem[] { let dividends = activities.map(({ currency, date, value }) => { return { date: format(date, DATE_FORMAT), diff --git a/apps/client/src/app/components/admin-market-data/admin-market-data.component.ts b/apps/client/src/app/components/admin-market-data/admin-market-data.component.ts index bc3b0d374..8f956b782 100644 --- a/apps/client/src/app/components/admin-market-data/admin-market-data.component.ts +++ b/apps/client/src/app/components/admin-market-data/admin-market-data.component.ts @@ -63,7 +63,7 @@ import { import { DeviceDetectorService } from 'ngx-device-detector'; import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader'; import { Subject } from 'rxjs'; -import { distinctUntilChanged, switchMap, takeUntil } from 'rxjs/operators'; +import { distinctUntilChanged, takeUntil } from 'rxjs/operators'; import { AdminMarketDataService } from './admin-market-data.service'; import { GfAssetProfileDialogComponent } from './asset-profile-dialog/asset-profile-dialog.component'; @@ -482,32 +482,27 @@ export class GfAdminMarketDataComponent dialogRef .afterClosed() .pipe(takeUntil(this.unsubscribeSubject)) - .subscribe(({ dataSource, symbol } = {}) => { - if (dataSource && symbol) { + .subscribe((result) => { + if (!result) { + this.router.navigate(['.'], { relativeTo: this.route }); + + return; + } + + const { addAssetProfile, dataSource, symbol } = result; + + if (addAssetProfile && dataSource && symbol) { this.adminService .addAssetProfile({ dataSource, symbol }) - .pipe( - switchMap(() => { - this.isLoading = true; - this.changeDetectorRef.markForCheck(); - - return this.adminService.fetchAdminMarketData({ - filters: this.activeFilters, - take: this.pageSize - }); - }), - takeUntil(this.unsubscribeSubject) - ) - .subscribe(({ marketData }) => { - this.dataSource = new MatTableDataSource(marketData); - this.dataSource.sort = this.sort; - this.isLoading = false; - - this.changeDetectorRef.markForCheck(); + .pipe(takeUntil(this.unsubscribeSubject)) + .subscribe(() => { + this.loadData(); }); + } else { + this.loadData(); } - this.router.navigate(['.'], { relativeTo: this.route }); + this.onOpenAssetProfileDialog({ dataSource, symbol }); }); }); } diff --git a/apps/client/src/app/components/admin-market-data/create-asset-profile-dialog/create-asset-profile-dialog.component.ts b/apps/client/src/app/components/admin-market-data/create-asset-profile-dialog/create-asset-profile-dialog.component.ts index 6c180b034..fbf8afa03 100644 --- a/apps/client/src/app/components/admin-market-data/create-asset-profile-dialog/create-asset-profile-dialog.component.ts +++ b/apps/client/src/app/components/admin-market-data/create-asset-profile-dialog/create-asset-profile-dialog.component.ts @@ -101,6 +101,7 @@ export class GfCreateAssetProfileDialogComponent implements OnDestroy, OnInit { public onSubmit() { if (this.mode === 'auto') { this.dialogRef.close({ + addAssetProfile: true, dataSource: this.createAssetProfileForm.get('searchSymbol').value.dataSource, symbol: this.createAssetProfileForm.get('searchSymbol').value.symbol @@ -127,10 +128,15 @@ export class GfCreateAssetProfileDialogComponent implements OnDestroy, OnInit { takeUntil(this.unsubscribeSubject) ) .subscribe(() => { - this.dialogRef.close(); + this.dialogRef.close({ + addAssetProfile: false, + dataSource: this.dataSourceForExchangeRates, + symbol: `${DEFAULT_CURRENCY}${currency}` + }); }); } else if (this.mode === 'manual') { this.dialogRef.close({ + addAssetProfile: true, dataSource: 'MANUAL', symbol: `${this.ghostfolioPrefix}${this.createAssetProfileForm.get('addSymbol').value}` }); diff --git a/apps/client/src/app/pages/pricing/pricing-page.html b/apps/client/src/app/pages/pricing/pricing-page.html index 3cc0e460a..d755cd303 100644 --- a/apps/client/src/app/pages/pricing/pricing-page.html +++ b/apps/client/src/app/pages/pricing/pricing-page.html @@ -195,12 +195,9 @@