build: Use prettier for typescript

Stop ignoring .ts files in prettier and fix existing issues.
This commit is contained in:
Ralph Hopman
2025-01-15 11:59:30 +00:00
committed by Adam Saghy
parent 9d6cf1514a
commit cac1d11ad7
1812 changed files with 22516 additions and 16862 deletions
@@ -14,23 +14,74 @@ 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'];
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'];
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'];
openSavingsColumns: string[] = [
'Account No',
'Saving Account',
'Last Active',
'Balance',
'Actions'
];
/** Closed Savings Accounts Columns */
closedSavingsColumns: string[] = ['Account No', 'Saving Account', 'Closed Date'];
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'];
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'];
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'];
upcomingChargesColumns: string[] = [
'Name',
'Due as of',
'Due',
'Paid',
'Waived',
'Outstanding',
'Actions'
];
/** Collaterals Column */
collateralsColumns: string[] = ['ID', 'Name', 'Quantity', 'Total Value', 'Total Collateral Value'];
collateralsColumns: string[] = [
'ID',
'Name',
'Quantity',
'Total Value',
'Total Collateral Value'
];
/** Client Account Data */
clientAccountData: any;
@@ -71,16 +122,18 @@ export class GeneralTabComponent {
private clientService: ClientsService,
private router: Router
) {
this.route.data.subscribe((data: { clientAccountsData: any, clientChargesData: any, clientSummary: any, clientCollateralData: any }) => {
this.clientAccountData = data.clientAccountsData;
this.savingAccounts = data.clientAccountsData.savingsAccounts;
this.loanAccounts = data.clientAccountsData.loanAccounts;
this.shareAccounts = data.clientAccountsData.shareAccounts;
this.upcomingCharges = data.clientChargesData.pageItems;
this.collaterals = data.clientCollateralData;
this.clientSummary = data.clientSummary ? data.clientSummary[0] : [];
this.clientid = this.route.parent.snapshot.params['clientId'];
});
this.route.data.subscribe(
(data: { clientAccountsData: any; clientChargesData: any; clientSummary: any; clientCollateralData: any }) => {
this.clientAccountData = data.clientAccountsData;
this.savingAccounts = data.clientAccountsData.savingsAccounts;
this.loanAccounts = data.clientAccountsData.loanAccounts;
this.shareAccounts = data.clientAccountsData.shareAccounts;
this.upcomingCharges = data.clientChargesData.pageItems;
this.collaterals = data.clientCollateralData;
this.clientSummary = data.clientSummary ? data.clientSummary[0] : [];
this.clientid = this.route.parent.snapshot.params['clientId'];
}
);
}
/**
@@ -124,7 +177,7 @@ export class GeneralTabComponent {
* @param clientId Selected Client Id.
*/
waiveCharge(chargeId: string, clientId: string) {
const charge = { clientId: clientId.toString(), resourceType: chargeId};
const charge = { clientId: clientId.toString(), resourceType: chargeId };
this.clientService.waiveClientCharge(charge).subscribe(() => {
this.getChargeData(clientId);
});
@@ -153,7 +206,16 @@ export class GeneralTabComponent {
*/
routeTransferFund(loanId: any) {
const queryParams: any = { loanId: loanId, accountType: 'fromloans' };
this.router.navigate(['../', 'loans-accounts', loanId, 'transfer-funds', 'make-account-transfer'], { relativeTo: this.route, queryParams: queryParams });
this.router.navigate(
[
'../',
'loans-accounts',
loanId,
'transfer-funds',
'make-account-transfer'
],
{ relativeTo: this.route, queryParams: queryParams }
);
}
viewAccountsLabel(closed: boolean): string {
@@ -163,5 +225,4 @@ export class GeneralTabComponent {
return 'labels.buttons.View Closed Accounts';
}
}
}