refactor (df/locale): loans module (#1264)

See: #1213
This commit is contained in:
Shubhankar Bhadra
2020-10-25 13:06:23 +05:30
committed by GitHub
parent 2b5341aa2c
commit 9d438b140e
26 changed files with 179 additions and 84 deletions
@@ -13,6 +13,7 @@ import { DatePipe } from '@angular/common';
import { DatepickerBase } from 'app/shared/form-dialog/formfield/model/datepicker-base';
import { FormfieldBase } from 'app/shared/form-dialog/formfield/model/formfield-base';
import { InputBase } from 'app/shared/form-dialog/formfield/model/input-base';
import { SettingsService } from 'app/settings/settings.service';
/**
* Recurring Deposit Account Charges Step
@@ -54,9 +55,11 @@ export class LoansAccountChargesStepComponent implements OnInit, OnChanges {
* Loans Account Charges Form Step
* @param {dialog} MatDialog Mat Dialog
* @param {datePipe} DatePipe DatePipe
* @param {SettingsService} settingsService Settings Service
*/
constructor(public dialog: MatDialog,
private datePipe: DatePipe) {
private datePipe: DatePipe,
private settingsService: SettingsService) {
}
ngOnInit() {
@@ -139,7 +142,7 @@ export class LoansAccountChargesStepComponent implements OnInit, OnChanges {
editNoteDialogRef.afterClosed().subscribe((response: any) => {
if (response.data) {
let newCharge: any;
const dateFormat = 'dd MMMM yyyy';
const dateFormat = this.settingsService.dateFormat;
const date = this.datePipe.transform(response.data.value.date, dateFormat);
switch (charge.chargeTimeType.value) {
case 'Specified due date':