From 9b9a64fb52ff6e0799762d5aa84c3448c04cc90f Mon Sep 17 00:00:00 2001 From: Alexis Lahouze Date: Sun, 10 Jun 2018 18:39:12 +0200 Subject: [PATCH] Remove unused event and logger. --- src/operations/balanceChart.component.ts | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src/operations/balanceChart.component.ts b/src/operations/balanceChart.component.ts index 9205203..5eadda7 100644 --- a/src/operations/balanceChart.component.ts +++ b/src/operations/balanceChart.component.ts @@ -9,18 +9,12 @@ import { } from '@angular/core'; import { ActivatedRoute, Router, ParamMap } from '@angular/router'; -import { Logger } from '@nsalaun/ng-logger'; import { jqxChartComponent } from 'jqwidgets-scripts/jqwidgets-ts/angular_jqxchart'; import { Account } from '../accounts/account'; import { DailyBalance } from './dailyBalance'; import { DailyBalanceService } from '../accounts/dailyBalance.service'; -class DateRange { - minDate: Date; - maxDate: Date; -} - @Component({ selector: 'balance-chart', template: ` @@ -39,7 +33,6 @@ class DateRange { }) export class BalanceChartComponent implements OnInit, OnChanges { @Input() account: Account; - @Output() onUpdate: EventEmitter = new EventEmitter(); @ViewChild('balanceChart') chart: jqxChartComponent; public data; @@ -129,7 +122,6 @@ export class BalanceChartComponent implements OnInit, OnChanges { constructor( private router: Router, private activatedRoute: ActivatedRoute, - private logger: Logger, private dailyBalanceService: DailyBalanceService, ) { this.data = []; @@ -146,11 +138,6 @@ export class BalanceChartComponent implements OnInit, OnChanges { let lastResult = results[results.length -1]; this.updateXBands(results[0].operation_date, lastResult.operation_date); - - this.onUpdate.emit({ - minDate: moment(results[0].operation_date).toDate(), - maxDate: moment(lastResult.operation_date).toDate() - }); }); } @@ -166,13 +153,10 @@ export class BalanceChartComponent implements OnInit, OnChanges { let fromDay = params.get('from'); let toDay = params.get('to'); - this.logger.info('Setting from and to', fromDay, toDay); - this.xAxis.minValue = moment(fromDay).toDate(); this.xAxis.maxValue = moment(toDay).toDate(); if(this.chart && this.chart.host) { - this.logger.info('Chart', this.chart); this.chart.refresh(); } }); @@ -202,8 +186,6 @@ export class BalanceChartComponent implements OnInit, OnChanges { this.updateXBands(args.minValue, args.maxValue); - this.onUpdate.emit({minDate: args.minValue, maxDate: args.maxValue}); - let accountId = this.activatedRoute.snapshot.paramMap.get('accountId'); this.router.navigate(['account', accountId, 'operations'], {