diff --git a/src/components/Clickable/Clickable.tsx b/src/components/Clickable/Clickable.tsx deleted file mode 100644 index 6f11c28..0000000 --- a/src/components/Clickable/Clickable.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import type { JSXElement } from 'solid-js' - -interface Props { - children: JSXElement - onClick: () => void -} - -export default (props: Props) => { - return ( - <> -
- {props.children} -
- - ) -} diff --git a/src/components/Column/Column.tsx b/src/components/Column/Column.tsx index f733abd..7a33aa6 100644 --- a/src/components/Column/Column.tsx +++ b/src/components/Column/Column.tsx @@ -6,13 +6,12 @@ interface Props { content?: 'top' | 'center' | 'bottom' | 'split' | 'spaced' gap?: number padding?: string - width?: string } export default (props: Props) => { return ( <> -
+
{props.children}
diff --git a/src/components/Footer/Footer.sass b/src/components/Footer/Footer.sass index 0552128..f7138dc 100644 --- a/src/components/Footer/Footer.sass +++ b/src/components/Footer/Footer.sass @@ -2,6 +2,7 @@ .footer padding: 1rem 0 + // margin: 0 2rem 0 0 position: fixed bottom: 0 width: 95vw @@ -10,8 +11,3 @@ @media only screen and (max-width: view.$tablet) font-size: 0.75rem - - @media only screen and (max-width: view.$mobile) - width: auto - text-align: center - position: absolute diff --git a/src/components/index.ts b/src/components/index.ts index 8b43021..8182ac0 100644 --- a/src/components/index.ts +++ b/src/components/index.ts @@ -1,6 +1,7 @@ export { default as Button } from './Button/Button' export { default as Box } from './Box/Box' export { default as Column } from './Column/Column' +// export { default as Copyright } from './components/Copyright' export { default as Footer } from './Footer/Footer' export { default as Form } from './Form/Form' // export { default as HTML } from './components/HTML' @@ -21,7 +22,6 @@ export { default as QR } from './QR/QR' export { default as Input } from './Input/Input' export { default as Radio } from './Radio/Radio' export { default as Copyright } from './Copyright/Copyright' -export { default as Clickable } from './Clickable/Clickable' // export { default as OptimizeBackground } from './Optimizers/OptimizeBackground' // export { default as OptimizeImage } from './Optimizers/OptimizeImage' // export { default as OptimizeLogo } from './Optimizers/OptimizeLogo' diff --git a/src/pages/AssessorPage/Assessor.sass b/src/pages/AssessorPage/Assessor.sass index 66e84ad..1e0b5bc 100644 --- a/src/pages/AssessorPage/Assessor.sass +++ b/src/pages/AssessorPage/Assessor.sass @@ -1,53 +1 @@ @use '/src/styles/classes.sass' - -.modal - font-weight: 500 - - &__application-number - padding: 1rem 0 - border-radius: 8px - font-size: 1.75rem - font-weight: 800 - display: flex - flex-direction: column - flex-wrap: wrap - align-items: center - background: #16212C - box-shadow: 8px 8px 28px #0d141b, -8px -8px 28px #1f2e3d - - &__name - padding: 1rem 0 0 0 - font-size: 1rem - - &__row - display: flex - flex-direction: column - flex-wrap: wrap - justify-content: flex-start - align-items: flex-start - gap: 0.5rem - padding: 1.25rem 1rem - // box-shadow: 5px 5px 10px #10171f, -5px -5px 10px #1c2b39 - // border: 1px solid white - // border-radius: 8px - // margin: 0.5rem - - &__label - font-size: 0.75rem - - &__detail - font-size: 1rem - - &__price - font-size: 1.75rem - font-weight: 700 - - &__cancel - font-size: 0.75rem - padding: 0.5rem 0 0 0 - font-weight: 400 - -.approval - font-size: 1.75rem - font-weight: 700 - padding: 0.5rem 1rem diff --git a/src/pages/AssessorPage/Assessor.tsx b/src/pages/AssessorPage/Assessor.tsx index 1c5a406..be4b469 100644 --- a/src/pages/AssessorPage/Assessor.tsx +++ b/src/pages/AssessorPage/Assessor.tsx @@ -1,21 +1,19 @@ import './Assessor.sass' -import { Logo, Page, Row, Padding, ModalButton, Button, Clickable, Link } from '../../components' +import { Logo, Link, Page, Row, Padding, ModalButton, Box, Button, Modal, Column } from '../../components' import { FiLogOut } from 'solid-icons/fi' import { Tabs } from '@kobalte/core/tabs' import { ofetch } from 'ofetch' -import { onMount, createSignal, Show } from 'solid-js' -// import dayjs from 'dayjs' -// import { checkConnection, createPdf } from '../../utils/functions' -// import { FaSolidThumbsUp } from 'solid-icons/fa' -import { _employeeName, _employeeId } from '../../stores/employee' -import { useNavigate } from '@solidjs/router' +import { onMount, createSignal } from 'solid-js' +import dayjs from 'dayjs' +import { checkConnection, createPdf } from '../../utils/functions' +import { FaSolidThumbsUp } from 'solid-icons/fa' +import { _employeeName } from '../../stores/employee' const API = import.meta.env.VITE_BACKEND const PESO = import.meta.env.VITE_PESO +const ID = import.meta.env.VITE_HEADID export default () => { - const navigate = useNavigate() - const [totalOp, setTotalOp] = createSignal(0) const [assessor, setAssessor] = createSignal('') const [dateOp, setDateOp] = createSignal('') @@ -40,69 +38,6 @@ export default () => { const [approved, setApproved] = createSignal(false) const [approvedApplication, setApprovedApplication] = createSignal('') - const [isBuilding, setIsBuilding] = createSignal(false) - const [isOccupancy, setIsOccupancy] = createSignal(false) - const [isElectrical, setIsElectrical] = createSignal(false) - - const [employeeId, setEmployeeId] = createSignal(0) - const [employeeName, setEmployeeName] = createSignal('') - - const checkAccess = async (access: string) => { - try { - const response = await ofetch(`${API}check-access/${access}/${employeeId()}`) - const result = response.result - if (result > 0) return true - else return false - } catch { - return false - } - } - - const checkDivision = async () => { - const building = await checkAccess('BUILDING ORDER OF PAYMENT') - setIsBuilding(building) - - const occupancy = await checkAccess('OCCUPANCY ORDER OF PAYMENT') - setIsOccupancy(occupancy) - - const electrical = await checkAccess('ELECTRICAL ASSESSMENT') - setIsElectrical(electrical) - } - - const getListForPrinting = async () => { - try { - const response = await ofetch(API + 'get-listopprinting-electrical', { parseResponse: JSON.parse }) - setApplicationList(response.result) - setNameList(response.result2) - } catch (error) { - console.error(error) - } - } - - const removeEmployee = () => { - sessionStorage.removeItem('id') - sessionStorage.removeItem('name') - } - - const checkLogged = async () => { - const idStore = sessionStorage.getItem('id') - const nameStore = sessionStorage.getItem('name') - setEmployeeId(parseInt(idStore!)) - setEmployeeName(nameStore!) - } - - const logout = async () => { - removeEmployee() - navigate('/') - // console.log('yeah') - } - - onMount(async () => { - checkLogged() - await checkDivision() - await getListForPrinting() - }) - return ( <> @@ -116,13 +51,13 @@ export default () => { - {employeeName()} - + {_employeeName.get()} + Logout - + @@ -130,21 +65,15 @@ export default () => { - - - Building - - - - - Occupancy - - - - - Electrical - - + + Building + + + Occupancy + + + Electrical + @@ -187,7 +116,7 @@ export default () => { -

List of Ready to Print in Electrical Order of Payments

+

List of Ready to Approve and Sign Electrical Order of Payments

@@ -254,7 +183,7 @@ export default () => { - + Click anywhere to cancel diff --git a/src/pages/IndexPage/Index.sass b/src/pages/IndexPage/Index.sass index 182e771..ab1ef30 100644 --- a/src/pages/IndexPage/Index.sass +++ b/src/pages/IndexPage/Index.sass @@ -53,15 +53,3 @@ h1 @media only screen and (max-width: views.$tablet) padding: 3.25rem 0 0 0 font-size: 1rem - -.mobile-buttons - padding: 2rem 0 0 0 - display: flex - flex-direction: column - flex-wrap: wrap - justify-content: center - align-items: stretch - align-content: stretch - text-align: center - gap: 0.5rem - width: 55vw diff --git a/src/pages/IndexPage/Index.tsx b/src/pages/IndexPage/Index.tsx index 180614d..8e48009 100644 --- a/src/pages/IndexPage/Index.tsx +++ b/src/pages/IndexPage/Index.tsx @@ -1,5 +1,5 @@ import './Index.sass' -import { Button, Page, Padding, Display, Row, Logo, Footer, Copyright, Column, Image } from '../../components' +import { Button, Page, Padding, Display, Row, Logo, Footer, Image, Copyright, Column } from '../../components' import { onMount } from 'solid-js' import { ofetch } from 'ofetch' import ocboAvif from '../../assets/images/optimized/ocbologo.avif' @@ -50,8 +50,8 @@ export default () => { return ( <> - - + + @@ -70,15 +70,32 @@ export default () => { for Office of the City Building Official

A paperless and effortless solution on signing permits

- - - - - - + + + - + + + + +

OCBO e-Sign

+ +
+

Secure e-Signature

+ for Office of the City Building Official +

A paperless and effortless solution on signing permits

+
+ + +