This commit is contained in:
Alexis Lahouze 2018-06-13 21:18:07 +02:00
parent 100e7d2d8b
commit ffbae85e11

View File

@ -9,6 +9,7 @@ import {
} from '@angular/core'; } from '@angular/core';
import { ActivatedRoute, Router, ParamMap } from '@angular/router'; import { ActivatedRoute, Router, ParamMap } from '@angular/router';
import { Logger } from '@nsalaun/ng-logger';
import { jqxChartComponent } from 'jqwidgets-scripts/jqwidgets-ts/angular_jqxchart'; import { jqxChartComponent } from 'jqwidgets-scripts/jqwidgets-ts/angular_jqxchart';
import { Account } from '../accounts/account'; import { Account } from '../accounts/account';
@ -122,12 +123,15 @@ export class BalanceChartComponent implements OnInit, OnChanges {
constructor( constructor(
private router: Router, private router: Router,
private activatedRoute: ActivatedRoute, private activatedRoute: ActivatedRoute,
private logger: Logger,
private dailyBalanceService: DailyBalanceService, private dailyBalanceService: DailyBalanceService,
) { ) {
this.data = []; this.data = [];
} }
loadData() { loadData() {
this.logger.info('Loading data.');
let accountId = this.activatedRoute.snapshot.paramMap.get('accountId'); let accountId = this.activatedRoute.snapshot.paramMap.get('accountId');
this.dailyBalanceService.query( this.dailyBalanceService.query(