build: Use prettier for typescript
Stop ignoring .ts files in prettier and fix existing issues.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/** Angular Imports */
|
||||
import { Injectable } from '@angular/core';
|
||||
import {ActivatedRouteSnapshot, Resolve} from '@angular/router';
|
||||
import { ActivatedRouteSnapshot, Resolve } from '@angular/router';
|
||||
|
||||
/** rxjs Imports */
|
||||
import { Observable } from 'rxjs';
|
||||
@@ -13,7 +13,6 @@ import { SystemService } from '../../system.service';
|
||||
*/
|
||||
@Injectable()
|
||||
export class HookResolver implements Resolve<Object> {
|
||||
|
||||
/**
|
||||
* @param {SystemService} systemService System service.
|
||||
*/
|
||||
@@ -27,5 +26,4 @@ export class HookResolver implements Resolve<Object> {
|
||||
const hookId = route.paramMap.get('id');
|
||||
return this.systemService.getHook(hookId);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -8,9 +8,8 @@ describe('ViewHookComponent', () => {
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ ViewHookComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
declarations: [ViewHookComponent]
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
|
||||
@@ -19,7 +19,6 @@ import { SystemService } from '../../system.service';
|
||||
styleUrls: ['./view-hook.component.scss']
|
||||
})
|
||||
export class ViewHookComponent {
|
||||
|
||||
/** Hook Data. */
|
||||
hookData: any;
|
||||
|
||||
@@ -31,11 +30,13 @@ export class ViewHookComponent {
|
||||
* @param {Router} router Router for navigation.
|
||||
* @param {TranslateService} translateService Translate Service.
|
||||
*/
|
||||
constructor(private route: ActivatedRoute,
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private dialog: MatDialog,
|
||||
private systemService: SystemService,
|
||||
private router: Router,
|
||||
private translateService: TranslateService) {
|
||||
private translateService: TranslateService
|
||||
) {
|
||||
this.route.data.subscribe((data: { hook: any }) => {
|
||||
this.hookData = data.hook;
|
||||
});
|
||||
@@ -50,12 +51,10 @@ export class ViewHookComponent {
|
||||
});
|
||||
deleteHookDialogRef.afterClosed().subscribe((response: any) => {
|
||||
if (response.delete) {
|
||||
this.systemService.deleteHook(this.hookData.id)
|
||||
.subscribe(() => {
|
||||
this.router.navigate(['/system/hooks']);
|
||||
});
|
||||
this.systemService.deleteHook(this.hookData.id).subscribe(() => {
|
||||
this.router.navigate(['/system/hooks']);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user