Compare commits

..

No commits in common. "6a5ef64d35a1e62866257d6c8011f19e6cf79edc" and "96ab5314321e307527811d04e6c222ac867ebcff" have entirely different histories.

8 changed files with 42 additions and 57 deletions

2
.env
View file

@ -1,5 +1,5 @@
VITE_BACKEND=http://localhost:4320/api/ VITE_BACKEND=http://localhost:4320/api/
# VITE_BACKEND=https://ocboapps.davaocity.gov.ph/esign-server/api/ #VITE_BACKEND=https://ocboapps.davaocity.gov.ph/esign-server/api/
# VITE_BACKEND=http://192.168.7.163/server/api/ # VITE_BACKEND=http://192.168.7.163/server/api/
VITE_HEAD=ARCH. KHASHAYAR L. TOGHYANI VITE_HEAD=ARCH. KHASHAYAR L. TOGHYANI
VITE_PESO= VITE_PESO=

View file

@ -1,15 +1,13 @@
FROM golang:1.25.3 AS build FROM golang:1.25.3 AS build
ENV GIN_MODE=release
ENV PORT=4320
WORKDIR /app WORKDIR /app
COPY go.mod go.sum ./ COPY go.mod go.sum ./
RUN go mod download RUN go mod download
COPY . . COPY . .
RUN GOOS=linux GOARCH=amd64 GOAMD64=v1 go build -pgo=auto -ldflags="-s -w" -o /bin/esign-server main.go RUN GOOS=linux GOARCH=amd64 GOAMD64=v1 go build -pgo=auto -ldflags="-s -w" -o bin/esign-server main.go
FROM alpine:latest FROM alpine:latest
WORKDIR /app WORKDIR /app
COPY --from=build /bin/esign-server ./server COPY --from=build /app/bin/esign-server .
EXPOSE $PORT EXPOSE 4320
CMD ["./server"] CMD ["./esign-server"]

View file

@ -8,8 +8,7 @@
<meta name="description" content="Digital Signature added for OCBO (Office of the City Building Official)" /> <meta name="description" content="Digital Signature added for OCBO (Office of the City Building Official)" />
<meta name="title" property="og:title" content="OCBO e-Sign" /> <meta name="title" property="og:title" content="OCBO e-Sign" />
<meta name="keywords" content="HTML, CSS, JavaScript" /> <meta name="keywords" content="HTML, CSS, JavaScript" />
<meta name="developer" content="Patrick Alvin Alcala" /> <meta name="author" content="Patrick Alvin Alcala" />
<meta name="designer" content="Patrick Alvin Alcala" />
<meta property="og:description" content="Digital Signature added for OCBO (Office of the City Building Official)" /> <meta property="og:description" content="Digital Signature added for OCBO (Office of the City Building Official)" />
<meta property="og:type" content="website" /> <meta property="og:type" content="website" />
<link rel="icon" type="image/svg+xml" href="/favicon.png" /> <link rel="icon" type="image/svg+xml" href="/favicon.png" />

View file

@ -8,7 +8,6 @@ interface Props {
onChange: Setter<string> onChange: Setter<string>
onKeyDown?: (event: KeyboardEvent) => void onKeyDown?: (event: KeyboardEvent) => void
isPassword?: boolean isPassword?: boolean
placeholder?: string
} }
export default (props: Props) => { export default (props: Props) => {
@ -18,7 +17,7 @@ export default (props: Props) => {
<Show when={props.label}> <Show when={props.label}>
<TextField.Label class="text-field__label">{props.label}</TextField.Label> <TextField.Label class="text-field__label">{props.label}</TextField.Label>
</Show> </Show>
<TextField.Input class="text-field__input" type={props.isPassword ? 'password' : 'text'} placeholder={props.placeholder || ''}/> <TextField.Input class="text-field__input" type={props.isPassword ? 'password' : 'text'} />
</TextField> </TextField>
</> </>
) )

View file

@ -15,7 +15,10 @@
z-index: -1 z-index: -1
opacity: 1 opacity: 1
background-attachment: fixed background-attachment: fixed
background-size: cover
// @media only screen and (max-width: views.$mobile)
// background-image: url('/src/assets/images/svg/background-mobile.svg')
// height: 100%
.close-text .close-text
padding: 3rem 0 0 0 padding: 3rem 0 0 0

View file

@ -3,7 +3,7 @@ import { Logo, Page, Row, Padding, ModalButton, Button, Clickable, Link, Modal,
import { FiLogOut } from 'solid-icons/fi' import { FiLogOut } from 'solid-icons/fi'
import { Tabs } from '@kobalte/core/tabs' import { Tabs } from '@kobalte/core/tabs'
import { ofetch } from 'ofetch' import { ofetch } from 'ofetch'
import { onMount, createSignal, Show, createEffect } from 'solid-js' import { onMount, createSignal, Show } from 'solid-js'
import dayjs from 'dayjs' import dayjs from 'dayjs'
import { checkConnection, createPdf } from '../../utils/functions' import { checkConnection, createPdf } from '../../utils/functions'
import { FaSolidThumbsUp } from 'solid-icons/fa' import { FaSolidThumbsUp } from 'solid-icons/fa'
@ -55,18 +55,18 @@ export default () => {
} }
} }
// const handleFilterChange = (value: string) => { const handleFilterChange = (value: string) => {
// // setFilter(value) // setFilter(value)
// if (value.trim() === '') { if (value.trim() === '') {
// setApplicationList(fullIDList()) setApplicationList(fullIDList())
// setNameList(fullNameList()) setNameList(fullNameList())
// } else { } else {
// const filteredApplications = fullIDList().filter((app) => app.toLowerCase().includes(value.toLowerCase())) const filteredApplications = fullIDList().filter((app) => app.toLowerCase().includes(value.toLowerCase()))
// const filteredNames = fullNameList().slice(0, filteredApplications.length) const filteredNames = fullNameList().slice(0, filteredApplications.length)
// setApplicationList(filteredApplications) setApplicationList(filteredApplications)
// setNameList(filteredNames) setNameList(filteredNames)
// } }
// } }
const getPrintDetails = async (id: number) => { const getPrintDetails = async (id: number) => {
const response = await ofetch(API + 'get-printdetails-electrical/' + id) const response = await ofetch(API + 'get-printdetails-electrical/' + id)
@ -161,8 +161,8 @@ export default () => {
const approversignId = await geteSignId(276) const approversignId = await geteSignId(276)
getApprovedDate(approversignId, applicationNo) getApprovedDate(approversignId, applicationNo)
// const assessorId = await getEmployeeId(op.result7[0]) const assessorId = await getEmployeeId(op.result7[0])
// const assessorsignId = await geteSignId(assessorId) const assessorsignId = await geteSignId(assessorId)
getAssessedDate(op.result11[0]) getAssessedDate(op.result11[0])
} }
@ -171,20 +171,22 @@ export default () => {
return total return total
} }
const getListForPrinting = async () => { const getListForPrinting = async (query?: string) => {
try { try {
const response = await ofetch(API + 'get-listopprinting-electrical', { parseResponse: JSON.parse }) const response = await ofetch(API + 'get-listopprinting-electrical', { parseResponse: JSON.parse })
const filteredApplications = response.result.filter((item: any) =>
if (filter() !== '' && filter().trim().length !== 0) { item
const filteredApplications = response.result.filter((item: string) => item.includes(filter())) .toString()
const filteredIndices = response.result.map((item: string, index: number) => (item.includes(filter()) ? index : -1)).filter((index: number) => index !== -1) .toLowerCase()
const filteredNames = filteredIndices.map((index: number) => response.result2[index]) .includes((query ?? '').toLowerCase())
setApplicationList(filteredApplications) )
setNameList(filteredNames) const filteredNames = response.result2.filter((item: any) =>
return item.toString().toLowerCase().includes((query ?? '').toLowerCase())
} )
setApplicationList(response.result) // setApplicationList(response.result)
setNameList(response.result2) // setNameList(response.result2)
setApplicationList(filteredApplications)
setNameList(filteredNames)
} catch (error) { } catch (error) {
console.error(error) console.error(error)
} }
@ -350,14 +352,6 @@ export default () => {
} }
}) })
createEffect(async () => {
if (filter() !== '') {
await getListForPrinting()
} else if (filter() === '') {
await getListForPrinting()
}
})
return ( return (
<> <>
<Page alignment="column"> <Page alignment="column">
@ -457,7 +451,7 @@ export default () => {
<Padding top={0} bottom={0} right={10} left={10}> <Padding top={0} bottom={0} right={10} left={10}>
<Row content="split"> <Row content="split">
<Input value={filter()} onChange={setFilter} placeholder="Filter Application Number" /> <Input label="aa" value={filter()} onChange={getListForPrinting} />
<Button label="Refresh Data" edges="curved" design="bo-primary" icon={VsRefresh} onClick={refresh}></Button> <Button label="Refresh Data" edges="curved" design="bo-primary" icon={VsRefresh} onClick={refresh}></Button>
</Row> </Row>
</Padding> </Padding>

View file

@ -42,12 +42,7 @@ export default () => {
sessionStorage.setItem('registered', JSON.stringify([...registeredNameList])) sessionStorage.setItem('registered', JSON.stringify([...registeredNameList]))
} }
const clearCache = async () => {
caches.keys()
}
onMount(async () => { onMount(async () => {
await clearCache()
await getAssessors() await getAssessors()
await getRegistered() await getRegistered()
}) })

View file

@ -2,10 +2,7 @@
@use 'sass:color' @use 'sass:color'
.fullscreen .fullscreen
display: flex position: absolute
align-items: center
justify-content: center
position: fixed
top: 0 top: 0
left: 0 left: 0
width: 100vw width: 100vw