mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
change class
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
import { SHA1 } from 'crypto-js'
|
||||
import { localstoreService } from './localstore.service'
|
||||
|
||||
export class documentManagementStore {
|
||||
class _DocumentManagementStore {
|
||||
|
||||
static session: {
|
||||
|
||||
session: {
|
||||
UserId: number,
|
||||
Email: string,
|
||||
UserName: string
|
||||
@@ -17,20 +18,27 @@ export class documentManagementStore {
|
||||
AuthorizationJwt: string
|
||||
}
|
||||
|
||||
static get keyName() {
|
||||
|
||||
constructor() {
|
||||
this.session = localstoreService.get(this.keyName, {})
|
||||
}
|
||||
|
||||
get keyName() {
|
||||
return SHA1("documentManagement").toString()
|
||||
}
|
||||
|
||||
static setData(data) {
|
||||
setData(data) {
|
||||
this.session = data
|
||||
localstoreService.set(this.keyName, {
|
||||
user: this.session
|
||||
session: this.session
|
||||
})
|
||||
}
|
||||
|
||||
static clear() {
|
||||
clear() {
|
||||
delete this.session
|
||||
localstoreService.delete(this.keyName)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
export const DocumentManagementStore = new _DocumentManagementStore()
|
||||
|
||||
Reference in New Issue
Block a user