Feature/switch typescript-eslint no-unused-vars to error (#3887)
* Switch @typescript-eslint/no-unused-vars to error
This commit is contained in:
@@ -135,7 +135,6 @@
|
|||||||
"@typescript-eslint/no-unsafe-enum-comparison": "warn",
|
"@typescript-eslint/no-unsafe-enum-comparison": "warn",
|
||||||
"@typescript-eslint/no-unsafe-member-access": "warn",
|
"@typescript-eslint/no-unsafe-member-access": "warn",
|
||||||
"@typescript-eslint/no-unsafe-return": "warn",
|
"@typescript-eslint/no-unsafe-return": "warn",
|
||||||
"@typescript-eslint/no-unused-vars": "warn",
|
|
||||||
"@typescript-eslint/no-unsafe-call": "warn",
|
"@typescript-eslint/no-unsafe-call": "warn",
|
||||||
"@typescript-eslint/require-await": "warn",
|
"@typescript-eslint/require-await": "warn",
|
||||||
"@typescript-eslint/restrict-template-expressions": "warn",
|
"@typescript-eslint/restrict-template-expressions": "warn",
|
||||||
|
@@ -74,15 +74,12 @@ export class AccountController {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.accountService.deleteAccount(
|
return this.accountService.deleteAccount({
|
||||||
{
|
id_userId: {
|
||||||
id_userId: {
|
id,
|
||||||
id,
|
userId: this.request.user.id
|
||||||
userId: this.request.user.id
|
}
|
||||||
}
|
});
|
||||||
},
|
|
||||||
this.request.user.id
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Get()
|
@Get()
|
||||||
|
@@ -108,8 +108,7 @@ export class AccountService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public async deleteAccount(
|
public async deleteAccount(
|
||||||
where: Prisma.AccountWhereUniqueInput,
|
where: Prisma.AccountWhereUniqueInput
|
||||||
aUserId: string
|
|
||||||
): Promise<Account> {
|
): Promise<Account> {
|
||||||
const account = await this.prismaService.account.delete({
|
const account = await this.prismaService.account.delete({
|
||||||
where
|
where
|
||||||
@@ -170,11 +169,7 @@ export class AccountService {
|
|||||||
where.isExcluded = false;
|
where.isExcluded = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const {
|
const { ACCOUNT: filtersByAccount } = groupBy(filters, ({ type }) => {
|
||||||
ACCOUNT: filtersByAccount,
|
|
||||||
ASSET_CLASS: filtersByAssetClass,
|
|
||||||
TAG: filtersByTag
|
|
||||||
} = groupBy(filters, ({ type }) => {
|
|
||||||
return type;
|
return type;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
import { Type } from 'class-transformer';
|
import { Type } from 'class-transformer';
|
||||||
import { ArrayNotEmpty, IsArray, isNotEmptyObject } from 'class-validator';
|
import { ArrayNotEmpty, IsArray } from 'class-validator';
|
||||||
|
|
||||||
import { UpdateMarketDataDto } from './update-market-data.dto';
|
import { UpdateMarketDataDto } from './update-market-data.dto';
|
||||||
|
|
||||||
|
@@ -29,8 +29,7 @@ export class GoogleStrategy extends PassportStrategy(Strategy, 'google') {
|
|||||||
token: string,
|
token: string,
|
||||||
refreshToken: string,
|
refreshToken: string,
|
||||||
profile: Profile,
|
profile: Profile,
|
||||||
done: Function,
|
done: Function
|
||||||
done2: Function
|
|
||||||
) {
|
) {
|
||||||
try {
|
try {
|
||||||
const jwt = await this.authService.validateOAuthLogin({
|
const jwt = await this.authService.validateOAuthLogin({
|
||||||
|
@@ -3,24 +3,14 @@ import {
|
|||||||
AssetProfileIdentifier,
|
AssetProfileIdentifier,
|
||||||
SymbolMetrics
|
SymbolMetrics
|
||||||
} from '@ghostfolio/common/interfaces';
|
} from '@ghostfolio/common/interfaces';
|
||||||
import { PortfolioSnapshot, TimelinePosition } from '@ghostfolio/common/models';
|
import { PortfolioSnapshot } from '@ghostfolio/common/models';
|
||||||
|
|
||||||
export class MWRPortfolioCalculator extends PortfolioCalculator {
|
export class MWRPortfolioCalculator extends PortfolioCalculator {
|
||||||
protected calculateOverallPerformance(
|
protected calculateOverallPerformance(): PortfolioSnapshot {
|
||||||
positions: TimelinePosition[]
|
|
||||||
): PortfolioSnapshot {
|
|
||||||
throw new Error('Method not implemented.');
|
throw new Error('Method not implemented.');
|
||||||
}
|
}
|
||||||
|
|
||||||
protected getSymbolMetrics({
|
protected getSymbolMetrics({}: {
|
||||||
dataSource,
|
|
||||||
end,
|
|
||||||
exchangeRates,
|
|
||||||
marketSymbolMap,
|
|
||||||
start,
|
|
||||||
step = 1,
|
|
||||||
symbol
|
|
||||||
}: {
|
|
||||||
end: Date;
|
end: Date;
|
||||||
exchangeRates: { [dateString: string]: number };
|
exchangeRates: { [dateString: string]: number };
|
||||||
marketSymbolMap: {
|
marketSymbolMap: {
|
||||||
|
@@ -1,42 +1,3 @@
|
|||||||
import { PortfolioCalculatorFactory } from '@ghostfolio/api/app/portfolio/calculator/portfolio-calculator.factory';
|
|
||||||
import { CurrentRateService } from '@ghostfolio/api/app/portfolio/current-rate.service';
|
|
||||||
import { RedisCacheService } from '@ghostfolio/api/app/redis-cache/redis-cache.service';
|
|
||||||
import { ConfigurationService } from '@ghostfolio/api/services/configuration/configuration.service';
|
|
||||||
import { ExchangeRateDataService } from '@ghostfolio/api/services/exchange-rate-data/exchange-rate-data.service';
|
|
||||||
import { PortfolioSnapshotService } from '@ghostfolio/api/services/queues/portfolio-snapshot/portfolio-snapshot.service';
|
|
||||||
|
|
||||||
describe('PortfolioCalculator', () => {
|
describe('PortfolioCalculator', () => {
|
||||||
let configurationService: ConfigurationService;
|
|
||||||
let currentRateService: CurrentRateService;
|
|
||||||
let exchangeRateDataService: ExchangeRateDataService;
|
|
||||||
let portfolioCalculatorFactory: PortfolioCalculatorFactory;
|
|
||||||
let portfolioSnapshotService: PortfolioSnapshotService;
|
|
||||||
let redisCacheService: RedisCacheService;
|
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
configurationService = new ConfigurationService();
|
|
||||||
|
|
||||||
currentRateService = new CurrentRateService(null, null, null, null);
|
|
||||||
|
|
||||||
exchangeRateDataService = new ExchangeRateDataService(
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null
|
|
||||||
);
|
|
||||||
|
|
||||||
portfolioSnapshotService = new PortfolioSnapshotService(null);
|
|
||||||
|
|
||||||
redisCacheService = new RedisCacheService(null, null);
|
|
||||||
|
|
||||||
portfolioCalculatorFactory = new PortfolioCalculatorFactory(
|
|
||||||
configurationService,
|
|
||||||
currentRateService,
|
|
||||||
exchangeRateDataService,
|
|
||||||
portfolioSnapshotService,
|
|
||||||
redisCacheService
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
test.skip('Skip empty test', () => 1);
|
test.skip('Skip empty test', () => 1);
|
||||||
});
|
});
|
||||||
|
@@ -12,13 +12,7 @@ import { DateRange } from '@ghostfolio/common/types';
|
|||||||
|
|
||||||
import { Logger } from '@nestjs/common';
|
import { Logger } from '@nestjs/common';
|
||||||
import { Big } from 'big.js';
|
import { Big } from 'big.js';
|
||||||
import {
|
import { addMilliseconds, differenceInDays, format, isBefore } from 'date-fns';
|
||||||
addDays,
|
|
||||||
addMilliseconds,
|
|
||||||
differenceInDays,
|
|
||||||
format,
|
|
||||||
isBefore
|
|
||||||
} from 'date-fns';
|
|
||||||
import { cloneDeep, first, last, sortBy } from 'lodash';
|
import { cloneDeep, first, last, sortBy } from 'lodash';
|
||||||
|
|
||||||
export class TWRPortfolioCalculator extends PortfolioCalculator {
|
export class TWRPortfolioCalculator extends PortfolioCalculator {
|
||||||
|
@@ -79,7 +79,7 @@ jest.mock('@ghostfolio/api/services/property/property.service', () => {
|
|||||||
return {
|
return {
|
||||||
PropertyService: jest.fn().mockImplementation(() => {
|
PropertyService: jest.fn().mockImplementation(() => {
|
||||||
return {
|
return {
|
||||||
getByKey: (key: string) => Promise.resolve({})
|
getByKey: () => Promise.resolve({})
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
|
@@ -1053,8 +1053,7 @@ export class PortfolioService {
|
|||||||
dateRange = 'max',
|
dateRange = 'max',
|
||||||
filters,
|
filters,
|
||||||
impersonationId,
|
impersonationId,
|
||||||
userId,
|
userId
|
||||||
withExcludedAccounts = false
|
|
||||||
}: {
|
}: {
|
||||||
dateRange?: DateRange;
|
dateRange?: DateRange;
|
||||||
filters?: Filter[];
|
filters?: Filter[];
|
||||||
@@ -1308,7 +1307,7 @@ export class PortfolioService {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
for (const [symbol, position] of Object.entries(holdings)) {
|
for (const [, position] of Object.entries(holdings)) {
|
||||||
const value = position.valueInBaseCurrency;
|
const value = position.valueInBaseCurrency;
|
||||||
|
|
||||||
if (position.assetClass !== AssetClass.LIQUIDITY) {
|
if (position.assetClass !== AssetClass.LIQUIDITY) {
|
||||||
|
@@ -1,7 +1,5 @@
|
|||||||
import { Filter } from '@ghostfolio/common/interfaces';
|
import { Filter } from '@ghostfolio/common/interfaces';
|
||||||
|
|
||||||
import { Milliseconds } from 'cache-manager';
|
|
||||||
|
|
||||||
export const RedisCacheServiceMock = {
|
export const RedisCacheServiceMock = {
|
||||||
cache: new Map<string, string>(),
|
cache: new Map<string, string>(),
|
||||||
get: (key: string): Promise<string> => {
|
get: (key: string): Promise<string> => {
|
||||||
@@ -20,7 +18,7 @@ export const RedisCacheServiceMock = {
|
|||||||
|
|
||||||
return `portfolio-snapshot-${userId}${filtersHash > 0 ? `-${filtersHash}` : ''}`;
|
return `portfolio-snapshot-${userId}${filtersHash > 0 ? `-${filtersHash}` : ''}`;
|
||||||
},
|
},
|
||||||
set: (key: string, value: string, ttl?: Milliseconds): Promise<string> => {
|
set: (key: string, value: string): Promise<string> => {
|
||||||
RedisCacheServiceMock.cache.set(key, value);
|
RedisCacheServiceMock.cache.set(key, value);
|
||||||
|
|
||||||
return Promise.resolve(value);
|
return Promise.resolve(value);
|
||||||
|
@@ -1,5 +1,4 @@
|
|||||||
import { IsCurrencyCode } from '@ghostfolio/api/validators/is-currency-code';
|
import { IsCurrencyCode } from '@ghostfolio/api/validators/is-currency-code';
|
||||||
import { PortfolioReportRule } from '@ghostfolio/common/interfaces';
|
|
||||||
import type {
|
import type {
|
||||||
ColorScheme,
|
ColorScheme,
|
||||||
DateRange,
|
DateRange,
|
||||||
|
@@ -18,7 +18,7 @@ export class EmergencyFundSetup extends Rule<Settings> {
|
|||||||
this.emergencyFund = emergencyFund;
|
this.emergencyFund = emergencyFund;
|
||||||
}
|
}
|
||||||
|
|
||||||
public evaluate(ruleSettings: Settings) {
|
public evaluate() {
|
||||||
if (!this.emergencyFund) {
|
if (!this.emergencyFund) {
|
||||||
return {
|
return {
|
||||||
evaluation: 'No emergency fund has been set up',
|
evaluation: 'No emergency fund has been set up',
|
||||||
|
@@ -33,7 +33,7 @@ export class AlphaVantageService implements DataProviderInterface {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public canHandle(symbol: string) {
|
public canHandle() {
|
||||||
return !!this.configurationService.get('API_KEY_ALPHA_VANTAGE');
|
return !!this.configurationService.get('API_KEY_ALPHA_VANTAGE');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -48,7 +48,7 @@ export class CoinGeckoService implements DataProviderInterface {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public canHandle(symbol: string) {
|
public canHandle() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -83,7 +83,6 @@ export class YahooFinanceDataEnhancerService implements DataEnhancerInterface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public async enhance({
|
public async enhance({
|
||||||
requestTimeout = this.configurationService.get('REQUEST_TIMEOUT'),
|
|
||||||
response,
|
response,
|
||||||
symbol
|
symbol
|
||||||
}: {
|
}: {
|
||||||
|
@@ -43,7 +43,7 @@ export class EodHistoricalDataService implements DataProviderInterface {
|
|||||||
this.apiKey = this.configurationService.get('API_KEY_EOD_HISTORICAL_DATA');
|
this.apiKey = this.configurationService.get('API_KEY_EOD_HISTORICAL_DATA');
|
||||||
}
|
}
|
||||||
|
|
||||||
public canHandle(symbol: string) {
|
public canHandle() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -163,7 +163,7 @@ export class EodHistoricalDataService implements DataProviderInterface {
|
|||||||
).json<any>();
|
).json<any>();
|
||||||
|
|
||||||
return response.reduce(
|
return response.reduce(
|
||||||
(result, { close, date }, index, array) => {
|
(result, { close, date }) => {
|
||||||
if (isNumber(close)) {
|
if (isNumber(close)) {
|
||||||
result[this.convertFromEodSymbol(symbol)][date] = {
|
result[this.convertFromEodSymbol(symbol)][date] = {
|
||||||
marketPrice: close
|
marketPrice: close
|
||||||
|
@@ -33,7 +33,7 @@ export class FinancialModelingPrepService implements DataProviderInterface {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public canHandle(symbol: string) {
|
public canHandle() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -29,7 +29,7 @@ export class GoogleSheetsService implements DataProviderInterface {
|
|||||||
private readonly symbolProfileService: SymbolProfileService
|
private readonly symbolProfileService: SymbolProfileService
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
public canHandle(symbol: string) {
|
public canHandle() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -39,7 +39,7 @@ export class ManualService implements DataProviderInterface {
|
|||||||
private readonly symbolProfileService: SymbolProfileService
|
private readonly symbolProfileService: SymbolProfileService
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
public canHandle(symbol: string) {
|
public canHandle() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -86,12 +86,8 @@ export class ManualService implements DataProviderInterface {
|
|||||||
const [symbolProfile] = await this.symbolProfileService.getSymbolProfiles(
|
const [symbolProfile] = await this.symbolProfileService.getSymbolProfiles(
|
||||||
[{ symbol, dataSource: this.getName() }]
|
[{ symbol, dataSource: this.getName() }]
|
||||||
);
|
);
|
||||||
const {
|
const { defaultMarketPrice, selector, url } =
|
||||||
defaultMarketPrice,
|
symbolProfile?.scraperConfiguration ?? {};
|
||||||
headers = {},
|
|
||||||
selector,
|
|
||||||
url
|
|
||||||
} = symbolProfile?.scraperConfiguration ?? {};
|
|
||||||
|
|
||||||
if (defaultMarketPrice) {
|
if (defaultMarketPrice) {
|
||||||
const historical: {
|
const historical: {
|
||||||
|
@@ -26,7 +26,7 @@ export class RapidApiService implements DataProviderInterface {
|
|||||||
private readonly configurationService: ConfigurationService
|
private readonly configurationService: ConfigurationService
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
public canHandle(symbol: string) {
|
public canHandle() {
|
||||||
return !!this.configurationService.get('API_KEY_RAPID_API');
|
return !!this.configurationService.get('API_KEY_RAPID_API');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -34,7 +34,7 @@ export class YahooFinanceService implements DataProviderInterface {
|
|||||||
private readonly yahooFinanceDataEnhancerService: YahooFinanceDataEnhancerService
|
private readonly yahooFinanceDataEnhancerService: YahooFinanceDataEnhancerService
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
public canHandle(symbol: string) {
|
public canHandle() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,10 +1,5 @@
|
|||||||
export const ExchangeRateDataServiceMock = {
|
export const ExchangeRateDataServiceMock = {
|
||||||
getExchangeRatesByCurrency: ({
|
getExchangeRatesByCurrency: ({ targetCurrency }): Promise<any> => {
|
||||||
currencies,
|
|
||||||
endDate,
|
|
||||||
startDate,
|
|
||||||
targetCurrency
|
|
||||||
}): Promise<any> => {
|
|
||||||
if (targetCurrency === 'CHF') {
|
if (targetCurrency === 'CHF') {
|
||||||
return Promise.resolve({
|
return Promise.resolve({
|
||||||
CHFCHF: {
|
CHFCHF: {
|
||||||
|
@@ -5,8 +5,6 @@ import { IPortfolioSnapshotQueueJob } from './interfaces/portfolio-snapshot-queu
|
|||||||
|
|
||||||
export const PortfolioSnapshotServiceMock = {
|
export const PortfolioSnapshotServiceMock = {
|
||||||
addJobToQueue({
|
addJobToQueue({
|
||||||
data,
|
|
||||||
name,
|
|
||||||
opts
|
opts
|
||||||
}: {
|
}: {
|
||||||
data: IPortfolioSnapshotQueueJob;
|
data: IPortfolioSnapshotQueueJob;
|
||||||
|
@@ -4,8 +4,7 @@ import {
|
|||||||
registerDecorator,
|
registerDecorator,
|
||||||
ValidationOptions,
|
ValidationOptions,
|
||||||
ValidatorConstraint,
|
ValidatorConstraint,
|
||||||
ValidatorConstraintInterface,
|
ValidatorConstraintInterface
|
||||||
ValidationArguments
|
|
||||||
} from 'class-validator';
|
} from 'class-validator';
|
||||||
import { isISO4217CurrencyCode } from 'class-validator';
|
import { isISO4217CurrencyCode } from 'class-validator';
|
||||||
|
|
||||||
@@ -25,7 +24,7 @@ export function IsCurrencyCode(validationOptions?: ValidationOptions) {
|
|||||||
export class IsExtendedCurrencyConstraint
|
export class IsExtendedCurrencyConstraint
|
||||||
implements ValidatorConstraintInterface
|
implements ValidatorConstraintInterface
|
||||||
{
|
{
|
||||||
public defaultMessage(args: ValidationArguments) {
|
public defaultMessage() {
|
||||||
return '$value must be a valid ISO4217 currency code';
|
return '$value must be a valid ISO4217 currency code';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -15,7 +15,7 @@ export class CustomDateAdapter extends NativeDateAdapter {
|
|||||||
/**
|
/**
|
||||||
* Formats a date as a string
|
* Formats a date as a string
|
||||||
*/
|
*/
|
||||||
public format(aDate: Date, aParseFormat: string): string {
|
public format(aDate: Date): string {
|
||||||
return format(aDate, getDateFormatString(this.locale));
|
return format(aDate, getDateFormatString(this.locale));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -12,7 +12,7 @@ import {
|
|||||||
} from '@ghostfolio/common/interfaces';
|
} from '@ghostfolio/common/interfaces';
|
||||||
|
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { EMPTY, catchError, finalize, forkJoin, takeUntil } from 'rxjs';
|
import { EMPTY, catchError, finalize, forkJoin } from 'rxjs';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class AdminMarketDataService {
|
export class AdminMarketDataService {
|
||||||
|
@@ -11,7 +11,6 @@ import {
|
|||||||
User
|
User
|
||||||
} from '@ghostfolio/common/interfaces';
|
} from '@ghostfolio/common/interfaces';
|
||||||
import { hasPermission, permissions } from '@ghostfolio/common/permissions';
|
import { hasPermission, permissions } from '@ghostfolio/common/permissions';
|
||||||
import { DateRange } from '@ghostfolio/common/types';
|
|
||||||
|
|
||||||
import { ChangeDetectorRef, Component, OnDestroy, OnInit } from '@angular/core';
|
import { ChangeDetectorRef, Component, OnDestroy, OnInit } from '@angular/core';
|
||||||
import { DeviceDetectorService } from 'ngx-device-detector';
|
import { DeviceDetectorService } from 'ngx-device-detector';
|
||||||
|
@@ -33,7 +33,7 @@ export class NotificationService {
|
|||||||
title: aParams.title
|
title: aParams.title
|
||||||
});
|
});
|
||||||
|
|
||||||
return dialog.afterClosed().subscribe((result) => {
|
return dialog.afterClosed().subscribe(() => {
|
||||||
if (isFunction(aParams.discardFn)) {
|
if (isFunction(aParams.discardFn)) {
|
||||||
aParams.discardFn();
|
aParams.discardFn();
|
||||||
}
|
}
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
import { DataService } from '@ghostfolio/client/services/data.service';
|
import { DataService } from '@ghostfolio/client/services/data.service';
|
||||||
import { TabConfiguration, User } from '@ghostfolio/common/interfaces';
|
import { TabConfiguration } from '@ghostfolio/common/interfaces';
|
||||||
import { hasPermission, permissions } from '@ghostfolio/common/permissions';
|
import { hasPermission, permissions } from '@ghostfolio/common/permissions';
|
||||||
|
|
||||||
import { Component, OnDestroy, OnInit } from '@angular/core';
|
import { Component, OnDestroy, OnInit } from '@angular/core';
|
||||||
|
@@ -36,7 +36,6 @@ import { MatMenuTrigger } from '@angular/material/menu';
|
|||||||
import { MatSelectModule } from '@angular/material/select';
|
import { MatSelectModule } from '@angular/material/select';
|
||||||
import { RouterModule } from '@angular/router';
|
import { RouterModule } from '@angular/router';
|
||||||
import { Account, AssetClass } from '@prisma/client';
|
import { Account, AssetClass } from '@prisma/client';
|
||||||
import { eachYearOfInterval, format } from 'date-fns';
|
|
||||||
import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader';
|
import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader';
|
||||||
import { EMPTY, Observable, Subject, lastValueFrom } from 'rxjs';
|
import { EMPTY, Observable, Subject, lastValueFrom } from 'rxjs';
|
||||||
import {
|
import {
|
||||||
|
@@ -18,7 +18,6 @@ import {
|
|||||||
Input,
|
Input,
|
||||||
OnChanges,
|
OnChanges,
|
||||||
OnDestroy,
|
OnDestroy,
|
||||||
OnInit,
|
|
||||||
Output,
|
Output,
|
||||||
ViewChild
|
ViewChild
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
|
@@ -270,7 +270,7 @@ export class GfPortfolioProportionChartComponent
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
let labels = chartDataSorted.map(([symbol, { name }]) => {
|
let labels = chartDataSorted.map(([, { name }]) => {
|
||||||
return name;
|
return name;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -10,7 +10,6 @@ import {
|
|||||||
Input,
|
Input,
|
||||||
OnChanges,
|
OnChanges,
|
||||||
OnDestroy,
|
OnDestroy,
|
||||||
OnInit,
|
|
||||||
ViewChild
|
ViewChild
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
import { MatButtonModule } from '@angular/material/button';
|
import { MatButtonModule } from '@angular/material/button';
|
||||||
|
Reference in New Issue
Block a user