fix lint
CureNetMulti/pipeline/head There was a failure building this commit
Details
CureNetMulti/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
c2a2a83fb5
commit
ce8d2318a1
|
@ -29,7 +29,6 @@ export class AppComponent implements AfterContentInit {
|
|||
appRoutes = appRoutes;
|
||||
user: UserModel;
|
||||
loaded = false;
|
||||
//isSidebarHidden = false;
|
||||
dynamicToolbarComponents = [];
|
||||
roles: UserRoleEnum[] = [ UserRoleEnum.None ];
|
||||
|
||||
|
@ -53,7 +52,7 @@ export class AppComponent implements AfterContentInit {
|
|||
) {
|
||||
}
|
||||
|
||||
ngAfterContentInit () {
|
||||
ngAfterContentInit(): void {
|
||||
this.configureResizeEvents();
|
||||
this.configureUserEvents();
|
||||
this.configureSidebarEvents();
|
||||
|
@ -68,7 +67,7 @@ export class AppComponent implements AfterContentInit {
|
|||
this.authService.userChange.subscribe(user => this.setUser(user));
|
||||
}
|
||||
|
||||
setUser(user: UserModel) {
|
||||
setUser(user: UserModel): void {
|
||||
console.log({user, cuser: this.user});
|
||||
if (!user && !this.user) {
|
||||
return;
|
||||
|
@ -87,10 +86,6 @@ export class AppComponent implements AfterContentInit {
|
|||
}
|
||||
|
||||
configureSidebarEvents(): void {
|
||||
//this.isSidebarHidden = this.appService.getSidebarHidden();
|
||||
//this.appService.sidebarHiddenChange.subscribe(hidden => {
|
||||
// this.isSidebarHidden = hidden;
|
||||
//});
|
||||
const sidebarUserPrefference = this.browserStorageService.getItem('sidebar.open');
|
||||
if (sidebarUserPrefference !== null) {
|
||||
this.sidebarOpen = sidebarUserPrefference;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { UserRoleEnum } from "../enums/user-role.enum";
|
||||
import { UserRoleEnum } from '../enums/user-role.enum';
|
||||
|
||||
export interface UserModel {
|
||||
id: number;
|
||||
|
|
|
@ -67,7 +67,6 @@ export class ProfileEditBasicsComponent implements OnInit {
|
|||
phones,
|
||||
emails,
|
||||
});
|
||||
window['form'] = this.form;
|
||||
|
||||
this.countryService.getCountries().subscribe(countries => {
|
||||
this.countries = countries;
|
||||
|
@ -90,7 +89,7 @@ export class ProfileEditBasicsComponent implements OnInit {
|
|||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
scroll(e) {
|
||||
scroll(e): void {
|
||||
const scrollTop = e.target?.scrollTop;
|
||||
if (Number(scrollTop) === scrollTop) {
|
||||
this.placeholderBoxHeight = Math.min(scrollTop, this.headerHeight);
|
||||
|
@ -98,11 +97,11 @@ export class ProfileEditBasicsComponent implements OnInit {
|
|||
}
|
||||
}
|
||||
|
||||
filterCountries(name: string) {
|
||||
filterCountries(name: string): CountryModel[] {
|
||||
return this.countries.filter(i => i.name.toLowerCase().includes(name));
|
||||
}
|
||||
|
||||
countryFieldChanged(event) {
|
||||
countryFieldChanged(event): void {
|
||||
this.countryInput = event.target.value.toLowerCase();
|
||||
this.countryInputChnage.next(this.countryInput);
|
||||
}
|
||||
|
|
|
@ -79,7 +79,7 @@ export class ProfileEditComponent implements OnInit {
|
|||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
activated(component) {
|
||||
activated(component): void {
|
||||
if (component.onContentScroll) {
|
||||
component.headerHeight = this.headerContent.nativeElement.scrollHeight;
|
||||
setTimeout(() => {
|
||||
|
@ -93,7 +93,7 @@ export class ProfileEditComponent implements OnInit {
|
|||
}
|
||||
}
|
||||
|
||||
deactivated(component) {
|
||||
deactivated(component): void {
|
||||
this.scrolled = 0;
|
||||
this.scrollSubscriptions.forEach(i => i.unsubscribe());
|
||||
this.scrollSubscriptions = [];
|
||||
|
|
|
@ -7,7 +7,7 @@ import { NotificationService } from '../../notification/notification.service';
|
|||
@Injectable()
|
||||
export class ErrorHandlerInterceptor implements HttpInterceptor {
|
||||
|
||||
get notificationService() {
|
||||
get notificationService():. NotificationService {
|
||||
return this.injector.get(NotificationService);
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@ export class ErrorHandlerInterceptor implements HttpInterceptor {
|
|||
intercept(httpRequest: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
|
||||
return next.handle(httpRequest).pipe(
|
||||
catchError(response => {
|
||||
switch(response.status) {
|
||||
switch (response.status) {
|
||||
case 406:
|
||||
if (response.error instanceof Blob && response.error.type === 'application/json') {
|
||||
const result = new Promise((resolve) => {
|
||||
|
@ -41,10 +41,10 @@ export class ErrorHandlerInterceptor implements HttpInterceptor {
|
|||
}
|
||||
return throwError(response);
|
||||
})
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
displayNotificationIfValidationError(response) {
|
||||
displayNotificationIfValidationError(response): void {
|
||||
console.log({response});
|
||||
if (response?.error?.data) {
|
||||
this.notificationService.error(response.error.data);
|
||||
|
|
|
@ -12,10 +12,10 @@ export class NotificationService {
|
|||
|
||||
constructor(private snackBar: MatSnackBar) { }
|
||||
|
||||
notify(type: NotificationType, title: string) {
|
||||
notify(type: NotificationType, title: string): void {
|
||||
let action: string;
|
||||
let panelClass: string;
|
||||
let duration = 1500000;
|
||||
const duration = 1500000;
|
||||
|
||||
switch (type) {
|
||||
case NotificationType.Success:
|
||||
|
@ -35,11 +35,11 @@ export class NotificationService {
|
|||
});
|
||||
}
|
||||
|
||||
success(title: string) {
|
||||
success(title: string): void {
|
||||
return this.notify(NotificationType.Success, title);
|
||||
}
|
||||
|
||||
error(title: string) {
|
||||
error(title: string): void {
|
||||
return this.notify(NotificationType.Error, title);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue