From 03ebafab670ee6fef6c628841f3c969ccc9ffdfb Mon Sep 17 00:00:00 2001 From: Patrick Alvin Alcala Date: Thu, 16 Oct 2025 17:25:13 +0800 Subject: [PATCH] Updated backend --- .env | 4 ++-- backend/main.go | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.env b/.env index 09cacb8..c02d6c7 100644 --- a/.env +++ b/.env @@ -1,5 +1,5 @@ -# VITE_BACKEND=http://localhost:4320/api/ -VITE_BACKEND=http://192.168.7.160:8080/esign-server/api/ +VITE_BACKEND=http://localhost:4320/api/ +# VITE_BACKEND=http://192.168.7.160:8080/esign-server/api/ VITE_HEAD=ARCH. KHASHAYAR L. TOGHYANI VITE_PESO=₱ VITE_HEADID=276 \ No newline at end of file diff --git a/backend/main.go b/backend/main.go index 1a2cde6..dfd067f 100644 --- a/backend/main.go +++ b/backend/main.go @@ -736,6 +736,16 @@ func connect() { "result": result, }) + case "get-signeddateassessed-electrical": + err := db.QueryRow(`SELECT IFNULL(txndate, '') AS result FROM electricaldocflowtxn WHERE electricalid = ? AND remarks = "FOR ELECTRICAL ORDER OF PAYMENT APPROVAL"`, data).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, + }) } }) @@ -774,6 +784,7 @@ func connect() { c.JSON(http.StatusOK, gin.H{ "result": result, }) + } })