Files
doneit-web/src/app/store/documentManagement.ts
T

36 lines
813 B
TypeScript
Raw Normal View History

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