mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
36 lines
785 B
TypeScript
36 lines
785 B
TypeScript
|
|
import { SHA1 } from 'crypto-js'
|
||
|
|
import { localstoreService } from './localstore.service'
|
||
|
|
|
||
|
|
export class documentManagementStore {
|
||
|
|
|
||
|
|
session: {
|
||
|
|
UserId: number,
|
||
|
|
Email: string,
|
||
|
|
UserName: string
|
||
|
|
FullName: string
|
||
|
|
RoleID: number
|
||
|
|
RoleDescription: string
|
||
|
|
OrganicEntityID: number
|
||
|
|
OrganicEntityName: string
|
||
|
|
Status: string
|
||
|
|
Authorization: string
|
||
|
|
AuthorizationJwt: string
|
||
|
|
}
|
||
|
|
|
||
|
|
get keyName() {
|
||
|
|
return SHA1("documentManagement").toString()
|
||
|
|
}
|
||
|
|
|
||
|
|
setData(data) {
|
||
|
|
this.session = data
|
||
|
|
localstoreService.set(this.keyName, {
|
||
|
|
user: this.session
|
||
|
|
})
|
||
|
|
}
|
||
|
|
|
||
|
|
clear() {
|
||
|
|
delete this.session
|
||
|
|
localstoreService.delete(this.keyName)
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|