Compare commits
3 commits
611d54dd17
...
604e9ce32a
| Author | SHA1 | Date | |
|---|---|---|---|
| 604e9ce32a | |||
| ec63e44fb0 | |||
| 2ab9ab91b4 |
5 changed files with 23 additions and 7 deletions
2
.env
2
.env
|
|
@ -2,7 +2,5 @@ VITE_BACKEND=http://localhost:4320/api/
|
|||
# VITE_BACKEND=https://ocboapps.davaocity.gov.ph/esign-server/api/
|
||||
# VITE_BACKEND=http://192.168.7.163/server/api/
|
||||
|
||||
VITE_HEAD=ARCH. KHASHAYAR L. TOGHYANI
|
||||
VITE_PESO=₱
|
||||
VITE_HEADID=276
|
||||
VITE_PUBLICIP=58.69.136.59
|
||||
|
|
@ -434,6 +434,17 @@ func connect() {
|
|||
"result": result,
|
||||
})
|
||||
|
||||
case "get-headid":
|
||||
err = db.QueryRow("SELECT IFNULL(employeeid, '') AS result FROM employee WHERE is_head = 1").Scan(&result)
|
||||
if err != nil {
|
||||
c.AbortWithError(http.StatusBadRequest, err)
|
||||
c.String(http.StatusBadRequest, err.Error())
|
||||
return
|
||||
}
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
"result": result,
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import './Index.sass'
|
|||
let assessorsNameList: string[]
|
||||
let registeredNameList: string[]
|
||||
let headName: string
|
||||
let headId: string
|
||||
|
||||
export default () => {
|
||||
const getAssessors = async () => {
|
||||
|
|
@ -28,11 +29,17 @@ export default () => {
|
|||
}
|
||||
|
||||
const getHead = async () => {
|
||||
const head = await getApi('get-headname')
|
||||
headName = head
|
||||
const response = await getApi('get-headname')
|
||||
headName = response
|
||||
sessionStorage.setItem('head', headName)
|
||||
}
|
||||
|
||||
const getHeadId = async () => {
|
||||
const response = await getApi('get-headid')
|
||||
headId = response
|
||||
sessionStorage.setItem('headid', headId)
|
||||
}
|
||||
|
||||
const clearCache = async () => {
|
||||
caches.keys()
|
||||
}
|
||||
|
|
@ -42,6 +49,7 @@ export default () => {
|
|||
await getAssessors()
|
||||
await getRegistered()
|
||||
await getHead()
|
||||
await getHeadId()
|
||||
})
|
||||
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -13,8 +13,7 @@ import { Show } from 'solid-js/web'
|
|||
import './Main.sass'
|
||||
|
||||
const PESO = import.meta.env.VITE_PESO
|
||||
const ID = import.meta.env.VITE_HEADID
|
||||
// const NAME = import.meta.env.VITE_HEAD
|
||||
const ID = sessionStorage.get('headid')
|
||||
const PUBLICIP = import.meta.env.VITE_PUBLICIP
|
||||
|
||||
export default () => {
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import { checkConnection, getApi, postApi } from '../../utils/functions'
|
|||
import './Register.sass'
|
||||
|
||||
export default () => {
|
||||
const APPROVERNAME = import.meta.env.VITE_HEAD
|
||||
const APPROVERNAME = sessionStorage.getItem('head')
|
||||
const assessors = JSON.parse(sessionStorage.getItem('assessors')!)
|
||||
const roles = ['ASSESSOR', 'APPROVER']
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue