Fix Bug 2296: Newly Created Ns should come first in NG-UI
[osm/NG-UI.git] / src / app / users / user-details / UserDetailsComponent.ts
index 51047ba..c56f43a 100644 (file)
@@ -125,7 +125,7 @@ export class UserDetailsComponent implements OnInit, OnDestroy {
     this.projectService.getAllProjects().subscribe((projects: {}[]) => {
       this.projectList = projects;
     });
-    this.isAdminShow = localStorage.getItem('admin_show') === 'true' ? true : false;
+    this.isAdminShow = sessionStorage.getItem('admin_show') === 'true' ? true : false;
     this.generateColumns();
     this.generateSettings();
     this.generateData();
@@ -252,8 +252,8 @@ export class UserDetailsComponent implements OnInit, OnDestroy {
       projects: userData.projectListName,
       identifier: userData._id,
       user_status: userData._admin.user_status,
-      account_expire_time: this.sharedService.convertEpochTime(!isNullOrUndefined(userData._admin) ?
-        userData._admin.account_expire_time : null)
+      account_expire_time: (!isNullOrUndefined(userData._admin) && !isNullOrUndefined(userData._admin.account_expire_time)) ? this.sharedService.convertEpochTime(
+        userData._admin.account_expire_time) : 'N/A'
     };
     this.userData.push(userDataObj);
   }