fix: Loan Product using global configurations for repayments
This commit is contained in:
committed by
Jose Alberto Hernandez
parent
5a79d5d290
commit
55b5ce616f
@@ -24,7 +24,7 @@ export class FormatAmountDirective implements OnInit {
|
||||
target.value = this.parse(target.value);
|
||||
}
|
||||
@HostListener('focus', ['$event.target']) focus(target: any) {
|
||||
if (typeof this.control.value == 'undefined') {
|
||||
if (typeof this.control.value === 'undefined') {
|
||||
target.value = '';
|
||||
} else {
|
||||
target.value = this.control.value;
|
||||
|
||||
@@ -57,13 +57,16 @@ export class EditLoanProductComponent implements OnInit {
|
||||
private advancedPaymentStrategy: AdvancedPaymentStrategy) {
|
||||
this.route.data.subscribe((data: { loanProductAndTemplate: any, configurations: any }) => {
|
||||
this.loanProductAndTemplate = data.loanProductAndTemplate;
|
||||
console.log(this.loanProductAndTemplate);
|
||||
const assetAccountData = this.loanProductAndTemplate.accountingMappingOptions.assetAccountOptions || [];
|
||||
const liabilityAccountData = this.loanProductAndTemplate.accountingMappingOptions.liabilityAccountOptions || [];
|
||||
this.loanProductAndTemplate.accountingMappingOptions.assetAndLiabilityAccountOptions = assetAccountData.concat(liabilityAccountData);
|
||||
|
||||
this.itemsByDefault = loanProducts.setItemsByDefault(data.configurations);
|
||||
this.loanProductAndTemplate['itemsByDefault'] = this.itemsByDefault;
|
||||
this.loanProductAndTemplate = loanProducts.updateLoanProductDefaults(this.loanProductAndTemplate, true);
|
||||
// this.loanProductAndTemplate = loanProducts.updateLoanProductDefaults(this.loanProductAndTemplate, true);
|
||||
|
||||
console.log(this.loanProductAndTemplate);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
+6
@@ -43,6 +43,7 @@ export class LoanProductSettingsStepComponent implements OnInit {
|
||||
loanScheduleProcessingTypeData: OptionData[] = [];
|
||||
isAdvancedTransactionProcessingStrategy = false;
|
||||
advancedTransactionProcessingStrategyDisabled = true;
|
||||
useDueForRepaymentsConfigurations = false;
|
||||
|
||||
/** Values to Days for Repayments */
|
||||
defaultConfigValues: GlobalConfiguration[] = [];
|
||||
@@ -82,6 +83,8 @@ export class LoanProductSettingsStepComponent implements OnInit {
|
||||
this.loanScheduleTypeData = this.loanProductsTemplate.loanScheduleTypeOptions;
|
||||
this.loanScheduleProcessingTypeData = this.loanProductsTemplate.loanScheduleProcessingTypeOptions;
|
||||
|
||||
// this.useDueForRepaymentsConfigurations = (!this.loanProduct.dueDaysForRepaymentEvent && !this.loanProduct.overDueDaysForRepaymentEvent);
|
||||
|
||||
const transactionProcessingStrategyCode: string = this.loanProductsTemplate.transactionProcessingStrategyCode || this.transactionProcessingStrategyData[0].code;
|
||||
this.loanProductSettingsForm.patchValue({
|
||||
'amortizationType': this.loanProductsTemplate.amortizationType.id,
|
||||
@@ -122,6 +125,9 @@ export class LoanProductSettingsStepComponent implements OnInit {
|
||||
this.processingStrategyService.initialize(this.isAdvancedTransactionProcessingStrategy);
|
||||
this.validateAdvancedPaymentStrategyControls();
|
||||
|
||||
console.log(this.loanProductsTemplate.dueDaysForRepaymentEvent);
|
||||
console.log(this.loanProductsTemplate.overDueDaysForRepaymentEvent);
|
||||
|
||||
if (this.loanProductsTemplate.dueDaysForRepaymentEvent != null &&
|
||||
this.loanProductsTemplate.overDueDaysForRepaymentEvent != null) {
|
||||
this.loanProductSettingsForm.patchValue({
|
||||
|
||||
@@ -58,7 +58,7 @@ export class LoanLockedComponent implements OnInit {
|
||||
private systemService: SystemService,
|
||||
private tasksService: TasksService,
|
||||
private dialog: MatDialog,
|
||||
private translateService:TranslateService) {
|
||||
private translateService: TranslateService) {
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ export class ErrorLogPopoverComponent implements OnInit {
|
||||
}
|
||||
|
||||
buttonLabel(): string {
|
||||
const label: string = this.show ? this.translateService.instant('labels.buttons.Show less'): this.translateService.instant('labels.buttons.Show more');
|
||||
const label: string = this.show ? this.translateService.instant('labels.buttons.Show less') : this.translateService.instant('labels.buttons.Show more');
|
||||
return this.translateService.instant('labels.buttons.' + label);
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ export class WorkflowJobsComponent implements OnInit {
|
||||
|
||||
constructor(private systemService: SystemService,
|
||||
public dialog: MatDialog,
|
||||
private translateService:TranslateService) {}
|
||||
private translateService: TranslateService) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.systemService.getWorkflowJobNames().toPromise()
|
||||
@@ -111,7 +111,7 @@ export class WorkflowJobsComponent implements OnInit {
|
||||
|
||||
if (this.jobAvailableStepsData.length > 0) {
|
||||
for (let index = 0; index < this.jobAvailableStepsData.length; index++) {
|
||||
this.jobAvailableStepsData[index].stepDescription = this.translateService.instant(`labels.catalogs.${this.jobAvailableStepsData[index].stepDescription}`)
|
||||
this.jobAvailableStepsData[index].stepDescription = this.translateService.instant(`labels.catalogs.${this.jobAvailableStepsData[index].stepDescription}`);
|
||||
}
|
||||
const frmFields: FormfieldBase[] = [
|
||||
new SelectBase({
|
||||
|
||||
@@ -63,7 +63,7 @@ export class CreateReportComponent implements OnInit {
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private dialog: MatDialog,
|
||||
private translateServices:TranslateService) {
|
||||
private translateServices: TranslateService) {
|
||||
this.route.data.subscribe((data: { reportTemplate: any }) => {
|
||||
this.reportTemplateData = data.reportTemplate;
|
||||
this.dataForDialog.allowedParameters = this.reportTemplateData.allowedParameters;
|
||||
|
||||
@@ -66,7 +66,7 @@ export class ViewRoleComponent implements OnInit {
|
||||
private systemService: SystemService,
|
||||
private router: Router,
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private translateService:TranslateService,
|
||||
private translateService: TranslateService,
|
||||
public dialog: MatDialog) {
|
||||
this.route.data.subscribe((data: { roledetails: any }) => {
|
||||
this.rolePermissionService = data.roledetails;
|
||||
|
||||
Reference in New Issue
Block a user