diff --git a/apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.component.ts b/apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.component.ts index b93e186f4..633f1283f 100644 --- a/apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.component.ts +++ b/apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.component.ts @@ -1,16 +1,3 @@ -import { - ChangeDetectionStrategy, - ChangeDetectorRef, - Component, - ElementRef, - Inject, - OnDestroy, - OnInit, - ViewChild -} from '@angular/core'; -import { FormBuilder, FormControl, Validators } from '@angular/forms'; -import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; -import { MatSnackBar } from '@angular/material/snack-bar'; import { UpdateAssetProfileDto } from '@ghostfolio/api/app/admin/update-asset-profile.dto'; import { AdminService } from '@ghostfolio/client/services/admin.service'; import { DataService } from '@ghostfolio/client/services/data.service'; @@ -22,6 +9,7 @@ import { } from '@ghostfolio/common/interfaces'; import { translate } from '@ghostfolio/ui/i18n'; +import { COMMA, ENTER } from '@angular/cdk/keycodes'; import { ChangeDetectionStrategy, ChangeDetectorRef, @@ -33,6 +21,7 @@ import { ViewChild } from '@angular/core'; import { FormBuilder, FormControl, Validators } from '@angular/forms'; +import { MatAutocompleteSelectedEvent } from '@angular/material/autocomplete'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; import { MatSnackBar } from '@angular/material/snack-bar'; import { @@ -48,8 +37,6 @@ import { EMPTY, Subject } from 'rxjs'; import { catchError, takeUntil } from 'rxjs/operators'; import { AssetProfileDialogParams } from './interfaces/interfaces'; -import { MatAutocompleteSelectedEvent } from '@angular/material/autocomplete'; -import { COMMA, ENTER } from '@angular/cdk/keycodes'; @Component({ host: { class: 'd-flex flex-column h-100' }, diff --git a/apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts b/apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts index fa13ffadd..b31d39c1b 100644 --- a/apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts +++ b/apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts @@ -13,8 +13,9 @@ import { } from '@ghostfolio/common/interfaces'; import { InvestmentItem } from '@ghostfolio/common/interfaces/investment-item.interface'; import { hasPermission, permissions } from '@ghostfolio/common/permissions'; -import { GroupBy, ToggleOption } from '@ghostfolio/common/types'; +import { DateRange, GroupBy, ToggleOption } from '@ghostfolio/common/types'; import { translate } from '@ghostfolio/ui/i18n'; + import { ChangeDetectorRef, Component, OnDestroy, OnInit } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { ActivatedRoute, Router } from '@angular/router'; @@ -225,8 +226,6 @@ export class AnalysisPageComponent implements OnDestroy, OnInit { : this.streaks?.currentStreak === 1 ? translate('MONTH') : translate('MONTHS'); - ? translate('MONTH') - : translate('MONTHS'); this.unitLongestStreak = this.mode === 'year' ? this.streaks?.longestStreak === 1 @@ -235,8 +234,6 @@ export class AnalysisPageComponent implements OnDestroy, OnInit { : this.streaks?.longestStreak === 1 ? translate('MONTH') : translate('MONTHS'); - ? translate('MONTH') - : translate('MONTHS'); this.isLoadingInvestmentTimelineChart = false; @@ -290,7 +287,7 @@ export class AnalysisPageComponent implements OnDestroy, OnInit { this.dataService .fetchPortfolioPerformance({ - filters: this.activeFilters, + filters: this.userService.getFilters(), range: this.user?.settings?.dateRange, timeWeightedPerformance: this.timeWeightedPerformance === 'N' ? false : true