diff --git a/apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html b/apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html index b59b7e39f..a68768ff1 100644 --- a/apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html +++ b/apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html @@ -660,7 +660,6 @@ formControlName="headers" matInput type="text" - [matAutocomplete]="auto" > diff --git a/apps/client/src/app/components/header/header.component.ts b/apps/client/src/app/components/header/header.component.ts index 8e70c1a8c..d4a2fdbab 100644 --- a/apps/client/src/app/components/header/header.component.ts +++ b/apps/client/src/app/components/header/header.component.ts @@ -220,7 +220,7 @@ export class GfHeaderComponent implements OnChanges { this.assistentMenuTriggerElement().closeMenu(); } - protected impersonateAccount(aId: string) { + protected impersonateAccount(aId: string | null) { if (aId) { this.impersonationStorageService.setId(aId); } else { diff --git a/apps/client/src/app/components/home-holdings/home-holdings.component.ts b/apps/client/src/app/components/home-holdings/home-holdings.component.ts index ca6351429..34b672bc3 100644 --- a/apps/client/src/app/components/home-holdings/home-holdings.component.ts +++ b/apps/client/src/app/components/home-holdings/home-holdings.component.ts @@ -56,20 +56,21 @@ export class GfHomeHoldingsComponent implements OnInit { protected holdings: PortfolioPosition[] | undefined; protected holdingsViewMode: HoldingsViewMode = GfHomeHoldingsComponent.DEFAULT_HOLDINGS_VIEW_MODE; - protected readonly holdingsViewModeOptions: ToggleOption[] = [ - { - iconName: 'reorder-four-outline', - title: $localize`Table`, - value: 'TABLE' - }, - { - iconName: 'grid-outline', - title: $localize`Chart`, - value: 'CHART' - } - ]; + protected readonly holdingsViewModeOptions: ToggleOption[] = + [ + { + iconName: 'reorder-four-outline', + title: $localize`Table`, + value: 'TABLE' + }, + { + iconName: 'grid-outline', + title: $localize`Chart`, + value: 'CHART' + } + ]; protected holdingType: HoldingType = 'ACTIVE'; - protected readonly holdingTypeOptions: ToggleOption[] = [ + protected readonly holdingTypeOptions: ToggleOption[] = [ { label: $localize`Active`, value: 'ACTIVE' }, { label: $localize`Closed`, value: 'CLOSED' } ]; diff --git a/apps/client/src/app/components/investment-chart/investment-chart.component.ts b/apps/client/src/app/components/investment-chart/investment-chart.component.ts index 2a1ffd97c..43ac5ff99 100644 --- a/apps/client/src/app/components/investment-chart/investment-chart.component.ts +++ b/apps/client/src/app/components/investment-chart/investment-chart.component.ts @@ -53,16 +53,16 @@ import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader'; templateUrl: './investment-chart.component.html' }) export class GfInvestmentChartComponent implements OnChanges, OnDestroy { - @Input() public readonly benchmarkDataItems: InvestmentItem[] = []; - @Input() public readonly benchmarkDataLabel = ''; - @Input() public readonly colorScheme: ColorScheme; - @Input() public readonly currency: string; - @Input() public readonly groupBy: GroupBy; - @Input() public readonly historicalDataItems: LineChartItem[] = []; - @Input() public readonly isInPercentage = false; - @Input() public readonly isLoading = false; - @Input() public readonly locale = getLocale(); - @Input() public readonly savingsRate = 0; + @Input() public benchmarkDataItems: InvestmentItem[] = []; + @Input() public benchmarkDataLabel = ''; + @Input() public colorScheme: ColorScheme; + @Input() public currency: string; + @Input() public groupBy: GroupBy; + @Input() public historicalDataItems: LineChartItem[] = []; + @Input() public isInPercentage = false; + @Input() public isLoading = false; + @Input() public locale = getLocale(); + @Input() public savingsRate = 0; private readonly chartCanvas = viewChild.required>('chartCanvas'); diff --git a/apps/client/src/app/components/markets/markets.component.ts b/apps/client/src/app/components/markets/markets.component.ts index 0317ce648..5e5a2d937 100644 --- a/apps/client/src/app/components/markets/markets.component.ts +++ b/apps/client/src/app/components/markets/markets.component.ts @@ -49,10 +49,11 @@ export class GfMarketsComponent implements OnInit { () => this.deviceDetectorService.deviceInfo().deviceType ); - protected readonly fearAndGreedIndexModeOptions: ToggleOption[] = [ - { label: $localize`Stocks`, value: 'STOCKS' }, - { label: $localize`Cryptocurrencies`, value: 'CRYPTOCURRENCIES' } - ]; + protected readonly fearAndGreedIndexModeOptions: ToggleOption[] = + [ + { label: $localize`Stocks`, value: 'STOCKS' }, + { label: $localize`Cryptocurrencies`, value: 'CRYPTOCURRENCIES' } + ]; protected readonly fearLabel = $localize`Fear`; protected readonly greedLabel = $localize`Greed`; diff --git a/apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.html b/apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.html index 8a797250c..4740dbbf0 100644 --- a/apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.html +++ b/apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.html @@ -210,6 +210,7 @@ currencyOfAssetProfile === activityForm.get('currencyOfUnitPrice')?.value && currentMarketPrice && + data.activity.type && ['BUY', 'SELL'].includes(data.activity.type) && isToday(activityForm.get('date')?.value) ) { diff --git a/apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts b/apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts index 358db2edb..341509d0c 100644 --- a/apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts +++ b/apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts @@ -12,7 +12,6 @@ import { getCountryName } from '@ghostfolio/common/helper'; import { - AssetProfileIdentifier, HoldingWithParents, PortfolioDetails, PortfolioPosition, @@ -22,7 +21,10 @@ import { hasPermission, permissions } from '@ghostfolio/common/permissions'; import { hasScope, scopes } from '@ghostfolio/common/scopes'; import { MarketAdvanced } from '@ghostfolio/common/types'; import { translate } from '@ghostfolio/ui/i18n'; -import { GfPortfolioProportionChartComponent } from '@ghostfolio/ui/portfolio-proportion-chart'; +import { + GfPortfolioProportionChartComponent, + PortfolioProportionChartClickEvent +} from '@ghostfolio/ui/portfolio-proportion-chart'; import { GfPremiumIndicatorComponent } from '@ghostfolio/ui/premium-indicator'; import { DataService } from '@ghostfolio/ui/services'; import { GfTopHoldingsComponent } from '@ghostfolio/ui/top-holdings'; @@ -206,7 +208,9 @@ export class GfAllocationsPageComponent implements OnInit { this.initialize(); } - protected onAccountChartClicked({ accountId }: { accountId: string }) { + protected onAccountChartClicked(event: PortfolioProportionChartClickEvent) { + const accountId = 'accountId' in event ? event.accountId : undefined; + if (accountId && accountId !== UNKNOWN_KEY) { void this.router.navigate([], { queryParams: { accountId, accountDetailDialog: true } @@ -214,10 +218,9 @@ export class GfAllocationsPageComponent implements OnInit { } } - protected onSymbolChartClicked({ - dataSource, - symbol - }: AssetProfileIdentifier) { + protected onSymbolChartClicked(event: PortfolioProportionChartClickEvent) { + const { dataSource, symbol } = 'symbol' in event ? event : {}; + if (dataSource && symbol) { void this.router.navigate([], { queryParams: { dataSource, symbol, holdingDetailDialog: true } 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 970f1379c..3a3c44269 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 @@ -94,7 +94,7 @@ export class GfAnalysisPageComponent implements OnInit { protected isLoadingInvestmentTimelineChart: boolean; protected isLoadingPortfolioPrompt: boolean; protected readonly mode = signal('month'); - protected readonly modeOptions: ToggleOption[] = [ + protected readonly modeOptions: ToggleOption[] = [ { label: $localize`Monthly`, value: 'month' }, { label: $localize`Yearly`, value: 'year' } ]; diff --git a/apps/client/src/app/pages/register/user-account-registration-dialog/user-account-registration-dialog.html b/apps/client/src/app/pages/register/user-account-registration-dialog/user-account-registration-dialog.html index c37abeadd..660af9690 100644 --- a/apps/client/src/app/pages/register/user-account-registration-dialog/user-account-registration-dialog.html +++ b/apps/client/src/app/pages/register/user-account-registration-dialog/user-account-registration-dialog.html @@ -75,7 +75,7 @@ matInput readonly type="text" - [(value)]="accessToken" + [value]="accessToken" >