mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 12:37:53 +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()
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
export let versionData = {
|
||||
"shortSHA": "c9c631536",
|
||||
"SHA": "c9c631536d73c420bfbbca1570d6ba4aa061c923",
|
||||
"shortSHA": "8db8fa4ea",
|
||||
"SHA": "8db8fa4ea34b6ff1d409f8ed38fecc6293a65b5b",
|
||||
"branch": "feature/gabinete-search",
|
||||
"lastCommitAuthor": "'Peter Maquiran'",
|
||||
"lastCommitTime": "'Thu Jul 6 13:01:51 2023 +0100'",
|
||||
"lastCommitMessage": "add document management store",
|
||||
"lastCommitNumber": "5037",
|
||||
"lastCommitTime": "'Thu Jul 6 13:13:23 2023 +0100'",
|
||||
"lastCommitMessage": "set data to store",
|
||||
"lastCommitNumber": "5038",
|
||||
"change": "",
|
||||
"changeStatus": "On branch feature/gabinete-search\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: src/app/pages/login/login.page.ts\n\tmodified: src/app/services/auth.service.ts\n\tmodified: src/app/store/documentManagement.ts",
|
||||
"changeStatus": "On branch feature/gabinete-search\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: src/app/store/documentManagement.ts",
|
||||
"changeAuthor": "peter.maquiran"
|
||||
}
|
||||
Reference in New Issue
Block a user