Updated to use new api
This commit is contained in:
parent
ec63e44fb0
commit
604e9ce32a
3 changed files with 12 additions and 5 deletions
|
|
@ -12,6 +12,7 @@ import './Index.sass'
|
||||||
let assessorsNameList: string[]
|
let assessorsNameList: string[]
|
||||||
let registeredNameList: string[]
|
let registeredNameList: string[]
|
||||||
let headName: string
|
let headName: string
|
||||||
|
let headId: string
|
||||||
|
|
||||||
export default () => {
|
export default () => {
|
||||||
const getAssessors = async () => {
|
const getAssessors = async () => {
|
||||||
|
|
@ -28,11 +29,17 @@ export default () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const getHead = async () => {
|
const getHead = async () => {
|
||||||
const head = await getApi('get-headname')
|
const response = await getApi('get-headname')
|
||||||
headName = head
|
headName = response
|
||||||
sessionStorage.setItem('head', headName)
|
sessionStorage.setItem('head', headName)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const getHeadId = async () => {
|
||||||
|
const response = await getApi('get-headid')
|
||||||
|
headId = response
|
||||||
|
sessionStorage.setItem('headid', headId)
|
||||||
|
}
|
||||||
|
|
||||||
const clearCache = async () => {
|
const clearCache = async () => {
|
||||||
caches.keys()
|
caches.keys()
|
||||||
}
|
}
|
||||||
|
|
@ -42,6 +49,7 @@ export default () => {
|
||||||
await getAssessors()
|
await getAssessors()
|
||||||
await getRegistered()
|
await getRegistered()
|
||||||
await getHead()
|
await getHead()
|
||||||
|
await getHeadId()
|
||||||
})
|
})
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
|
|
@ -13,8 +13,7 @@ import { Show } from 'solid-js/web'
|
||||||
import './Main.sass'
|
import './Main.sass'
|
||||||
|
|
||||||
const PESO = import.meta.env.VITE_PESO
|
const PESO = import.meta.env.VITE_PESO
|
||||||
const ID = import.meta.env.VITE_HEADID
|
const ID = sessionStorage.get('headid')
|
||||||
// const NAME = import.meta.env.VITE_HEAD
|
|
||||||
const PUBLICIP = import.meta.env.VITE_PUBLICIP
|
const PUBLICIP = import.meta.env.VITE_PUBLICIP
|
||||||
|
|
||||||
export default () => {
|
export default () => {
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ import { checkConnection, getApi, postApi } from '../../utils/functions'
|
||||||
import './Register.sass'
|
import './Register.sass'
|
||||||
|
|
||||||
export default () => {
|
export default () => {
|
||||||
const APPROVERNAME = import.meta.env.VITE_HEAD
|
const APPROVERNAME = sessionStorage.getItem('head')
|
||||||
const assessors = JSON.parse(sessionStorage.getItem('assessors')!)
|
const assessors = JSON.parse(sessionStorage.getItem('assessors')!)
|
||||||
const roles = ['ASSESSOR', 'APPROVER']
|
const roles = ['ASSESSOR', 'APPROVER']
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue