diff --git a/backend/go.mod b/backend/go.mod index cda7a5d..f9e1b17 100644 --- a/backend/go.mod +++ b/backend/go.mod @@ -30,7 +30,7 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pelletier/go-toml/v2 v2.2.4 // indirect github.com/quic-go/qpack v0.6.0 // indirect - github.com/quic-go/quic-go v0.57.1 // indirect + github.com/quic-go/quic-go v0.57.0 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect github.com/ugorji/go/codec v1.3.1 // indirect go.uber.org/mock v0.6.0 // indirect diff --git a/backend/go.sum b/backend/go.sum index c4aa11a..640f757 100644 --- a/backend/go.sum +++ b/backend/go.sum @@ -63,8 +63,6 @@ github.com/quic-go/quic-go v0.56.0 h1:q/TW+OLismmXAehgFLczhCDTYB3bFmua4D9lsNBWxv github.com/quic-go/quic-go v0.56.0/go.mod h1:9gx5KsFQtw2oZ6GZTyh+7YEvOxWCL9WZAepnHxgAo6c= github.com/quic-go/quic-go v0.57.0 h1:AsSSrrMs4qI/hLrKlTH/TGQeTMY0ib1pAOX7vA3AdqE= github.com/quic-go/quic-go v0.57.0/go.mod h1:ly4QBAjHA2VhdnxhojRsCUOeJwKYg+taDlos92xb1+s= -github.com/quic-go/quic-go v0.57.1 h1:25KAAR9QR8KZrCZRThWMKVAwGoiHIrNbT72ULHTuI10= -github.com/quic-go/quic-go v0.57.1/go.mod h1:ly4QBAjHA2VhdnxhojRsCUOeJwKYg+taDlos92xb1+s= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= diff --git a/backend/main.go b/backend/main.go index b083e3f..75f6d0c 100644 --- a/backend/main.go +++ b/backend/main.go @@ -929,6 +929,7 @@ func connect() { "result8": result8, }) + case "get-reprintdetails-electrical": var result2, result3, result4, result5, result6, result7, result8 string @@ -1047,7 +1048,7 @@ func connect() { "result3": array3, }) - case "get-reprintdetailsfees-electrical": + case "get-reprintdetailsfees-electrical": var result2, result3 string array := []string{} array2 := []string{} @@ -1244,17 +1245,6 @@ func connect() { "result": result, }) - case "check-paid-pops": - err := dbpop.QueryRow("SELECT IF(COUNT(AFNum) > 0, 1, 0) AS result FROM orderpaydetail WHERE OPRefId = ?", 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, - }) - } }) diff --git a/package.json b/package.json index 23c8a01..e58a34a 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "preview": "vite preview" }, "dependencies": { - "@fontsource-variable/roboto": "^5.2.9", + "@fontsource-variable/roboto": "^5.2.8", "@kobalte/core": "^0.13.11", "@solidjs-use/integrations": "^2.3.0", "@solidjs/router": "^0.15.4", @@ -32,13 +32,13 @@ "solidjs-use": "^2.3.0" }, "devDependencies": { - "@biomejs/biome": "^2.3.7", + "@biomejs/biome": "^2.3.6", "@nanostores/solid": "^1.1.1", "@types/crypto-js": "^4.2.2", "@types/node": "^24.10.1", "sass-embedded": "^1.93.3", "typescript": "~5.8.3", - "vite": "^7.2.4", + "vite": "^7.2.2", "vite-plugin-compression2": "^2.3.1", "vite-plugin-solid": "^2.11.10" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e8a3339..8bfc780 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,8 +9,8 @@ importers: .: dependencies: '@fontsource-variable/roboto': - specifier: ^5.2.9 - version: 5.2.9 + specifier: ^5.2.8 + version: 5.2.8 '@kobalte/core': specifier: ^0.13.11 version: 0.13.11(solid-js@1.9.10) @@ -73,8 +73,8 @@ importers: version: 2.3.0 devDependencies: '@biomejs/biome': - specifier: ^2.3.7 - version: 2.3.7 + specifier: ^2.3.6 + version: 2.3.6 '@nanostores/solid': specifier: ^1.1.1 version: 1.1.1(nanostores@1.1.0)(solid-js@1.9.10) @@ -91,14 +91,14 @@ importers: specifier: ~5.8.3 version: 5.8.3 vite: - specifier: ^7.2.4 - version: 7.2.4(@types/node@24.10.1)(sass-embedded@1.93.3)(sass@1.93.3) + specifier: ^7.2.2 + version: 7.2.2(@types/node@24.10.1)(sass-embedded@1.93.3)(sass@1.93.3) vite-plugin-compression2: specifier: ^2.3.1 version: 2.3.1(rollup@4.52.1) vite-plugin-solid: specifier: ^2.11.10 - version: 2.11.10(solid-js@1.9.10)(vite@7.2.4(@types/node@24.10.1)(sass-embedded@1.93.3)(sass@1.93.3)) + version: 2.11.10(solid-js@1.9.10)(vite@7.2.2(@types/node@24.10.1)(sass-embedded@1.93.3)(sass@1.93.3)) packages: @@ -187,55 +187,55 @@ packages: resolution: {integrity: sha512-bkFqkLhh3pMBUQQkpVgWDWq/lqzc2678eUyDlTBhRqhCHFguYYGM0Efga7tYk4TogG/3x0EEl66/OQ+WGbWB/Q==} engines: {node: '>=6.9.0'} - '@biomejs/biome@2.3.7': - resolution: {integrity: sha512-CTbAS/jNAiUc6rcq94BrTB8z83O9+BsgWj2sBCQg9rD6Wkh2gjfR87usjx0Ncx0zGXP1NKgT7JNglay5Zfs9jw==} + '@biomejs/biome@2.3.6': + resolution: {integrity: sha512-oqUhWyU6tae0MFsr/7iLe++QWRg+6jtUhlx9/0GmCWDYFFrK366sBLamNM7D9Y+c7YSynUFKr8lpEp1r6Sk7eA==} engines: {node: '>=14.21.3'} hasBin: true - '@biomejs/cli-darwin-arm64@2.3.7': - resolution: {integrity: sha512-LirkamEwzIUULhXcf2D5b+NatXKeqhOwilM+5eRkbrnr6daKz9rsBL0kNZ16Hcy4b8RFq22SG4tcLwM+yx/wFA==} + '@biomejs/cli-darwin-arm64@2.3.6': + resolution: {integrity: sha512-P4JWE5d8UayBxYe197QJwyW4ZHp0B+zvRIGCusOm1WbxmlhpAQA1zEqQuunHgSIzvyEEp4TVxiKGXNFZPg7r9Q==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [darwin] - '@biomejs/cli-darwin-x64@2.3.7': - resolution: {integrity: sha512-Q4TO633kvrMQkKIV7wmf8HXwF0dhdTD9S458LGE24TYgBjSRbuhvio4D5eOQzirEYg6eqxfs53ga/rbdd8nBKg==} + '@biomejs/cli-darwin-x64@2.3.6': + resolution: {integrity: sha512-I4rTebj+F/L9K93IU7yTFs8nQ6EhaCOivxduRha4w4WEZK80yoZ8OAdR1F33m4yJ/NfUuTUbP/Wjs+vKjlCoWA==} engines: {node: '>=14.21.3'} cpu: [x64] os: [darwin] - '@biomejs/cli-linux-arm64-musl@2.3.7': - resolution: {integrity: sha512-/afy8lto4CB8scWfMdt+NoCZtatBUF62Tk3ilWH2w8ENd5spLhM77zKlFZEvsKJv9AFNHknMl03zO67CiklL2Q==} + '@biomejs/cli-linux-arm64-musl@2.3.6': + resolution: {integrity: sha512-oK1NpIXIixbJ/4Tcx40cwiieqah6rRUtMGOHDeK2ToT7yUFVEvXUGRKqH0O4hqZ9tW8TcXNZKfgRH6xrsjVtGg==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [linux] - '@biomejs/cli-linux-arm64@2.3.7': - resolution: {integrity: sha512-inHOTdlstUBzgjDcx0ge71U4SVTbwAljmkfi3MC5WzsYCRhancqfeL+sa4Ke6v2ND53WIwCFD5hGsYExoI3EZQ==} + '@biomejs/cli-linux-arm64@2.3.6': + resolution: {integrity: sha512-JjYy83eVBnvuINZiqyFO7xx72v8Srh4hsgaacSBCjC22DwM6+ZvnX1/fj8/SBiLuUOfZ8YhU2pfq2Dzakeyg1A==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [linux] - '@biomejs/cli-linux-x64-musl@2.3.7': - resolution: {integrity: sha512-CQUtgH1tIN6e5wiYSJqzSwJumHYolNtaj1dwZGCnZXm2PZU1jOJof9TsyiP3bXNDb+VOR7oo7ZvY01If0W3iFQ==} + '@biomejs/cli-linux-x64-musl@2.3.6': + resolution: {integrity: sha512-QvxB8GHQeaO4FCtwJpJjCgJkbHBbWxRHUxQlod+xeaYE6gtJdSkYkuxdKAQUZEOIsec+PeaDAhW9xjzYbwmOFA==} engines: {node: '>=14.21.3'} cpu: [x64] os: [linux] - '@biomejs/cli-linux-x64@2.3.7': - resolution: {integrity: sha512-fJMc3ZEuo/NaMYo5rvoWjdSS5/uVSW+HPRQujucpZqm2ZCq71b8MKJ9U4th9yrv2L5+5NjPF0nqqILCl8HY/fg==} + '@biomejs/cli-linux-x64@2.3.6': + resolution: {integrity: sha512-ZjPXzy5yN9wusIoX+8Zp4p6cL8r0NzJCXg/4r1KLVveIPXd2jKVlqZ6ZyzEq385WwU3OX5KOwQYLQsOc788waQ==} engines: {node: '>=14.21.3'} cpu: [x64] os: [linux] - '@biomejs/cli-win32-arm64@2.3.7': - resolution: {integrity: sha512-aJAE8eCNyRpcfx2JJAtsPtISnELJ0H4xVVSwnxm13bzI8RwbXMyVtxy2r5DV1xT3WiSP+7LxORcApWw0LM8HiA==} + '@biomejs/cli-win32-arm64@2.3.6': + resolution: {integrity: sha512-YM7hLHpwjdt8R7+O2zS1Vo2cKgqEeptiXB1tWW1rgjN5LlpZovBVKtg7zfwfRrFx3i08aNZThYpTcowpTlczug==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [win32] - '@biomejs/cli-win32-x64@2.3.7': - resolution: {integrity: sha512-pulzUshqv9Ed//MiE8MOUeeEkbkSHVDVY5Cz5wVAnH1DUqliCQG3j6s1POaITTFqFfo7AVIx2sWdKpx/GS+Nqw==} + '@biomejs/cli-win32-x64@2.3.6': + resolution: {integrity: sha512-psgNEYgMAobY5h+QHRBVR9xvg2KocFuBKm6axZWB/aD12NWhQjiVFQUjV6wMXhlH4iT0Q9c3yK5JFRiDC/rzHA==} engines: {node: '>=14.21.3'} cpu: [x64] os: [win32] @@ -416,8 +416,8 @@ packages: '@floating-ui/utils@0.2.10': resolution: {integrity: sha512-aGTxbpbg8/b5JfU1HXSrbH3wXZuLPJcNEcZQFMxLs3oSzgtVu6nFPkbbGGUvBcUjKV2YyB9Wxxabo+HEH9tcRQ==} - '@fontsource-variable/roboto@5.2.9': - resolution: {integrity: sha512-uH58g1An9Z4Efiviu0YuN8lvYf22TXidCx2++ZPpEegviaPaYQUwNbQZyr5lO2ae3pM07AolUabngLrlYtuzfA==} + '@fontsource-variable/roboto@5.2.8': + resolution: {integrity: sha512-UBhCzUXpkZZqBhTnkIhkM3USlSuu2Da6k4mjiRaEnZtvMOMWcQVOV6oV2cY00plUuJZrsnTRtt3ZRRJF09gV5w==} '@img/colour@1.0.0': resolution: {integrity: sha512-A5P/LfWGFSl6nsckYtjw9da+19jB8hkJ6ACTGcDfEJ0aE+l2n2El7dsVM7UVHZQ9s2lmYMWlrS21YLy2IR1LUw==} @@ -1815,8 +1815,8 @@ packages: '@testing-library/jest-dom': optional: true - vite@7.2.4: - resolution: {integrity: sha512-NL8jTlbo0Tn4dUEXEsUg8KeyG/Lkmc4Fnzb8JXN/Ykm9G4HNImjtABMJgkQoVjOBN/j2WAwDTRytdqJbZsah7w==} + vite@7.2.2: + resolution: {integrity: sha512-BxAKBWmIbrDgrokdGZH1IgkIk/5mMHDreLDmCJ0qpyJaAteP8NvMhkwr/ZCQNqNH97bw/dANTE9PDzqwJghfMQ==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true peerDependencies: @@ -2016,39 +2016,39 @@ snapshots: '@babel/helper-string-parser': 7.27.1 '@babel/helper-validator-identifier': 7.27.1 - '@biomejs/biome@2.3.7': + '@biomejs/biome@2.3.6': optionalDependencies: - '@biomejs/cli-darwin-arm64': 2.3.7 - '@biomejs/cli-darwin-x64': 2.3.7 - '@biomejs/cli-linux-arm64': 2.3.7 - '@biomejs/cli-linux-arm64-musl': 2.3.7 - '@biomejs/cli-linux-x64': 2.3.7 - '@biomejs/cli-linux-x64-musl': 2.3.7 - '@biomejs/cli-win32-arm64': 2.3.7 - '@biomejs/cli-win32-x64': 2.3.7 + '@biomejs/cli-darwin-arm64': 2.3.6 + '@biomejs/cli-darwin-x64': 2.3.6 + '@biomejs/cli-linux-arm64': 2.3.6 + '@biomejs/cli-linux-arm64-musl': 2.3.6 + '@biomejs/cli-linux-x64': 2.3.6 + '@biomejs/cli-linux-x64-musl': 2.3.6 + '@biomejs/cli-win32-arm64': 2.3.6 + '@biomejs/cli-win32-x64': 2.3.6 - '@biomejs/cli-darwin-arm64@2.3.7': + '@biomejs/cli-darwin-arm64@2.3.6': optional: true - '@biomejs/cli-darwin-x64@2.3.7': + '@biomejs/cli-darwin-x64@2.3.6': optional: true - '@biomejs/cli-linux-arm64-musl@2.3.7': + '@biomejs/cli-linux-arm64-musl@2.3.6': optional: true - '@biomejs/cli-linux-arm64@2.3.7': + '@biomejs/cli-linux-arm64@2.3.6': optional: true - '@biomejs/cli-linux-x64-musl@2.3.7': + '@biomejs/cli-linux-x64-musl@2.3.6': optional: true - '@biomejs/cli-linux-x64@2.3.7': + '@biomejs/cli-linux-x64@2.3.6': optional: true - '@biomejs/cli-win32-arm64@2.3.7': + '@biomejs/cli-win32-arm64@2.3.6': optional: true - '@biomejs/cli-win32-x64@2.3.7': + '@biomejs/cli-win32-x64@2.3.6': optional: true '@bufbuild/protobuf@2.9.0': {} @@ -2152,7 +2152,7 @@ snapshots: '@floating-ui/utils@0.2.10': {} - '@fontsource-variable/roboto@5.2.9': {} + '@fontsource-variable/roboto@5.2.8': {} '@img/colour@1.0.0': {} @@ -3524,7 +3524,7 @@ snapshots: transitivePeerDependencies: - rollup - vite-plugin-solid@2.11.10(solid-js@1.9.10)(vite@7.2.4(@types/node@24.10.1)(sass-embedded@1.93.3)(sass@1.93.3)): + vite-plugin-solid@2.11.10(solid-js@1.9.10)(vite@7.2.2(@types/node@24.10.1)(sass-embedded@1.93.3)(sass@1.93.3)): dependencies: '@babel/core': 7.28.4 '@types/babel__core': 7.20.5 @@ -3532,12 +3532,12 @@ snapshots: merge-anything: 5.1.7 solid-js: 1.9.10 solid-refresh: 0.6.3(solid-js@1.9.10) - vite: 7.2.4(@types/node@24.10.1)(sass-embedded@1.93.3)(sass@1.93.3) - vitefu: 1.1.1(vite@7.2.4(@types/node@24.10.1)(sass-embedded@1.93.3)(sass@1.93.3)) + vite: 7.2.2(@types/node@24.10.1)(sass-embedded@1.93.3)(sass@1.93.3) + vitefu: 1.1.1(vite@7.2.2(@types/node@24.10.1)(sass-embedded@1.93.3)(sass@1.93.3)) transitivePeerDependencies: - supports-color - vite@7.2.4(@types/node@24.10.1)(sass-embedded@1.93.3)(sass@1.93.3): + vite@7.2.2(@types/node@24.10.1)(sass-embedded@1.93.3)(sass@1.93.3): dependencies: esbuild: 0.25.10 fdir: 6.5.0(picomatch@4.0.3) @@ -3551,9 +3551,9 @@ snapshots: sass: 1.93.3 sass-embedded: 1.93.3 - vitefu@1.1.1(vite@7.2.4(@types/node@24.10.1)(sass-embedded@1.93.3)(sass@1.93.3)): + vitefu@1.1.1(vite@7.2.2(@types/node@24.10.1)(sass-embedded@1.93.3)(sass@1.93.3)): optionalDependencies: - vite: 7.2.4(@types/node@24.10.1)(sass-embedded@1.93.3)(sass@1.93.3) + vite: 7.2.2(@types/node@24.10.1)(sass-embedded@1.93.3)(sass@1.93.3) webworkify@1.5.0: {} diff --git a/src/pages/AssessorPage/Assessor.tsx b/src/pages/AssessorPage/Assessor.tsx index a71f696..3147bad 100644 --- a/src/pages/AssessorPage/Assessor.tsx +++ b/src/pages/AssessorPage/Assessor.tsx @@ -1,12 +1,12 @@ -import { Tabs } from '@kobalte/core/tabs'; -import { useNavigate } from '@solidjs/router'; -import dayjs from 'dayjs'; -import { FaSolidThumbsUp } from 'solid-icons/fa'; -import { FiLogOut } from 'solid-icons/fi'; -import { VsRefresh } from 'solid-icons/vs'; -import { createEffect, createSignal, onMount } from 'solid-js'; -import { Show } from 'solid-js/web'; -import { Box, Button, Clickable, Column, Combobox, Input, Link, Logo, Modal, ModalButton, Padding, Page, Row } from '../../components/index.ts'; +import { Tabs } from '@kobalte/core/tabs' +import { useNavigate } from '@solidjs/router' +import dayjs from 'dayjs' +import { FaSolidThumbsUp } from 'solid-icons/fa' +import { FiLogOut } from 'solid-icons/fi' +import { VsRefresh } from 'solid-icons/vs' +import { createEffect, createSignal, onMount } from 'solid-js' +import { Show } from 'solid-js/web' +import { Box, Button, Clickable, Column, Combobox, Input, Link, Logo, Modal, ModalButton, Padding, Page, Row } from '../../components' import { _additional, _additionalAmountList, @@ -31,9 +31,9 @@ import { _totalUnits, _type, _units, -} from '../../stores/pdfinfo.ts'; -import { checkConnection, createPdfElectrical, createPdfOccupancy, getApi, getApiMulti, postApi, statusPopsApi, voidPopsApi } from '../../utils/functions/index.ts'; -import './Assessor.sass'; +} from '../../stores/pdfinfo' +import { checkConnection, createPdfElectrical, createPdfOccupancy, getApi, getApiMulti, postApi, voidApi } from '../../utils/functions' +import './Assessor.sass' const PESO = import.meta.env.VITE_PESO @@ -71,8 +71,6 @@ export default () => { const listType = ['Print', 'Reprint', 'Reprint and Void'] const [selectedType, setSelectedType] = createSignal('Print') - const [voidError, setVoidError] = createSignal(false) - let bldgadditional = false const checkAccess = async (access: string) => { @@ -336,24 +334,6 @@ export default () => { } if (selectedType().includes("Void")) { - const status = await statusPopsOp(application) - const message = status.message - - if (message.includes('No record')) { - setVoidError(true) - setErrorMessage("No record found on Pops") - return - } else { - const pops_paid = message.pops_paid - const epay_paid = message.epay_paid - - if (pops_paid || epay_paid) { - setVoidError(true) - setErrorMessage("Already Paid") - return - } - } - if (division === 'electrical') { await setNewStatus(division, 'ELECTRICAL ORDER OF PAYMENT REPRINTED', '175', 'ELECOPREPRINTED', 1) await setNewStatus(division, 'ELECTRICAL ORDERPAYMENT RELEASED', '97', 'ELECRELEASED', 1) @@ -366,10 +346,10 @@ export default () => { await updateDocflow(division, application, 'APPROVED FOR PRINTING OF BUREAU OF FIRE AND ORDER OF PAYMENT') } - await voidPopsOp(application) - await postTransaction(application) + await voidOp(application) } + postTransaction(application) setPrintedApplication(application) setPrinted(true) @@ -474,25 +454,20 @@ export default () => { if (isElectrical()) await getListForPrinting('electrical') } - const logout = () => { + const logout = async () => { removeEmployee() navigate('/') } - const gotoProfile = () => { + const gotoProfile = async () => { sessionStorage.setItem('name', employeeName()) navigate('/profile') } - const voidPopsOp = async (application: string) => { - const response = await voidPopsApi(application) - if (response.includes('Error')) return false - return true - } - - const statusPopsOp = async (application: string) => { - const response = await statusPopsApi(application) - return response + const voidOp = async (application: string) => { + const response = await voidApi(application) + if (response !== null) return true + return false } onMount(async () => { @@ -910,28 +885,6 @@ export default () => { - -