Compare commits
2 commits
f995bd0cbd
...
cc6e4e6cb0
| Author | SHA1 | Date | |
|---|---|---|---|
| cc6e4e6cb0 | |||
| da6188dc33 |
3 changed files with 25 additions and 27 deletions
|
|
@ -18,10 +18,10 @@ import (
|
|||
)
|
||||
|
||||
// DEV
|
||||
var connection string = "root:superuser@tcp(localhost:3306)/iips"
|
||||
// var connection string = "root:superuser@tcp(localhost:3306)/iips"
|
||||
|
||||
// SERVER
|
||||
// var connection string = "iips:iipsuser@tcp(192.168.7.100:3306)/iips"
|
||||
var connection string = "iips:iipsuser@tcp(192.168.7.100:3306)/iips"
|
||||
|
||||
func main() {
|
||||
connect()
|
||||
|
|
@ -40,24 +40,24 @@ func connect() {
|
|||
// router.Use(cors.Default())
|
||||
|
||||
//DEV
|
||||
router.Use(cors.New(cors.Config{
|
||||
AllowOrigins: []string{"http://localhost:5173"},
|
||||
// AllowAllOrigins: true,
|
||||
AllowMethods: []string{"GET", "POST"},
|
||||
AllowHeaders: []string{"Origin", "OCBO-ShieldConnection"},
|
||||
ExposeHeaders: []string{"Content-Length"},
|
||||
AllowCredentials: true,
|
||||
}))
|
||||
|
||||
//SERVER
|
||||
// router.Use(cors.New(cors.Config{
|
||||
// AllowOrigins: []string{"http://192.168.7.160:8080/inquiry"},
|
||||
// AllowOrigins: []string{"http://localhost:5173"},
|
||||
// // AllowAllOrigins: true,
|
||||
// AllowMethods: []string{"GET", "POST"},
|
||||
// AllowHeaders: []string{"Origin", "OCBO-ShieldConnection"},
|
||||
// ExposeHeaders: []string{"Content-Length"},
|
||||
// AllowCredentials: true,
|
||||
// }))
|
||||
|
||||
//SERVER
|
||||
router.Use(cors.New(cors.Config{
|
||||
AllowOrigins: []string{"http://192.168.7.160:8080/esign"},
|
||||
AllowMethods: []string{"GET", "POST"},
|
||||
AllowHeaders: []string{"Origin", "OCBO-ShieldConnection"},
|
||||
ExposeHeaders: []string{"Content-Length"},
|
||||
AllowCredentials: true,
|
||||
}))
|
||||
|
||||
router.StaticFile("/", "static/index.html")
|
||||
|
||||
// shield := "inquiry"
|
||||
|
|
|
|||
|
|
@ -48,8 +48,6 @@ export default () => {
|
|||
const [employeeId, setEmployeeId] = createSignal(0)
|
||||
const [employeeName, setEmployeeName] = createSignal('')
|
||||
|
||||
const [sign, setSign] = createSignal('')
|
||||
|
||||
// const [docApplicationNo, setDocApplicationNo] = createSignal('')
|
||||
// const [docDate, setDocDate] = createSignal('')
|
||||
// const [docLocation, setDocLocation] = createSignal('')
|
||||
|
|
@ -202,19 +200,19 @@ export default () => {
|
|||
return
|
||||
}
|
||||
|
||||
// signed = await setNewStatus('ELECTRICAL ORDER OF PAYMENT PRINTED', '171', 'ELECOPPRINTED')
|
||||
// if (!signed) return
|
||||
signed = await setNewStatus('ELECTRICAL ORDER OF PAYMENT PRINTED', '171', 'ELECOPPRINTED')
|
||||
if (!signed) return
|
||||
|
||||
// forprinting = await setNewStatus('FOR ELECTRICAL OFFICIAL RECEIPT VALIDATION', '98', 'ELECORVALIDATE')
|
||||
// if (!forprinting) return
|
||||
forprinting = await setNewStatus('FOR ELECTRICAL OFFICIAL RECEIPT VALIDATION', '98', 'ELECORVALIDATE')
|
||||
if (!forprinting) return
|
||||
|
||||
// updateOrderofpayment = await updateOp()
|
||||
updateOrderofpayment = await updateOp()
|
||||
|
||||
// if (updateOrderofpayment) {
|
||||
// setPrintedApplication(application)
|
||||
// setPrinted(true)
|
||||
createPdf()
|
||||
// }
|
||||
if (updateOrderofpayment) {
|
||||
setPrintedApplication(application)
|
||||
setPrinted(true)
|
||||
createPdf()
|
||||
}
|
||||
}
|
||||
|
||||
const updateOp = async () => {
|
||||
|
|
|
|||
|
|
@ -69,12 +69,12 @@ export default async () => {
|
|||
}
|
||||
}
|
||||
|
||||
const assessorFirstHash = SHA3(ASSESSOR)
|
||||
const assessorFirstHash = SHA3(ASSESSORID.toString())
|
||||
const assessorSecondHash = MD5(assessorFirstHash.toString().substring(9))
|
||||
const assessorQrText = `Use OCBO e-Sign Validator - scanid=${assessorSecondHash.toString().substring(24)}`
|
||||
const assessorQr = await generateQR(assessorQrText)
|
||||
|
||||
const approverHash = SHA3(APPROVER)
|
||||
const approverHash = SHA3(APPROVERID.toString())
|
||||
const approverSecondHash = MD5(approverHash.toString().substring(9))
|
||||
const approverQrText = `Use OCBO e-Sign Validator - scanid=${approverSecondHash.toString().substring(24)}`
|
||||
const approverQr = await generateQR(approverQrText)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue