@@ -1,6 +1,10 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
/** 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',
|
||||
@@ -9,11 +13,18 @@ import { ActivatedRoute, Router } from '@angular/router';
|
||||
export class LoanAccountActionsComponent {
|
||||
|
||||
/** flag object to store possible actions and render appropriate UI to the user */
|
||||
actions: { close: boolean } = { close: false };
|
||||
actions: { close: boolean, undo_approval: boolean } = { close: false, undo_approval: false };
|
||||
|
||||
/**
|
||||
* @param router Router.
|
||||
* @param route Activated Route.
|
||||
*/
|
||||
constructor(private router: Router,
|
||||
private route: ActivatedRoute) {
|
||||
this.route.params.subscribe(params => {
|
||||
if (params['action'].indexOf('-') > 0) {
|
||||
this.actions[params['action'].replace('-', '_')] = true;
|
||||
}
|
||||
this.actions[params['action']] = true;
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user