Files
doneit-web/src/app/store/documentManagement.ts
T
Peter Maquiran 8db8fa4ea3 set data to store
2023-07-06 13:13:23 +01:00

36 lines
813 B
TypeScript

import { SHA1 } from 'crypto-js'
import { localstoreService } from './localstore.service'
export class documentManagementStore {
static session: {
UserId: number,
Email: string,
UserName: string
FullName: string
RoleID: number
RoleDescription: string
OrganicEntityID: number
OrganicEntityName: string
Status: string
Authorization: string
AuthorizationJwt: string
}
static get keyName() {
return SHA1("documentManagement").toString()
}
static setData(data) {
this.session = data
localstoreService.set(this.keyName, {
user: this.session
})
}
static clear() {
delete this.session
localstoreService.delete(this.keyName)
}
}