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
@@ -23,7 +23,6 @@ import { SettingsService } from 'app/settings/settings.service';
styleUrls: ['./reject-shares.component.scss']
})
export class RejectSharesComponent implements OnInit {
/** Shares account data. */
sharesAccountData: any;
@@ -32,7 +31,13 @@ export class RejectSharesComponent implements OnInit {
/** Shares account data. */
sharesData: any[];
/** Columns to be displayed in shares table. */
displayedColumns: string[] = ['transactionDate', 'totalShares', 'redeemedPrice', 'status', 'reject'];
displayedColumns: string[] = [
'transactionDate',
'totalShares',
'redeemedPrice',
'status',
'reject'
];
/** Data source for shares table. */
dataSource: MatTableDataSource<any>;
@@ -49,10 +54,12 @@ export class RejectSharesComponent implements OnInit {
* @param {MatDialog} dialog Mat Dialog
* @param {SettingsService} settingsService Settings Service.
*/
constructor(private sharesService: SharesService,
private route: ActivatedRoute,
public dialog: MatDialog,
private settingsService: SettingsService) {
constructor(
private sharesService: SharesService,
private route: ActivatedRoute,
public dialog: MatDialog,
private settingsService: SettingsService
) {
this.accountId = this.route.parent.snapshot.params['shareAccountId'];
this.route.data.subscribe((data: { shareAccountActionData: any }) => {
this.sharesAccountData = data.shareAccountActionData;
@@ -63,8 +70,9 @@ export class RejectSharesComponent implements OnInit {
* Sets the shares table.
*/
ngOnInit() {
this.sharesData = this.sharesAccountData.purchasedShares
.filter((share: any) => share.status.value === 'Pending Approval');
this.sharesData = this.sharesAccountData.purchasedShares.filter(
(share: any) => share.status.value === 'Pending Approval'
);
this.setShares();
}
@@ -90,12 +98,12 @@ export class RejectSharesComponent implements OnInit {
const locale = this.settingsService.language.code;
const dateFormat = this.settingsService.dateFormat;
const data = {
requestedShares: [{id}],
requestedShares: [{ id }],
dateFormat,
locale
};
this.sharesService.executeSharesAccountCommand(this.accountId, 'rejectadditionalshares', data).subscribe(() => {
const share = this.sharesData.find(element => element.id === id);
const share = this.sharesData.find((element) => element.id === id);
const index = this.sharesData.indexOf(share);
this.sharesData.splice(index, 1);
this.dataSource.data = this.sharesData;
@@ -104,5 +112,4 @@ export class RejectSharesComponent implements OnInit {
}
});
}
}