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('GlAccountSelectorComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ GlAccountSelectorComponent ]
})
.compileComponents();
declarations: [GlAccountSelectorComponent]
}).compileComponents();
fixture = TestBed.createComponent(GlAccountSelectorComponent);
component = fixture.componentInstance;
@@ -11,7 +11,6 @@ import { takeUntil } from 'rxjs/operators';
styleUrls: ['./gl-account-selector.component.scss']
})
export class GlAccountSelectorComponent implements OnInit, OnChanges, OnDestroy {
@Input() inputFormControl: UntypedFormControl;
@Input() glAccountList: GLAccount[] = [];
@Input() required = false;
@@ -29,15 +28,13 @@ export class GlAccountSelectorComponent implements OnInit, OnChanges, OnDestroy
placeHolderLabel = '';
noEntriesFoundLabel = '';
constructor(private translateService: TranslateService) { }
constructor(private translateService: TranslateService) {}
ngOnInit(): void {
// listen for search field value changes
this.filterFormCtrl.valueChanges
.pipe(takeUntil(this._onDestroy))
.subscribe(() => {
this.searchGLAccount();
});
this.filterFormCtrl.valueChanges.pipe(takeUntil(this._onDestroy)).subscribe(() => {
this.searchGLAccount();
});
this.placeHolderLabel = this.translateService.instant('labels.inputs.Filter');
this.noEntriesFoundLabel = this.translateService.instant('labels.text.No data found');
@@ -59,13 +56,14 @@ export class GlAccountSelectorComponent implements OnInit, OnChanges, OnDestroy
const search: string = this.filterFormCtrl.value.toLowerCase();
if (!search) {
this.glAccountData.next(this.glAccountList.slice());
this.glAccountData.next(this.glAccountList.slice());
} else {
this.glAccountData.next(this.glAccountList.filter((option: GLAccount) => {
return option.name.toLowerCase().indexOf(search) >= 0 || option.glCode.toLowerCase().indexOf(search) >= 0;
}));
this.glAccountData.next(
this.glAccountList.filter((option: GLAccount) => {
return option.name.toLowerCase().indexOf(search) >= 0 || option.glCode.toLowerCase().indexOf(search) >= 0;
})
);
}
}
}
}