/**
* @file Add Edit Component.
*/
-import { isNullOrUndefined } from 'util';
import { HttpHeaders } from '@angular/common/http';
import { Component, Injector, Input, OnInit } from '@angular/core';
import { AbstractControl, FormBuilder, FormGroup, Validators } from '@angular/forms';
import { APIURLHEADER, ERRORDATA, LOGINPARAMS, MODALCLOSERESPONSEDATA, TYPESECTION } from 'CommonModel';
import { environment } from 'environment';
import { RestService } from 'RestService';
-import { SharedService } from 'SharedService';
+import { SharedService, isNullOrUndefined } from 'SharedService';
/**
* Creating component
public isPassword: boolean;
/** Variable holds value for first login user @public */
- public isFirstLogin: boolean = Boolean(localStorage.getItem('firstLogin') === 'true');
+ public isFirstLogin: boolean = Boolean(sessionStorage.getItem('firstLogin') === 'true');
/** Instance of the rest service @private */
private restService: RestService;
/** Method to check loggedin username and update @private */
private checkUsername(payLoad: LOGINPARAMS): void {
- const logUsername: string = localStorage.getItem('username');
+ const logUsername: string = sessionStorage.getItem('username');
if (this.userType === 'editUserName' && logUsername === this.userName) {
this.authService.userName.next(payLoad.username);
- localStorage.setItem('username', payLoad.username);
+ sessionStorage.setItem('username', payLoad.username);
}
}
}