Loan account fixed due required fields
This commit is contained in:
+3
-4
@@ -2,10 +2,10 @@
|
||||
import { Component, OnInit, Input } from '@angular/core';
|
||||
import { FormGroup, FormBuilder, Validators } from '@angular/forms';
|
||||
import { Router, ActivatedRoute } from '@angular/router';
|
||||
import { DatePipe } from '@angular/common';
|
||||
|
||||
/** Custom Services. */
|
||||
import { LoansService } from 'app/loans/loans.service';
|
||||
import { Dates } from 'app/core/utils/dates';
|
||||
|
||||
/**
|
||||
* Waive Interest component.
|
||||
@@ -30,13 +30,12 @@ export class WaiveInterestComponent implements OnInit {
|
||||
* Get data from `Resolver`.
|
||||
* @param {FormBuilder} formBuilder Form Builder.
|
||||
* @param {Router} router Router.
|
||||
* @param {DatePipe} datePipe DatePipe.
|
||||
* @param {LoansService} loanService Loan Service.
|
||||
* @param {ActivatedRoute} route Activated Route.
|
||||
*/
|
||||
constructor(private formBuilder: FormBuilder,
|
||||
private router: Router,
|
||||
private datePipe: DatePipe,
|
||||
private dateUtils: Dates,
|
||||
private loanService: LoansService,
|
||||
private route: ActivatedRoute) { }
|
||||
|
||||
@@ -63,7 +62,7 @@ export class WaiveInterestComponent implements OnInit {
|
||||
const transactionAmount = this.loanInterestForm.value.transactionAmount;
|
||||
const dateFormat = 'dd MMMM yyyy';
|
||||
this.loanInterestForm.patchValue({
|
||||
transactionDate: this.datePipe.transform(transactionDate, dateFormat),
|
||||
transactionDate: this.dateUtils.formatDate(transactionDate, dateFormat),
|
||||
transactionAmount: parseInt(transactionAmount, 10)
|
||||
});
|
||||
const loanId = this.route.parent.snapshot.params['loanId'];
|
||||
|
||||
Reference in New Issue
Block a user