/** Check the project is present for the user @public */
public isPresent: boolean = false;
/** Set timeout @private */
+ // eslint-disable-next-line @typescript-eslint/no-magic-numbers
private timeOut: number = 10;
/** Instance of the rest service @private */
private restService: RestService;
}
public ngOnInit(): void {
- this.selectedProject = localStorage.getItem('project');
+ this.selectedProject = sessionStorage.getItem('project');
this.getAdminProjects();
}
/** Get the admin projects to be selectable @public */
public getAdminProjects(): void {
- const username: string = localStorage.getItem('username');
+ const username: string = sessionStorage.getItem('username');
this.restService.getResource(environment.USERS_URL + '/' + username).subscribe((projects: UserDetail) => {
this.projectList = projects.project_role_mappings;
this.isPresent = this.projectList.some((item: ProjectData) => item.project === this.value.project);
}, this.timeOut);
});
}
-
}