Skip to content

Commit fc02e1a

Browse files
committed
feat: add portfolio stats
1 parent de41a14 commit fc02e1a

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

frontend/src/angular/src/app/portfolios/portfolio-overview/components/portfolio-charts/portfolio-charts.component.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,14 @@
2727
></app-portfolio-timechart>
2828
</ng-template>
2929
</mat-tab>
30+
<mat-tab i18n-label="@@portfolioChartsStats"
31+
label="Portfolio Stats">
32+
<ng-template matTabContent>
33+
<app-portfolio-stats
34+
[selPortfolio]="selPortfolio"
35+
></app-portfolio-stats>
36+
</ng-template>
37+
</mat-tab>
3038
<mat-tab label="Yahoo Finance" i18n-label="@@portfolioChartsYahooFinance"
3139
><app-news-list [newsItems]="yahooFinanceNews"></app-news-list
3240
></mat-tab>
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
<p>portfolio-stats works!</p>
2+
{{ selPortfolio | json }}

frontend/src/angular/src/app/portfolios/portfolio-overview/components/portfolio-stats/portfolio-stats.component.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,15 @@
1010
See the License for the specific language governing permissions and
1111
limitations under the License.
1212
*/
13-
import { Component } from '@angular/core';
13+
import { Component, Input } from '@angular/core';
14+
import { Portfolio } from 'src/app/model/portfolio';
1415

1516
@Component({
1617
selector: 'app-portfolio-stats',
1718
templateUrl: './portfolio-stats.component.html',
1819
styleUrl: './portfolio-stats.component.scss'
1920
})
2021
export class PortfolioStatsComponent {
21-
22+
@Input()
23+
selPortfolio: Portfolio;
2224
}

0 commit comments

Comments
 (0)