Files
cbsnexora/src/app/loans/loans-view/loan-account-actions/loan-account-actions.component.ts
T
Felix van HoveGitHubCraig-RosarioJose Alberto HernandezJose Alberto Hernandezadam.magyaridependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
c8d857f3cb 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>
2025-05-05 10:36:01 -06:00

124 lines
3.5 KiB
TypeScript

/** Angular Imports. */
import { Component } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
/**
* Loan Account Actions component.
*/
@Component({
selector: 'mifosx-loan-account-actions',
templateUrl: './loan-account-actions.component.html',
styleUrls: ['./loan-account-actions.component.scss']
})
export class LoanAccountActionsComponent {
/** Loan Details Data */
navigationData: any;
/** flag object to store possible actions and render appropriate UI to the user */
actions: {
Close: boolean;
'Undo Approval': boolean;
'Write Off': boolean;
'Add Collateral': boolean;
'Assign Loan Officer': boolean;
Foreclosure: boolean;
'Prepay Loan': boolean;
Reject: boolean;
'Disburse to Savings': boolean;
'Make Repayment': boolean;
'Waive Interest': boolean;
'Close (as Rescheduled)': boolean;
Reschedule: boolean;
'Recovery Payment': boolean;
'View Guarantors': boolean;
'Create Guarantor': boolean;
Disburse: boolean;
'Withdrawn by Client': boolean;
'Undo Disbursal': boolean;
'Undo Last Disbursal': boolean;
'Loan Screen Reports': boolean;
Approve: boolean;
'Add Loan Charge': boolean;
'Goodwill Credit': boolean;
'Merchant Issued Refund': boolean;
'Payout Refund': boolean;
'Credit Balance Refund': boolean;
'Edit Repayment Schedule': boolean;
'Charge-Off': boolean;
'Sell Loan': boolean;
'Buy Back Loan': boolean;
'Re-Age': boolean;
'Re-Amortize': boolean;
'Interest Payment Waiver': boolean;
'Add Interest Pause': boolean;
'Capitalized Income': boolean;
} = {
Close: false,
'Undo Approval': false,
'Write Off': false,
'Add Collateral': false,
'Assign Loan Officer': false,
Foreclosure: false,
'Prepay Loan': false,
Reject: false,
'Disburse to Savings': false,
'Make Repayment': false,
'Waive Interest': false,
'Close (as Rescheduled)': false,
Reschedule: false,
'Recovery Payment': false,
'View Guarantors': false,
'Create Guarantor': false,
Disburse: false,
'Withdrawn by Client': false,
'Undo Disbursal': false,
'Undo Last Disbursal': false,
'Loan Screen Reports': false,
Approve: false,
'Add Loan Charge': false,
'Goodwill Credit': false,
'Merchant Issued Refund': false,
'Payout Refund': false,
'Credit Balance Refund': false,
'Edit Repayment Schedule': false,
'Charge-Off': false,
'Sell Loan': false,
'Buy Back Loan': false,
'Re-Age': false,
'Re-Amortize': false,
'Interest Payment Waiver': false,
'Add Interest Pause': false,
'Capitalized Income': false
};
actionButtonData: any;
actionName: any;
/**
* @param route Activated Route.
*/
constructor(
private route: ActivatedRoute,
private router: Router
) {
const currentNavigation = this.router.getCurrentNavigation();
// Safely access data with optional chaining
this.navigationData = currentNavigation?.extras?.state?.data;
this.route.data.subscribe((data: { actionButtonData: any }) => {
this.actionButtonData = data.actionButtonData;
});
this.route.params.subscribe((params) => {
this.actionName = params['action'];
if (this.actionName === 'Change Loan Officer') {
this.actionName = 'Assign Loan Officer';
}
for (const key of Object.keys(this.actions)) {
this.actions[key as keyof typeof this.actions] = false;
}
this.actions[this.actionName as keyof typeof this.actions] = true;
});
}
}