Merging all changes in main branch of the last weeks into dev branch (#2444)
* fixed identities tab * fix: Loan Product capitalized income form validation * Loan account with Capitalized Income transaction * fix: Use first API url from url list * Loan Product with Capitalized Income GL accounting mappings * fix: Loan Product capitalized income with Income Type * Loan account details - income capitalization type * fix: Loan Product Cash accounting view * fix: Loan Id updated in Loan views after url changed * fix: Charge management minimum and maximum cap values validation * build(deps-dev): bump http-proxy-middleware from 2.0.7 to 2.0.9 (#2421) Bumps [http-proxy-middleware](https://github.com/chimurai/http-proxy-middleware) from 2.0.7 to 2.0.9. - [Release notes](https://github.com/chimurai/http-proxy-middleware/releases) - [Changelog](https://github.com/chimurai/http-proxy-middleware/blob/v2.0.9/CHANGELOG.md) - [Commits](https://github.com/chimurai/http-proxy-middleware/compare/v2.0.7...v2.0.9) --- updated-dependencies: - dependency-name: http-proxy-middleware dependency-version: 2.0.9 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * docs: Improve contributing guidelines (#2440) The CONTRIBUTING.md file has been updated to clarify that we use the dev branch for development. In addition to that, I have slightly shortened and restructured the text. FIXES: WEB-165 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Craig-Rosario <craig.rosario04@gmail.com> Co-authored-by: Jose Alberto Hernandez <alberto@art3ch.solutions> Co-authored-by: Jose Alberto Hernandez <alberto@black-box.local> Co-authored-by: adam.magyari <magyari.adam96@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
Craig-Rosario
Jose Alberto Hernandez
Jose Alberto Hernandez
adam.magyari
dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
parent
b61d9e3d34
commit
c8d857f3cb
@@ -31,8 +31,7 @@ export class LoanActionButtonResolver implements Resolve<Object> {
|
||||
return this.loansService.getLoanActionTemplate(loanId, 'repayment');
|
||||
} else if (loanActionButton === 'Goodwill Credit') {
|
||||
return this.loansService.getLoanActionTemplate(loanId, 'goodwillCredit');
|
||||
}
|
||||
if (loanActionButton === 'Interest Payment Waiver') {
|
||||
} else if (loanActionButton === 'Interest Payment Waiver') {
|
||||
return this.loansService.getLoanActionTemplate(loanId, 'interestPaymentWaiver');
|
||||
} else if (loanActionButton === 'Payout Refund') {
|
||||
return this.loansService.getLoanActionTemplate(loanId, 'payoutRefund');
|
||||
@@ -74,6 +73,8 @@ export class LoanActionButtonResolver implements Resolve<Object> {
|
||||
return this.loansService.getLoanForeclosureActionTemplate(loanId);
|
||||
} else if (loanActionButton === 'Charge-Off') {
|
||||
return this.loansService.getLoanActionTemplate(loanId, 'charge-off');
|
||||
} else if (loanActionButton === 'Capitalized Income') {
|
||||
return this.loansService.getLoanActionTemplate(loanId, 'capitalizedIncome');
|
||||
} else {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
@@ -94,6 +94,11 @@
|
||||
<span fxFlex="50%"> {{ loanDetails.capitalizedIncomeStrategy?.value | translateKey: 'catalogs' }} </span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill *ngIf="loanDetails.enableIncomeCapitalization">
|
||||
<span fxFlex="50%"> {{ 'labels.inputs.Income capitalization type' | translate }}</span>
|
||||
<span fxFlex="50%"> {{ loanDetails.capitalizedIncomeType?.value | translateKey: 'catalogs' }} </span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="50%"> {{ 'labels.inputs.Grace: On Principal Payment' | translate }}</span>
|
||||
<span fxFlex="50%"> {{ loanDetails.graceOnPrincipalPayment }} </span>
|
||||
|
||||
@@ -6,7 +6,7 @@ import { ActivatedRoute } from '@angular/router';
|
||||
templateUrl: './datatable-tab.component.html',
|
||||
styleUrls: ['./datatable-tab.component.scss']
|
||||
})
|
||||
export class DatatableTabComponent {
|
||||
export class DatatableTabComponent implements OnInit {
|
||||
entityId: string;
|
||||
/** Loan Datatable */
|
||||
entityDatatable: any = null;
|
||||
@@ -25,4 +25,10 @@ export class DatatableTabComponent {
|
||||
this.multiRowDatatableFlag = this.entityDatatable.columnHeaders[0].columnName === 'id' ? true : false;
|
||||
});
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.route.parent.parent.params.subscribe((params) => {
|
||||
this.entityId = params['loanId'];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
<mifosx-foreclosure [dataObject]="actionButtonData" *ngIf="actions['Foreclosure']"></mifosx-foreclosure>
|
||||
<mifosx-prepay-loan [dataObject]="actionButtonData" *ngIf="actions['Prepay Loan']"></mifosx-prepay-loan>
|
||||
<mifosx-make-repayment [dataObject]="actionButtonData" *ngIf="actions['Make Repayment']"></mifosx-make-repayment>
|
||||
<mifosx-make-repayment [dataObject]="actionButtonData" *ngIf="actions['Capitalized Income']"></mifosx-make-repayment>
|
||||
<mifosx-make-repayment [dataObject]="actionButtonData" *ngIf="actions['Goodwill Credit']"></mifosx-make-repayment>
|
||||
<mifosx-make-repayment
|
||||
[dataObject]="actionButtonData"
|
||||
|
||||
@@ -51,6 +51,7 @@ export class LoanAccountActionsComponent {
|
||||
'Re-Amortize': boolean;
|
||||
'Interest Payment Waiver': boolean;
|
||||
'Add Interest Pause': boolean;
|
||||
'Capitalized Income': boolean;
|
||||
} = {
|
||||
Close: false,
|
||||
'Undo Approval': false,
|
||||
@@ -86,7 +87,8 @@ export class LoanAccountActionsComponent {
|
||||
'Re-Age': false,
|
||||
'Re-Amortize': false,
|
||||
'Interest Payment Waiver': false,
|
||||
'Add Interest Pause': false
|
||||
'Add Interest Pause': false,
|
||||
'Capitalized Income': false
|
||||
};
|
||||
|
||||
actionButtonData: any;
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<div fxLayout="row wrap" class="content">
|
||||
<div fxLayout="row wrap" class="content" *ngIf="showDetails()">
|
||||
<div fxFlex="50%" class="mat-body-strong">
|
||||
{{ 'Principal' | translate }}
|
||||
</div>
|
||||
|
||||
+8
-2
@@ -33,6 +33,8 @@ export class MakeRepaymentComponent implements OnInit {
|
||||
repaymentLoanForm: UntypedFormGroup;
|
||||
currency: Currency | null = null;
|
||||
|
||||
command: string | null = null;
|
||||
|
||||
/**
|
||||
* @param {FormBuilder} formBuilder Form Builder.
|
||||
* @param {LoansService} loanService Loan Service.
|
||||
@@ -62,6 +64,7 @@ export class MakeRepaymentComponent implements OnInit {
|
||||
if (this.dataObject.currency) {
|
||||
this.currency = this.dataObject.currency;
|
||||
}
|
||||
this.command = this.dataObject.type.code.split('.')[1];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -110,6 +113,10 @@ export class MakeRepaymentComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
showDetails(): boolean {
|
||||
return !['capitalizedIncome'].includes(this.command);
|
||||
}
|
||||
|
||||
/** Submits the repayment form */
|
||||
submit() {
|
||||
const repaymentLoanFormData = this.repaymentLoanForm.value;
|
||||
@@ -124,9 +131,8 @@ export class MakeRepaymentComponent implements OnInit {
|
||||
dateFormat,
|
||||
locale
|
||||
};
|
||||
const command = this.dataObject.type.code.split('.')[1];
|
||||
data['transactionAmount'] = data['transactionAmount'] * 1;
|
||||
this.loanService.submitLoanActionButton(this.loanId, data, command).subscribe((response: any) => {
|
||||
this.loanService.submitLoanActionButton(this.loanId, data, this.command).subscribe((response: any) => {
|
||||
this.router.navigate(['../../transactions'], { relativeTo: this.route });
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component } from '@angular/core';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
|
||||
/** Custom Services */
|
||||
@@ -15,7 +15,7 @@ import { SettingsService } from 'app/settings/settings.service';
|
||||
templateUrl: './loan-documents-tab.component.html',
|
||||
styleUrls: ['./loan-documents-tab.component.scss']
|
||||
})
|
||||
export class LoanDocumentsTabComponent {
|
||||
export class LoanDocumentsTabComponent implements OnInit {
|
||||
/** Stores the resolved loan documents data */
|
||||
entityDocuments: any;
|
||||
/** Loan account Id */
|
||||
@@ -38,6 +38,12 @@ export class LoanDocumentsTabComponent {
|
||||
});
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.route.parent.params.subscribe((params) => {
|
||||
this.entityId = params['loanId'];
|
||||
});
|
||||
}
|
||||
|
||||
getLoanDocumentsData(data: any) {
|
||||
data.forEach((ele: any) => {
|
||||
ele.docUrl =
|
||||
|
||||
@@ -82,6 +82,12 @@ export class LoansViewComponent implements OnInit {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.route.params.subscribe((params) => {
|
||||
if (this.loanId != params['loanId']) {
|
||||
this.loanId = params['loanId'];
|
||||
this.reload();
|
||||
}
|
||||
});
|
||||
this.recalculateInterest = this.loanDetailsData.recalculateInterest || true;
|
||||
this.status = this.loanDetailsData.status.value;
|
||||
if (this.loanStatus.active && this.loanDetailsData.multiDisburseLoan) {
|
||||
@@ -129,6 +135,14 @@ export class LoansViewComponent implements OnInit {
|
||||
taskPermissionName: 'DISBURSE_LOAN'
|
||||
});
|
||||
} else if (this.status === 'Active') {
|
||||
if (this.loanDetailsData.enableIncomeCapitalization) {
|
||||
this.buttonConfig.addButton({
|
||||
name: 'Capitalized Income',
|
||||
icon: 'coins',
|
||||
taskPermissionName: 'CAPITALIZED_INCOME_LOAN'
|
||||
});
|
||||
}
|
||||
|
||||
if (this.loanDetailsData.canDisburse || this.loanDetailsData.multiDisburseLoan) {
|
||||
this.buttonConfig.addButton({
|
||||
name: 'Disburse',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
|
||||
/** Custom Components */
|
||||
@@ -12,7 +12,7 @@ import { AuthenticationService } from '../../../core/authentication/authenticati
|
||||
templateUrl: './notes-tab.component.html',
|
||||
styleUrls: ['./notes-tab.component.scss']
|
||||
})
|
||||
export class NotesTabComponent {
|
||||
export class NotesTabComponent implements OnInit {
|
||||
entityId: string;
|
||||
username: string;
|
||||
entityNotes: any;
|
||||
@@ -30,6 +30,12 @@ export class NotesTabComponent {
|
||||
});
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.route.parent.params.subscribe((params) => {
|
||||
this.entityId = params['loanId'];
|
||||
});
|
||||
}
|
||||
|
||||
addNote(noteContent: any) {
|
||||
this.loansService.createLoanNote(this.entityId, noteContent).subscribe((response: any) => {
|
||||
this.entityNotes.push({
|
||||
|
||||
@@ -112,7 +112,6 @@ export class ViewTransactionComponent implements OnInit {
|
||||
});
|
||||
this.clientId = this.route.snapshot.params['clientId'];
|
||||
this.loanId = this.route.snapshot.params['loanId'];
|
||||
console.log(this.transactionType);
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
|
||||
Reference in New Issue
Block a user