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('LoansAccountCloseComponent', () => {
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ LoansAccountCloseComponent ]
})
.compileComponents();
declarations: [LoansAccountCloseComponent]
}).compileComponents();
}));
beforeEach(() => {
@@ -14,7 +14,6 @@ import { Dates } from 'app/core/utils/dates';
styleUrls: ['./loans-account-close.component.scss']
})
export class LoansAccountCloseComponent implements OnInit {
@Input() dataObject: any;
/** Close form. */
@@ -33,14 +32,16 @@ export class LoansAccountCloseComponent implements OnInit {
* @param {Router} router Router for navigation.
* @param {SettingsService} settingsService Settings Service
*/
constructor(private formBuilder: UntypedFormBuilder,
constructor(
private formBuilder: UntypedFormBuilder,
private loanService: LoansService,
private route: ActivatedRoute,
private router: Router,
private dateUtils: Dates,
private settingsService: SettingsService) {
this.loanId = this.route.snapshot.params['loanId'];
}
private settingsService: SettingsService
) {
this.loanId = this.route.snapshot.params['loanId'];
}
/**
* Creates the close form.
@@ -55,8 +56,11 @@ export class LoansAccountCloseComponent implements OnInit {
*/
createCloseForm() {
this.closeLoanForm = this.formBuilder.group({
'transactionDate': [new Date(this.dataObject.date) || new Date(), Validators.required],
'note': []
transactionDate: [
new Date(this.dataObject.date) || new Date(),
Validators.required
],
note: []
});
}
@@ -77,10 +81,8 @@ export class LoansAccountCloseComponent implements OnInit {
dateFormat,
locale
};
this.loanService.submitLoanActionButton(this.loanId, data, 'close')
.subscribe((response: any) => {
this.router.navigate(['../../general'], { relativeTo: this.route });
this.loanService.submitLoanActionButton(this.loanId, data, 'close').subscribe((response: any) => {
this.router.navigate(['../../general'], { relativeTo: this.route });
});
}
}