Commit 390a8a3c by Nattana Chaiyamat

เพิ่มการเก็บ token ใช้กับหน้าจอเก่าที่เก็บsessionStorage ชื่อ accessToken

parent faa055d4
......@@ -98,7 +98,7 @@ export class NavService implements OnDestroy {
id: 'm1',
show: false,
children: [
// { id: 'm10', path: '/pms-evaluation', title: 'ประเมินตนเอง', type: 'link', show: false },
{ id: 'm10', path: '/pms-evaluation', title: 'ประเมินตนเอง', type: 'link', show: false },
{ id: 'm11', path: '/self-evaluation', title: 'ประเมินตนเอง', type: 'link', show: false },
{ id: 'm12', path: '/supervisor-evaluation', title: 'ประเมินโดยหัวหน้า', type: 'link', show: false },
],
......
......@@ -50,12 +50,14 @@ export class TokenService {
signOut(): void {
window.localStorage.clear();
localStorage.clear();
sessionStorage.clear()
this.router.navigate(["/auth/splash"]);
}
public saveToken(token: string): void {
window.localStorage.removeItem(TOKEN_KEY);
window.localStorage.setItem(TOKEN_KEY, token);
sessionStorage.setItem("accessToken", token)
}
public saveUser(user: any): void {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment