Browse Source

feat(app): convert portfolio performance to standalone

pull/5363/head
KenTandrian 1 week ago
parent
commit
e4312d79ba
  1. 12
      apps/client/src/app/components/portfolio-performance/portfolio-performance.component.ts
  2. 16
      apps/client/src/app/components/portfolio-performance/portfolio-performance.module.ts

12
apps/client/src/app/components/portfolio-performance/portfolio-performance.component.ts

@ -8,7 +8,9 @@ import {
PortfolioPerformance, PortfolioPerformance,
ResponseError ResponseError
} from '@ghostfolio/common/interfaces'; } from '@ghostfolio/common/interfaces';
import { GfValueComponent } from '@ghostfolio/ui/value';
import { CommonModule } from '@angular/common';
import { import {
ChangeDetectionStrategy, ChangeDetectionStrategy,
Component, Component,
@ -17,19 +19,21 @@ import {
OnChanges, OnChanges,
ViewChild ViewChild
} from '@angular/core'; } from '@angular/core';
import { IonIcon } from '@ionic/angular/standalone';
import { CountUp } from 'countup.js'; import { CountUp } from 'countup.js';
import { addIcons } from 'ionicons'; import { addIcons } from 'ionicons';
import { timeOutline } from 'ionicons/icons'; import { timeOutline } from 'ionicons/icons';
import { isNumber } from 'lodash'; import { isNumber } from 'lodash';
import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader';
@Component({ @Component({
selector: 'gf-portfolio-performance',
changeDetection: ChangeDetectionStrategy.OnPush, changeDetection: ChangeDetectionStrategy.OnPush,
templateUrl: './portfolio-performance.component.html', imports: [CommonModule, GfValueComponent, IonIcon, NgxSkeletonLoaderModule],
selector: 'gf-portfolio-performance',
styleUrls: ['./portfolio-performance.component.scss'], styleUrls: ['./portfolio-performance.component.scss'],
standalone: false templateUrl: './portfolio-performance.component.html'
}) })
export class PortfolioPerformanceComponent implements OnChanges { export class GfPortfolioPerformanceComponent implements OnChanges {
@Input() deviceType: string; @Input() deviceType: string;
@Input() errors: ResponseError['errors']; @Input() errors: ResponseError['errors'];
@Input() isAllTimeHigh: boolean; @Input() isAllTimeHigh: boolean;

16
apps/client/src/app/components/portfolio-performance/portfolio-performance.module.ts

@ -1,16 +0,0 @@
import { GfValueComponent } from '@ghostfolio/ui/value';
import { CommonModule } from '@angular/common';
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { IonIcon } from '@ionic/angular/standalone';
import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader';
import { PortfolioPerformanceComponent } from './portfolio-performance.component';
@NgModule({
declarations: [PortfolioPerformanceComponent],
exports: [PortfolioPerformanceComponent],
imports: [CommonModule, GfValueComponent, IonIcon, NgxSkeletonLoaderModule],
schemas: [CUSTOM_ELEMENTS_SCHEMA]
})
export class GfPortfolioPerformanceModule {}
Loading…
Cancel
Save