set data to store

This commit is contained in:
Peter Maquiran
2023-07-06 13:13:23 +01:00
parent c9c631536d
commit 8db8fa4ea3
4 changed files with 18 additions and 14 deletions
+4 -4
View File
@@ -3,7 +3,7 @@ import { localstoreService } from './localstore.service'
export class documentManagementStore {
session: {
static session: {
UserId: number,
Email: string,
UserName: string
@@ -17,18 +17,18 @@ export class documentManagementStore {
AuthorizationJwt: string
}
get keyName() {
static get keyName() {
return SHA1("documentManagement").toString()
}
setData(data) {
static setData(data) {
this.session = data
localstoreService.set(this.keyName, {
user: this.session
})
}
clear() {
static clear() {
delete this.session
localstoreService.delete(this.keyName)
}