Feature/add account detail dialog (#1047)

* Add account detail dialog

* Update changelog
This commit is contained in:
Thomas Kaul
2022-06-28 21:08:34 +02:00
committed by GitHub
parent 8e2b235b1f
commit c0f19d56ec
22 changed files with 497 additions and 52 deletions

View File

@@ -1,7 +1,8 @@
import { Account as AccountModel } from '@prisma/client';
import { Account as AccountModel, Platform } from '@prisma/client';
export type AccountWithValue = AccountModel & {
balanceInBaseCurrency: number;
Platform?: Platform;
transactionCount: number;
value: number;
valueInBaseCurrency: number;

View File

@@ -276,12 +276,14 @@ export class PortfolioProportionChartComponent
padding: this.showLabels === true ? 100 : 0
},
onClick: (event, activeElements) => {
const dataIndex = activeElements[0].index;
const symbol: string = event.chart.data.labels[dataIndex];
try {
const dataIndex = activeElements[0].index;
const symbol: string = event.chart.data.labels[dataIndex];
const dataSource = this.positions[symbol]?.dataSource;
const dataSource = this.positions[symbol]?.dataSource;
this.proportionChartClicked.emit({ dataSource, symbol });
this.proportionChartClicked.emit({ dataSource, symbol });
} catch {}
},
onHover: (event, chartElement) => {
if (this.cursor) {