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