import { Component , OnInit } from '@angular/core' ; import { ActivatedRoute } from '@angular/router' ; @ Component ( { selector : 'mifosx-repayment-schedule-tab' , templateUrl : './repayment-schedule-tab.component.html' , styleUrls : [ './repayment-schedule-tab.component.scss' ] } ) export class RepaymentScheduleTabComponent implements OnInit { /** Loan Repayment Schedule Details Data */ repaymentScheduleDetails : any ; /** Stores if there is any waived amount */ isWaived : boolean ; /** Columns to be displayed in original schedule table. */ displayedColumns : string [ ] = [ 'number' , 'days' , 'date' , 'paiddate' , 'check' , 'principalDue' , 'balanceOfLoan' , 'interest' , 'fees' , 'penalties' , 'due' , 'paid' , 'inadvance' , 'late' , 'waived' , 'outstanding' ] ; param { ActivatedRoute } route constructor ( private route ) { this . route . parent . data . subscribe ( ( data ) => { this . repaymentScheduleDetails = data . loanDetailsData . repaymentSchedule ; } ) ; } ngOnInit ( ) { this . isWaived = this . repaymentScheduleDetails . totalWaived > 0 ; } }