build: Use prettier for typescript
Stop ignoring .ts files in prettier and fix existing issues.
This commit is contained in:
@@ -8,9 +8,8 @@ describe('EditFundComponent', () => {
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ EditFundComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
declarations: [EditFundComponent]
|
||||
}).compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
||||
@@ -9,7 +9,6 @@ import { OrganizationService } from 'app/organization/organization.service';
|
||||
styleUrls: ['./edit-fund.component.scss']
|
||||
})
|
||||
export class EditFundComponent implements OnInit {
|
||||
|
||||
/** Selected Data. */
|
||||
fundData: any;
|
||||
/** Charge form. */
|
||||
@@ -22,10 +21,12 @@ export class EditFundComponent implements OnInit {
|
||||
* @param {ActivatedRoute} route Activated Route.
|
||||
* @param {Router} router Router for navigation.
|
||||
*/
|
||||
constructor(private organizationService: OrganizationService,
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private router: Router,
|
||||
private route: ActivatedRoute) {
|
||||
constructor(
|
||||
private organizationService: OrganizationService,
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private router: Router,
|
||||
private route: ActivatedRoute
|
||||
) {
|
||||
this.route.data.subscribe((data: { fundData: any }) => {
|
||||
this.fundData = data.fundData;
|
||||
});
|
||||
@@ -40,17 +41,18 @@ export class EditFundComponent implements OnInit {
|
||||
*/
|
||||
createFundForm() {
|
||||
this.fundForm = this.formBuilder.group({
|
||||
'name': [this.fundData.name, Validators.required],
|
||||
'externalId': [this.fundData.externalId]
|
||||
name: [
|
||||
this.fundData.name,
|
||||
Validators.required
|
||||
],
|
||||
externalId: [this.fundData.externalId]
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
submit() {
|
||||
const payload = this.fundForm.getRawValue();
|
||||
this.organizationService.editFund(this.fundData.id.toString(), payload)
|
||||
.subscribe((response: any) => {
|
||||
this.router.navigate(['../'], { relativeTo: this.route });
|
||||
});
|
||||
this.organizationService.editFund(this.fundData.id.toString(), payload).subscribe((response: any) => {
|
||||
this.router.navigate(['../'], { relativeTo: this.route });
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user