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
@@ -8,9 +8,8 @@ describe('ChargesTabComponent', () => {
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ ChargesTabComponent ]
})
.compileComponents();
declarations: [ChargesTabComponent]
}).compileComponents();
}));
beforeEach(() => {
@@ -12,7 +12,6 @@ import { ActivatedRoute } from '@angular/router';
styleUrls: ['./charges-tab.component.scss']
})
export class ChargesTabComponent implements OnInit {
/** Shares Account Data */
sharesAccountData: any;
/** Charges Data */
@@ -20,7 +19,17 @@ export class ChargesTabComponent implements OnInit {
/** Data source for charges table. */
dataSource: MatTableDataSource<any>;
/** Columns to be displayed in charges table. */
displayedColumns: string[] = ['name', 'feeOrPenalty', 'paymentDueAt', 'calculationType', 'due', 'paid', 'waived', 'outstanding', 'actions' ];
displayedColumns: string[] = [
'name',
'feeOrPenalty',
'paymentDueAt',
'calculationType',
'due',
'paid',
'waived',
'outstanding',
'actions'
];
/**
* Retrieves shares account aata from `resolve`.
@@ -35,8 +44,7 @@ export class ChargesTabComponent implements OnInit {
}
ngOnInit() {
const activeCharges = this.chargesData ? this.chargesData.filter(charge => charge.isActive) : [];
const activeCharges = this.chargesData ? this.chargesData.filter((charge) => charge.isActive) : [];
this.dataSource = new MatTableDataSource(activeCharges);
}
}
@@ -8,9 +8,8 @@ describe('DividendsTabComponent', () => {
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ DividendsTabComponent ]
})
.compileComponents();
declarations: [DividendsTabComponent]
}).compileComponents();
}));
beforeEach(() => {
@@ -12,7 +12,6 @@ import { ActivatedRoute } from '@angular/router';
styleUrls: ['./dividends-tab.component.scss']
})
export class DividendsTabComponent implements OnInit {
/** Shares Account Data */
shareAccountData: any;
/** Dividends Data */
@@ -41,5 +40,4 @@ export class DividendsTabComponent implements OnInit {
ngOnInit() {
this.dataSource = new MatTableDataSource(this.dividendsData);
}
}
@@ -8,9 +8,8 @@ describe('GeneralTabComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ GeneralTabComponent ]
})
.compileComponents();
declarations: [GeneralTabComponent]
}).compileComponents();
fixture = TestBed.createComponent(GeneralTabComponent);
component = fixture.componentInstance;
@@ -19,5 +19,4 @@ export class GeneralTabComponent {
this.sharesAccountData = data.sharesAccountData;
});
}
}
@@ -8,9 +8,8 @@ describe('SharesAccountViewComponent', () => {
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ SharesAccountViewComponent ]
})
.compileComponents();
declarations: [SharesAccountViewComponent]
}).compileComponents();
}));
beforeEach(() => {
@@ -21,7 +21,6 @@ import { SharesButtonsConfiguration } from './shares-buttons.config';
styleUrls: ['./shares-account-view.component.scss']
})
export class SharesAccountViewComponent implements OnInit {
/** Shares Account Data */
sharesAccountData: any;
/** Button Configurations */
@@ -36,10 +35,12 @@ export class SharesAccountViewComponent implements OnInit {
* @param {SharesService} sharesService Shares Service
* @param {MatDialog} dialog Mat Dialog
*/
constructor(private route: ActivatedRoute,
private router: Router,
private sharesService: SharesService,
public dialog: MatDialog) {
constructor(
private route: ActivatedRoute,
private router: Router,
private sharesService: SharesService,
public dialog: MatDialog
) {
this.route.data.subscribe((data: { sharesAccountData: any }) => {
this.sharesAccountData = data.sharesAccountData;
});
@@ -77,7 +78,10 @@ export class SharesAccountViewComponent implements OnInit {
const purchasedShares: any[] = this.sharesAccountData.purchasedShares;
let sharesPendingForApproval = false;
purchasedShares.forEach((share: any) => {
if (share.status.code === 'purchasedSharesStatusType.applied' && share.type.code === 'purchasedSharesType.purchased') {
if (
share.status.code === 'purchasedSharesStatusType.applied' &&
share.type.code === 'purchasedSharesType.purchased'
) {
sharesPendingForApproval = true;
}
});
@@ -129,5 +133,4 @@ export class SharesAccountViewComponent implements OnInit {
}
});
}
}
@@ -1,15 +1,14 @@
/** Shares Account Buttons Configuration */
export class SharesButtonsConfiguration {
optionArray: {
name: string,
taskPermissionName: string,
name: string;
taskPermissionName: string;
}[];
buttonsArray: {
name: string,
icon: string,
taskPermissionName: string,
name: string;
icon: string;
taskPermissionName: string;
}[];
constructor(status: string) {
@@ -86,7 +85,7 @@ export class SharesButtonsConfiguration {
setOptions(status: string) {
switch (status) {
case 'Active':
case 'Active':
this.optionArray = [
{
name: 'Close',
@@ -112,14 +111,13 @@ export class SharesButtonsConfiguration {
}
}
addOption(option: {name: string, taskPermissionName: string}) {
addOption(option: { name: string; taskPermissionName: string }) {
this.optionArray.push(option);
}
removeButton(name: string) {
const buttonNames = this.buttonsArray.map(entry => entry.name);
const buttonNames = this.buttonsArray.map((entry) => entry.name);
const index = buttonNames.indexOf(name);
this.buttonsArray.splice(index, 1);
}
}
@@ -8,9 +8,8 @@ describe('TransactionsTabComponent', () => {
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ TransactionsTabComponent ]
})
.compileComponents();
declarations: [TransactionsTabComponent]
}).compileComponents();
}));
beforeEach(() => {
@@ -12,7 +12,6 @@ import { ActivatedRoute } from '@angular/router';
styleUrls: ['./transactions-tab.component.scss']
})
export class TransactionsTabComponent implements OnInit {
/** Shares Account Data */
shareAccountData: any;
/** Transactions Data */
@@ -43,5 +42,4 @@ export class TransactionsTabComponent implements OnInit {
ngOnInit() {
this.dataSource = new MatTableDataSource(this.transactionsData);
}
}