Feature/support unlimited currencies (#387)
* Support unlimited currencies * Update changelog
This commit is contained in:
@@ -8,7 +8,6 @@ import {
|
||||
ViewChild
|
||||
} from '@angular/core';
|
||||
import { PortfolioPerformance } from '@ghostfolio/common/interfaces';
|
||||
import { Currency } from '@prisma/client';
|
||||
import { CountUp } from 'countup.js';
|
||||
import { isNumber } from 'lodash';
|
||||
|
||||
@@ -19,7 +18,7 @@ import { isNumber } from 'lodash';
|
||||
styleUrls: ['./portfolio-performance.component.scss']
|
||||
})
|
||||
export class PortfolioPerformanceComponent implements OnChanges, OnInit {
|
||||
@Input() baseCurrency: Currency;
|
||||
@Input() baseCurrency: string;
|
||||
@Input() isLoading: boolean;
|
||||
@Input() locale: string;
|
||||
@Input() performance: PortfolioPerformance;
|
||||
|
@@ -6,7 +6,6 @@ import {
|
||||
OnInit
|
||||
} from '@angular/core';
|
||||
import { PortfolioSummary } from '@ghostfolio/common/interfaces';
|
||||
import { Currency } from '@prisma/client';
|
||||
import { formatDistanceToNow } from 'date-fns';
|
||||
|
||||
@Component({
|
||||
@@ -16,7 +15,7 @@ import { formatDistanceToNow } from 'date-fns';
|
||||
styleUrls: ['./portfolio-summary.component.scss']
|
||||
})
|
||||
export class PortfolioSummaryComponent implements OnChanges, OnInit {
|
||||
@Input() baseCurrency: Currency;
|
||||
@Input() baseCurrency: string;
|
||||
@Input() isLoading: boolean;
|
||||
@Input() locale: string;
|
||||
@Input() summary: PortfolioSummary;
|
||||
|
@@ -7,7 +7,6 @@ import {
|
||||
OnDestroy,
|
||||
OnInit
|
||||
} from '@angular/core';
|
||||
import { Currency } from '@prisma/client';
|
||||
import svgMap from 'svgmap';
|
||||
|
||||
@Component({
|
||||
@@ -17,7 +16,7 @@ import svgMap from 'svgmap';
|
||||
styleUrls: ['./world-map-chart.component.scss']
|
||||
})
|
||||
export class WorldMapChartComponent implements OnChanges, OnDestroy, OnInit {
|
||||
@Input() baseCurrency: Currency;
|
||||
@Input() baseCurrency: string;
|
||||
@Input() countries: { [code: string]: { name: string; value: number } };
|
||||
|
||||
public isLoading = true;
|
||||
|
@@ -15,7 +15,6 @@ import { WebAuthnService } from '@ghostfolio/client/services/web-authn.service';
|
||||
import { DEFAULT_DATE_FORMAT, baseCurrency } from '@ghostfolio/common/config';
|
||||
import { Access, User } from '@ghostfolio/common/interfaces';
|
||||
import { hasPermission, permissions } from '@ghostfolio/common/permissions';
|
||||
import { Currency } from '@prisma/client';
|
||||
import { StripeService } from 'ngx-stripe';
|
||||
import { EMPTY, Subject } from 'rxjs';
|
||||
import { catchError, switchMap, takeUntil } from 'rxjs/operators';
|
||||
@@ -33,7 +32,7 @@ export class AccountPageComponent implements OnDestroy, OnInit {
|
||||
public baseCurrency = baseCurrency;
|
||||
public coupon: number;
|
||||
public couponId: string;
|
||||
public currencies: Currency[] = [];
|
||||
public currencies: string[] = [];
|
||||
public defaultDateFormat = DEFAULT_DATE_FORMAT;
|
||||
public hasPermissionForSubscription: boolean;
|
||||
public hasPermissionToUpdateViewMode: boolean;
|
||||
|
@@ -1,12 +1,10 @@
|
||||
import {
|
||||
ChangeDetectionStrategy,
|
||||
ChangeDetectorRef,
|
||||
Component,
|
||||
Inject,
|
||||
OnDestroy
|
||||
} from '@angular/core';
|
||||
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
||||
import { Currency } from '@prisma/client';
|
||||
import { Subject } from 'rxjs';
|
||||
|
||||
import { DataService } from '../../../services/data.service';
|
||||
@@ -20,13 +18,12 @@ import { CreateOrUpdateAccountDialogParams } from './interfaces/interfaces';
|
||||
templateUrl: 'create-or-update-account-dialog.html'
|
||||
})
|
||||
export class CreateOrUpdateAccountDialog implements OnDestroy {
|
||||
public currencies: Currency[] = [];
|
||||
public currencies: string[] = [];
|
||||
public platforms: { id: string; name: string }[];
|
||||
|
||||
private unsubscribeSubject = new Subject<void>();
|
||||
|
||||
public constructor(
|
||||
private changeDetectorRef: ChangeDetectorRef,
|
||||
private dataService: DataService,
|
||||
public dialogRef: MatDialogRef<CreateOrUpdateAccountDialog>,
|
||||
@Inject(MAT_DIALOG_DATA) public data: CreateOrUpdateAccountDialogParams
|
||||
|
@@ -11,7 +11,6 @@ import { MatAutocompleteSelectedEvent } from '@angular/material/autocomplete';
|
||||
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
||||
import { LookupItem } from '@ghostfolio/api/app/symbol/interfaces/lookup-item.interface';
|
||||
import { DataService } from '@ghostfolio/client/services/data.service';
|
||||
import { Currency } from '@prisma/client';
|
||||
import { isString } from 'lodash';
|
||||
import { EMPTY, Observable, Subject } from 'rxjs';
|
||||
import {
|
||||
@@ -35,7 +34,7 @@ import { CreateOrUpdateTransactionDialogParams } from './interfaces/interfaces';
|
||||
export class CreateOrUpdateTransactionDialog implements OnDestroy {
|
||||
@ViewChild('autocomplete') autocomplete;
|
||||
|
||||
public currencies: Currency[] = [];
|
||||
public currencies: string[] = [];
|
||||
public currentMarketPrice = null;
|
||||
public filteredLookupItems: LookupItem[];
|
||||
public filteredLookupItemsObservable: Observable<LookupItem[]>;
|
||||
|
Reference in New Issue
Block a user