build: Use prettier for typescript
Stop ignoring .ts files in prettier and fix existing issues.
This commit is contained in:
+2
-3
@@ -8,9 +8,8 @@ describe('TransactionsTabComponent', () => {
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ TransactionsTabComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
declarations: [TransactionsTabComponent]
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
|
||||
+33
-12
@@ -25,7 +25,16 @@ export class TransactionsTabComponent implements OnInit {
|
||||
hideAccrualsParam: UntypedFormControl;
|
||||
hideReversedParam: UntypedFormControl;
|
||||
/** Columns to be displayed in transactions table. */
|
||||
displayedColumns: string[] = ['row', 'id', 'transactionDate', 'transactionType', 'debit', 'credit', 'balance', 'actions'];
|
||||
displayedColumns: string[] = [
|
||||
'row',
|
||||
'id',
|
||||
'transactionDate',
|
||||
'transactionType',
|
||||
'debit',
|
||||
'credit',
|
||||
'balance',
|
||||
'actions'
|
||||
];
|
||||
/** Data source for transactions table. */
|
||||
dataSource: MatTableDataSource<any>;
|
||||
@ViewChild(MatPaginator, { static: true }) paginator: MatPaginator;
|
||||
@@ -36,9 +45,11 @@ export class TransactionsTabComponent implements OnInit {
|
||||
* @param {ActivatedRoute} route Activated Route.
|
||||
* @param {Router} router Router
|
||||
*/
|
||||
constructor(private route: ActivatedRoute,
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
public dialog: MatDialog) {
|
||||
public dialog: MatDialog
|
||||
) {
|
||||
this.route.parent.data.subscribe((data: { fixedDepositsAccountData: any }) => {
|
||||
this.transactionsData = data.fixedDepositsAccountData.transactions;
|
||||
this.accountId = this.route.parent.snapshot.params['fixedDepositAccountId'];
|
||||
@@ -56,8 +67,14 @@ export class TransactionsTabComponent implements OnInit {
|
||||
* Checks transaction status.
|
||||
*/
|
||||
checkStatus() {
|
||||
if (this.status === 'Active' || this.status === 'Closed' || this.status === 'Transfer in progress' ||
|
||||
this.status === 'Transfer on hold' || this.status === 'Premature Closed' || this.status === 'Matured') {
|
||||
if (
|
||||
this.status === 'Active' ||
|
||||
this.status === 'Closed' ||
|
||||
this.status === 'Transfer in progress' ||
|
||||
this.status === 'Transfer on hold' ||
|
||||
this.status === 'Premature Closed' ||
|
||||
this.status === 'Matured'
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -68,8 +85,12 @@ export class TransactionsTabComponent implements OnInit {
|
||||
* @param {any} transactionType Transaction Type
|
||||
*/
|
||||
isDebit(transactionType: any) {
|
||||
return transactionType.withdrawal === true || transactionType.feeDeduction === true
|
||||
|| transactionType.overdraftInterest === true || transactionType.withholdTax === true;
|
||||
return (
|
||||
transactionType.withdrawal === true ||
|
||||
transactionType.feeDeduction === true ||
|
||||
transactionType.overdraftInterest === true ||
|
||||
transactionType.withholdTax === true
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -78,7 +99,9 @@ export class TransactionsTabComponent implements OnInit {
|
||||
*/
|
||||
showTransactions(transactionsData: any) {
|
||||
if (transactionsData.transfer) {
|
||||
this.router.navigate([`account-transfers/account-transfers/${transactionsData.transfer.id}`], { relativeTo: this.route });
|
||||
this.router.navigate([`account-transfers/account-transfers/${transactionsData.transfer.id}`], {
|
||||
relativeTo: this.route
|
||||
});
|
||||
} else {
|
||||
this.router.navigate([transactionsData.id], { relativeTo: this.route });
|
||||
}
|
||||
@@ -97,7 +120,7 @@ export class TransactionsTabComponent implements OnInit {
|
||||
|
||||
if (hideAccrual || hideReversed) {
|
||||
transactions = this.transactionsData.filter((t: SavingsAccountTransaction) => {
|
||||
return (!(hideReversed && t.reversed) && !(hideAccrual && t.transactionType.accrual));
|
||||
return !(hideReversed && t.reversed) && !(hideAccrual && t.transactionType.accrual);
|
||||
});
|
||||
}
|
||||
this.dataSource = new MatTableDataSource(transactions);
|
||||
@@ -125,7 +148,5 @@ export class TransactionsTabComponent implements OnInit {
|
||||
$event.stopPropagation();
|
||||
}
|
||||
|
||||
undoTransaction(transactionData: SavingsAccountTransaction): void {
|
||||
|
||||
}
|
||||
undoTransaction(transactionData: SavingsAccountTransaction): void {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user