diff --git a/backend/main.go b/backend/main.go index 67bb890..751706c 100644 --- a/backend/main.go +++ b/backend/main.go @@ -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/esign"}, + 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"}, + // AllowMethods: []string{"GET", "POST"}, + // AllowHeaders: []string{"Origin", "OCBO-ShieldConnection"}, + // ExposeHeaders: []string{"Content-Length"}, + // AllowCredentials: true, + // })) + router.StaticFile("/", "static/index.html") // shield := "inquiry" diff --git a/src/pages/AssessorPage/Assessor.tsx b/src/pages/AssessorPage/Assessor.tsx index c0491a5..aa183ba 100644 --- a/src/pages/AssessorPage/Assessor.tsx +++ b/src/pages/AssessorPage/Assessor.tsx @@ -48,6 +48,8 @@ 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('') @@ -200,19 +202,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 () => { diff --git a/src/utils/functions/createPdf.ts b/src/utils/functions/createPdf.ts index 0b01fb7..146a592 100644 --- a/src/utils/functions/createPdf.ts +++ b/src/utils/functions/createPdf.ts @@ -69,12 +69,12 @@ export default async () => { } } - const assessorFirstHash = SHA3(ASSESSORID.toString()) + const assessorFirstHash = SHA3(ASSESSOR) 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(APPROVERID.toString()) + const approverHash = SHA3(APPROVER) const approverSecondHash = MD5(approverHash.toString().substring(9)) const approverQrText = `Use OCBO e-Sign Validator - scanid=${approverSecondHash.toString().substring(24)}` const approverQr = await generateQR(approverQrText)