Browse Source

Redact values

pull/1643/head
Thomas 3 years ago
parent
commit
8c4871a813
  1. 2
      apps/api/src/app/portfolio/interfaces/portfolio-position-detail.interface.ts
  2. 6
      apps/api/src/app/portfolio/portfolio.service.ts
  3. 1
      apps/api/src/interceptors/redact-values-in-response.interceptor.ts
  4. 6
      apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.component.ts
  5. 2
      apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html

2
apps/api/src/app/portfolio/interfaces/portfolio-position-detail.interface.ts

@ -8,7 +8,7 @@ import { Tag } from '@prisma/client';
export interface PortfolioPositionDetail {
averagePrice: number;
dividendInBaseCurrency: number;
feesInBaseCurrency: number;
feeInBaseCurrency: number;
firstBuyDate: string;
grossPerformance: number;
grossPerformancePercent: number;

6
apps/api/src/app/portfolio/portfolio.service.ts

@ -681,7 +681,7 @@ export class PortfolioService {
tags,
averagePrice: undefined,
dividendInBaseCurrency: undefined,
feesInBaseCurrency: undefined,
feeInBaseCurrency: undefined,
firstBuyDate: undefined,
grossPerformance: undefined,
grossPerformancePercent: undefined,
@ -852,7 +852,7 @@ export class PortfolioService {
transactionCount,
averagePrice: averagePrice.toNumber(),
dividendInBaseCurrency: dividendInBaseCurrency.toNumber(),
feesInBaseCurrency: this.exchangeRateDataService.toCurrency(
feeInBaseCurrency: this.exchangeRateDataService.toCurrency(
fees.toNumber(),
SymbolProfile.currency,
userCurrency
@ -914,7 +914,7 @@ export class PortfolioService {
tags,
averagePrice: 0,
dividendInBaseCurrency: 0,
feesInBaseCurrency: 0,
feeInBaseCurrency: 0,
firstBuyDate: undefined,
grossPerformance: undefined,
grossPerformancePercent: undefined,

1
apps/api/src/interceptors/redact-values-in-response.interceptor.ts

@ -35,6 +35,7 @@ export class RedactValuesInResponseInterceptor<T>
'balanceInBaseCurrency',
'comment',
'convertedBalance',
'dividendInBaseCurrency',
'fee',
'feeInBaseCurrency',
'filteredValueInBaseCurrency',

6
apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.component.ts

@ -38,7 +38,7 @@ export class PositionDetailDialog implements OnDestroy, OnInit {
[code: string]: { name: string; value: number };
};
public dividendInBaseCurrency: number;
public feesInBaseCurrency: number;
public feeInBaseCurrency: number;
public firstBuyDate: string;
public grossPerformance: number;
public grossPerformancePercent: number;
@ -81,7 +81,7 @@ export class PositionDetailDialog implements OnDestroy, OnInit {
({
averagePrice,
dividendInBaseCurrency,
feesInBaseCurrency,
feeInBaseCurrency,
firstBuyDate,
grossPerformance,
grossPerformancePercent,
@ -103,7 +103,7 @@ export class PositionDetailDialog implements OnDestroy, OnInit {
this.benchmarkDataItems = [];
this.countries = {};
this.dividendInBaseCurrency = dividendInBaseCurrency;
this.feesInBaseCurrency = feesInBaseCurrency;
this.feeInBaseCurrency = feeInBaseCurrency;
this.firstBuyDate = firstBuyDate;
this.grossPerformance = grossPerformance;
this.grossPerformancePercent = grossPerformancePercent;

2
apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html

@ -135,7 +135,7 @@
size="medium"
[currency]="data.baseCurrency"
[locale]="data.locale"
[value]="feesInBaseCurrency"
[value]="feeInBaseCurrency"
>Fees</gf-value
>
</div>

Loading…
Cancel
Save