@@ -1,7 +1,6 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Router, ActivatedRoute } from '@angular/router';
|
||||
import { DatePipe } from '@angular/common';
|
||||
|
||||
/** Custom Services. */
|
||||
import { ClientsService } from 'app/clients/clients.service';
|
||||
@@ -15,27 +14,54 @@ import { ClientsService } from 'app/clients/clients.service';
|
||||
styleUrls: ['./general-tab.component.scss']
|
||||
})
|
||||
export class GeneralTabComponent {
|
||||
|
||||
/** Open Loan Accounts Columns */
|
||||
openLoansColumns: string[] = ['Account No', 'Loan Account', 'Original Loan', 'Loan Balance', 'Amount Paid', 'Type', 'Actions'];
|
||||
/** Closed Loan Accounts Columns */
|
||||
closedLoansColumns: string[] = ['Account No', 'Loan Account', 'Original Loan', 'Loan Balance', 'Amount Paid', 'Type', 'Closed Date'];
|
||||
/** Open Savings Accounts Columns */
|
||||
openSavingsColumns: string[] = ['Account No', 'Saving Account', 'Last Active', 'Balance', 'Actions'];
|
||||
/** Closed Savings Accounts Columns */
|
||||
closedSavingsColumns: string[] = ['Account No', 'Saving Account', 'Closed Date'];
|
||||
/** Open Shares Accounts Columns */
|
||||
openSharesColumns: string[] = ['Account No', 'Share Account', 'Approved Shares', 'Pending For Approval Shares', 'Actions'];
|
||||
/** Closed Shares Accounts Columns */
|
||||
closedSharesColumns: string[] = ['Account No', 'Share Account', 'Approved Shares', 'Pending For Approval Shares', 'Closed Date'];
|
||||
/** Upcoming Charges Columns */
|
||||
upcomingChargesColumns: string[] = ['Name', 'Due as of', 'Due', 'Paid', 'Waived', 'Outstanding', 'Actions'];
|
||||
|
||||
/** Client Account Data */
|
||||
clientAccountData: any;
|
||||
/** Loan Accounts Data */
|
||||
loanAccounts: any;
|
||||
/** Savings Accounts Data */
|
||||
savingAccounts: any;
|
||||
/** Shares Accounts Data */
|
||||
shareAccounts: any;
|
||||
/** Upcoming Charges Data */
|
||||
upcomingCharges: any;
|
||||
/** Client Summary Data */
|
||||
clientSummary: any;
|
||||
|
||||
/** Show Closed Loan Accounts */
|
||||
showClosedLoanAccounts = false;
|
||||
/** Show Closed Saving Accounts */
|
||||
showClosedSavingAccounts = false;
|
||||
/** Show Closed Share Accounts */
|
||||
showClosedShareAccounts = false;
|
||||
/** Show Closed Reccuring Deposits Accounts */
|
||||
showClosedRecurringAccounts = false;
|
||||
/** Show Closed Fixed Deposits Accounts */
|
||||
showClosedFixedAccounts = false;
|
||||
|
||||
/** Client Id */
|
||||
clientid: any;
|
||||
|
||||
/**
|
||||
* @param {ActivatedRoute} route Activated Route
|
||||
* @param {ClientsService} clientService Clients Service
|
||||
* @param {Router} router Router
|
||||
*/
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private clientService: ClientsService,
|
||||
@@ -52,21 +78,37 @@ export class GeneralTabComponent {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggles Loan Accounts Overview
|
||||
*/
|
||||
toggleLoanAccountsOverview() {
|
||||
this.showClosedLoanAccounts = !this.showClosedLoanAccounts;
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggles Loan Accounts Overview
|
||||
*/
|
||||
toggleSavingAccountsOverview() {
|
||||
this.showClosedSavingAccounts = !this.showClosedSavingAccounts;
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggles Loan Accounts Overview
|
||||
*/
|
||||
toggleShareAccountsOverview() {
|
||||
this.showClosedShareAccounts = !this.showClosedShareAccounts;
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggles Reccuring Accounts Overview
|
||||
*/
|
||||
toggleRecurringAccountsOverview() {
|
||||
this.showClosedRecurringAccounts = !this.showClosedRecurringAccounts;
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggles Fixed Accounts Overview
|
||||
*/
|
||||
toggleFixedAccountsOverview() {
|
||||
this.showClosedFixedAccounts = !this.showClosedFixedAccounts;
|
||||
}
|
||||
@@ -93,7 +135,6 @@ export class GeneralTabComponent {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Stops the propagation to view pages.
|
||||
* @param $event Mouse Event
|
||||
@@ -102,6 +143,9 @@ export class GeneralTabComponent {
|
||||
$event.stopPropagation();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {any} loanId Loan Id
|
||||
*/
|
||||
routeTransferFund(loanId: any) {
|
||||
const queryParams: any = { loanId: loanId, accountType: 'fromloans' };
|
||||
this.router.navigate(['../', 'loans', loanId, 'transfer-funds', 'make-account-transfer'], { relativeTo: this.route, queryParams: queryParams });
|
||||
|
||||
Reference in New Issue
Block a user