+6
-3
@@ -7,6 +7,7 @@ import { DatePipe } from '@angular/common';
|
||||
|
||||
/** Custom Services. */
|
||||
import { LoansService } from 'app/loans/loans.service';
|
||||
import { SettingsService } from 'app/settings/settings.service';
|
||||
|
||||
/**
|
||||
* Approve Loan component.
|
||||
@@ -36,12 +37,14 @@ export class ApproveLoanComponent implements OnInit {
|
||||
* @param datePipe Date Pipe.
|
||||
* @param loanService Loan Service.
|
||||
* @param router Router.
|
||||
* @param {SettingsService} settingsService Settings Service
|
||||
*/
|
||||
constructor(private formBuilder: FormBuilder,
|
||||
private route: ActivatedRoute,
|
||||
private datePipe: DatePipe,
|
||||
private loanService: LoansService,
|
||||
private router: Router) {
|
||||
private router: Router,
|
||||
private settingsService: SettingsService) {
|
||||
this.route.data.subscribe((data: { actionButtonData: any }) => {
|
||||
this.loanData = data.actionButtonData;
|
||||
});
|
||||
@@ -74,8 +77,8 @@ export class ApproveLoanComponent implements OnInit {
|
||||
* Submits Approve form.
|
||||
*/
|
||||
submit() {
|
||||
const dateFormat = 'dd MMMM yyyy';
|
||||
const local = 'en';
|
||||
const local = this.settingsService.language.code;
|
||||
const dateFormat = this.settingsService.dateFormat;
|
||||
const approvedOnDate = this.approveLoanForm.value.approvedOnDate;
|
||||
const expectedDisbursementDate = this.approveLoanForm.value.expectedDisbursementDate;
|
||||
this.approveLoanForm.patchValue({
|
||||
|
||||
Reference in New Issue
Block a user