X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=src%2Fapp%2Fusers%2Fuser-details%2FUserDetailsComponent.ts;h=ba244541feb2e6c9a7ec80806463bdc94a9fffbc;hb=0a34dfa32165036b380ec6ac493469b34007df0a;hp=aede6e2edd6ac420ddf86de29fabf1262bffe495;hpb=40cc37ef2bbc4aac5debc9dea0baeb6dbd87a2d7;p=osm%2FNG-UI.git diff --git a/src/app/users/user-details/UserDetailsComponent.ts b/src/app/users/user-details/UserDetailsComponent.ts index aede6e2..ba24454 100644 --- a/src/app/users/user-details/UserDetailsComponent.ts +++ b/src/app/users/user-details/UserDetailsComponent.ts @@ -18,6 +18,7 @@ /** * @file users details Component. */ +import { isNullOrUndefined } from 'util'; import { Component, Injector, OnDestroy, OnInit } from '@angular/core'; import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap'; import { TranslateService } from '@ngx-translate/core'; @@ -32,7 +33,6 @@ import { Subscription } from 'rxjs'; import { SharedService } from 'SharedService'; import { UserData, UserDetail } from 'UserModel'; import { UsersActionComponent } from 'UsersActionComponent'; -import { isNullOrUndefined } from 'util'; /** * Creating component @@ -146,6 +146,7 @@ export class UserDetailsComponent implements OnInit, OnDestroy { /** on Navigate to Composer Page @public */ public composeUser(): void { + // eslint-disable-next-line security/detect-non-literal-fs-filename const modalRef: NgbModalRef = this.modalService.open(AddEditUserComponent, { backdrop: 'static' }); modalRef.componentInstance.userTitle = this.translateService.instant('PAGE.USERS.NEWUSER'); modalRef.componentInstance.userType = 'add'; @@ -153,7 +154,9 @@ export class UserDetailsComponent implements OnInit, OnDestroy { if (result) { this.sharedService.callData(); } - }).catch(); + }).catch((): void => { + // Catch Navigation Error + }); } /** smart table listing manipulation @private */ @@ -206,7 +209,9 @@ export class UserDetailsComponent implements OnInit, OnDestroy { } this.dataSource.load(this.userData).then((data: {}) => { this.isLoadingResults = false; - }).catch(); + }).catch((): void => { + // Catch Navigation Error + }); }, (error: ERRORDATA) => { this.restService.handleError(error, 'get'); this.isLoadingResults = false;