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
@@ -13,7 +13,6 @@ import { AccountingService } from '../../accounting.service';
*/
@Injectable()
export class ProvisioningJournalEntriesResolver implements Resolve<Object> {
/**
* @param {AccountingService} accountingService Accounting service.
*/
@@ -27,5 +26,4 @@ export class ProvisioningJournalEntriesResolver implements Resolve<Object> {
const id = route.paramMap.get('id');
return this.accountingService.getProvisioningJournalEntries(id);
}
}
@@ -8,9 +8,8 @@ describe('ViewProvisioningJournalEntriesComponent', () => {
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ ViewProvisioningJournalEntriesComponent ]
})
.compileComponents();
declarations: [ViewProvisioningJournalEntriesComponent]
}).compileComponents();
}));
beforeEach(() => {
@@ -14,11 +14,21 @@ import { MatTableDataSource } from '@angular/material/table';
styleUrls: ['./view-provisioning-journal-entries.component.scss']
})
export class ViewProvisioningJournalEntriesComponent implements OnInit {
/** Provisioning journal entry data. */
provisioningJournalEntryData: any;
/** Columns to be displayed in provisioning journal entries table. */
displayedColumns: string[] = ['id', 'officeName', 'transactionDate', 'transactionId', 'glAccountType', 'createdByUserName', 'glAccountCode', 'glAccountName', 'debit', 'credit'];
displayedColumns: string[] = [
'id',
'officeName',
'transactionDate',
'transactionId',
'glAccountType',
'createdByUserName',
'glAccountCode',
'glAccountName',
'debit',
'credit'
];
/** Data source for provisioning journal entries table. */
dataSource: MatTableDataSource<any>;
@@ -52,10 +62,14 @@ export class ViewProvisioningJournalEntriesComponent implements OnInit {
this.dataSource.paginator = this.paginator;
this.dataSource.sortingDataAccessor = (transaction: any, property: any) => {
switch (property) {
case 'glAccountType': return transaction.glAccountType.value;
case 'debit': return transaction.amount;
case 'credit': return transaction.amount;
default: return transaction[property];
case 'glAccountType':
return transaction.glAccountType.value;
case 'debit':
return transaction.amount;
case 'credit':
return transaction.amount;
default:
return transaction[property];
}
};
this.dataSource.sort = this.sort;
@@ -68,5 +82,4 @@ export class ViewProvisioningJournalEntriesComponent implements OnInit {
applyFilter(filterValue: string) {
this.dataSource.filter = filterValue.trim().toLowerCase();
}
}