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;
|
appRoutes = appRoutes;
|
||||||
user: UserModel;
|
user: UserModel;
|
||||||
loaded = false;
|
loaded = false;
|
||||||
//isSidebarHidden = false;
|
|
||||||
dynamicToolbarComponents = [];
|
dynamicToolbarComponents = [];
|
||||||
roles: UserRoleEnum[] = [ UserRoleEnum.None ];
|
roles: UserRoleEnum[] = [ UserRoleEnum.None ];
|
||||||
|
|
||||||
|
@ -53,7 +52,7 @@ export class AppComponent implements AfterContentInit {
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ngAfterContentInit () {
|
ngAfterContentInit(): void {
|
||||||
this.configureResizeEvents();
|
this.configureResizeEvents();
|
||||||
this.configureUserEvents();
|
this.configureUserEvents();
|
||||||
this.configureSidebarEvents();
|
this.configureSidebarEvents();
|
||||||
|
@ -68,7 +67,7 @@ export class AppComponent implements AfterContentInit {
|
||||||
this.authService.userChange.subscribe(user => this.setUser(user));
|
this.authService.userChange.subscribe(user => this.setUser(user));
|
||||||
}
|
}
|
||||||
|
|
||||||
setUser(user: UserModel) {
|
setUser(user: UserModel): void {
|
||||||
console.log({user, cuser: this.user});
|
console.log({user, cuser: this.user});
|
||||||
if (!user && !this.user) {
|
if (!user && !this.user) {
|
||||||
return;
|
return;
|
||||||
|
@ -87,10 +86,6 @@ export class AppComponent implements AfterContentInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
configureSidebarEvents(): void {
|
configureSidebarEvents(): void {
|
||||||
//this.isSidebarHidden = this.appService.getSidebarHidden();
|
|
||||||
//this.appService.sidebarHiddenChange.subscribe(hidden => {
|
|
||||||
// this.isSidebarHidden = hidden;
|
|
||||||
//});
|
|
||||||
const sidebarUserPrefference = this.browserStorageService.getItem('sidebar.open');
|
const sidebarUserPrefference = this.browserStorageService.getItem('sidebar.open');
|
||||||
if (sidebarUserPrefference !== null) {
|
if (sidebarUserPrefference !== null) {
|
||||||
this.sidebarOpen = sidebarUserPrefference;
|
this.sidebarOpen = sidebarUserPrefference;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { UserRoleEnum } from "../enums/user-role.enum";
|
import { UserRoleEnum } from '../enums/user-role.enum';
|
||||||
|
|
||||||
export interface UserModel {
|
export interface UserModel {
|
||||||
id: number;
|
id: number;
|
||||||
|
|
|
@ -67,7 +67,6 @@ export class ProfileEditBasicsComponent implements OnInit {
|
||||||
phones,
|
phones,
|
||||||
emails,
|
emails,
|
||||||
});
|
});
|
||||||
window['form'] = this.form;
|
|
||||||
|
|
||||||
this.countryService.getCountries().subscribe(countries => {
|
this.countryService.getCountries().subscribe(countries => {
|
||||||
this.countries = countries;
|
this.countries = countries;
|
||||||
|
@ -90,7 +89,7 @@ export class ProfileEditBasicsComponent implements OnInit {
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
}
|
}
|
||||||
|
|
||||||
scroll(e) {
|
scroll(e): void {
|
||||||
const scrollTop = e.target?.scrollTop;
|
const scrollTop = e.target?.scrollTop;
|
||||||
if (Number(scrollTop) === scrollTop) {
|
if (Number(scrollTop) === scrollTop) {
|
||||||
this.placeholderBoxHeight = Math.min(scrollTop, this.headerHeight);
|
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));
|
return this.countries.filter(i => i.name.toLowerCase().includes(name));
|
||||||
}
|
}
|
||||||
|
|
||||||
countryFieldChanged(event) {
|
countryFieldChanged(event): void {
|
||||||
this.countryInput = event.target.value.toLowerCase();
|
this.countryInput = event.target.value.toLowerCase();
|
||||||
this.countryInputChnage.next(this.countryInput);
|
this.countryInputChnage.next(this.countryInput);
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,7 +79,7 @@ export class ProfileEditComponent implements OnInit {
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
}
|
}
|
||||||
|
|
||||||
activated(component) {
|
activated(component): void {
|
||||||
if (component.onContentScroll) {
|
if (component.onContentScroll) {
|
||||||
component.headerHeight = this.headerContent.nativeElement.scrollHeight;
|
component.headerHeight = this.headerContent.nativeElement.scrollHeight;
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
@ -93,7 +93,7 @@ export class ProfileEditComponent implements OnInit {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
deactivated(component) {
|
deactivated(component): void {
|
||||||
this.scrolled = 0;
|
this.scrolled = 0;
|
||||||
this.scrollSubscriptions.forEach(i => i.unsubscribe());
|
this.scrollSubscriptions.forEach(i => i.unsubscribe());
|
||||||
this.scrollSubscriptions = [];
|
this.scrollSubscriptions = [];
|
||||||
|
|
|
@ -7,7 +7,7 @@ import { NotificationService } from '../../notification/notification.service';
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class ErrorHandlerInterceptor implements HttpInterceptor {
|
export class ErrorHandlerInterceptor implements HttpInterceptor {
|
||||||
|
|
||||||
get notificationService() {
|
get notificationService():. NotificationService {
|
||||||
return this.injector.get(NotificationService);
|
return this.injector.get(NotificationService);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,10 +41,10 @@ export class ErrorHandlerInterceptor implements HttpInterceptor {
|
||||||
}
|
}
|
||||||
return throwError(response);
|
return throwError(response);
|
||||||
})
|
})
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
displayNotificationIfValidationError(response) {
|
displayNotificationIfValidationError(response): void {
|
||||||
console.log({response});
|
console.log({response});
|
||||||
if (response?.error?.data) {
|
if (response?.error?.data) {
|
||||||
this.notificationService.error(response.error.data);
|
this.notificationService.error(response.error.data);
|
||||||
|
|
|
@ -12,10 +12,10 @@ export class NotificationService {
|
||||||
|
|
||||||
constructor(private snackBar: MatSnackBar) { }
|
constructor(private snackBar: MatSnackBar) { }
|
||||||
|
|
||||||
notify(type: NotificationType, title: string) {
|
notify(type: NotificationType, title: string): void {
|
||||||
let action: string;
|
let action: string;
|
||||||
let panelClass: string;
|
let panelClass: string;
|
||||||
let duration = 1500000;
|
const duration = 1500000;
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case NotificationType.Success:
|
case NotificationType.Success:
|
||||||
|
@ -35,11 +35,11 @@ export class NotificationService {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
success(title: string) {
|
success(title: string): void {
|
||||||
return this.notify(NotificationType.Success, title);
|
return this.notify(NotificationType.Success, title);
|
||||||
}
|
}
|
||||||
|
|
||||||
error(title: string) {
|
error(title: string): void {
|
||||||
return this.notify(NotificationType.Error, title);
|
return this.notify(NotificationType.Error, title);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue