+ }).catch((): void => {
+ // Catch Navigation Error
+ });
+ }
+
+ /** To Unlock or Renew User @public */
+ public unlockRenewUser(editType: string): void {
+ // eslint-disable-next-line security/detect-non-literal-fs-filename
+ const modalRef: NgbModalRef = this.modalService.open(WarningComponent, { backdrop: 'static' });
+ sessionStorage.setItem('renew', 'true');
+ const id: string = sessionStorage.getItem('user_id');
+ if (editType === 'unlock') {
+ modalRef.componentInstance.heading = this.translateService.instant('Unlock User');
+ modalRef.componentInstance.confirmationMessage = this.translateService.instant('Are you sure want to unlock this user');
+ modalRef.componentInstance.submitMessage = this.translateService.instant('Unlock');
+ modalRef.componentInstance.action = Boolean(true);
+ modalRef.componentInstance.editType = editType;
+ modalRef.componentInstance.id = this.value.identifier;
+ } else {
+ modalRef.componentInstance.heading = this.translateService.instant('Renew User');
+ modalRef.componentInstance.confirmationMessage = this.translateService.instant('Are you sure want to renew this user');
+ modalRef.componentInstance.submitMessage = this.translateService.instant('Renew');
+ modalRef.componentInstance.action = Boolean(true);
+ modalRef.componentInstance.editType = editType;
+ modalRef.componentInstance.id = this.value.identifier;
+ }
+ modalRef.result.then((result: MODALCLOSERESPONSEDATA): void => {
+ if (result) {
+ this.sharedService.callData();
+ }
+ }).catch((): void => {
+ // Catch Navigation Error
+ });