Compare commits
3 commits
58eb2cb472
...
1fb3b2d2c8
| Author | SHA1 | Date | |
|---|---|---|---|
| 1fb3b2d2c8 | |||
| 74d8ad747e | |||
| 105e7ea195 |
3 changed files with 120 additions and 39 deletions
Binary file not shown.
|
Before Width: | Height: | Size: 190 KiB |
|
|
@ -84,6 +84,7 @@ h1
|
||||||
width: 90%
|
width: 90%
|
||||||
border-collapse: collapse
|
border-collapse: collapse
|
||||||
margin: 2rem
|
margin: 2rem
|
||||||
|
box-shadow: inset 0 1px 2px #16212C, 0 2px 4px #2a3f5332, 0 4px 8px #344c654e
|
||||||
|
|
||||||
th, td
|
th, td
|
||||||
// border: 1px solid vars.$tableBorderColor
|
// border: 1px solid vars.$tableBorderColor
|
||||||
|
|
@ -120,12 +121,16 @@ h1
|
||||||
font-weight: 500
|
font-weight: 500
|
||||||
|
|
||||||
&__application-number
|
&__application-number
|
||||||
|
padding: 1rem 0
|
||||||
|
border-radius: 8px
|
||||||
font-size: 1.75rem
|
font-size: 1.75rem
|
||||||
font-weight: 700
|
font-weight: 800
|
||||||
display: flex
|
display: flex
|
||||||
flex-direction: column
|
flex-direction: column
|
||||||
flex-wrap: wrap
|
flex-wrap: wrap
|
||||||
align-items: center
|
align-items: center
|
||||||
|
background: #16212C
|
||||||
|
box-shadow: 8px 8px 28px #0d141b, -8px -8px 28px #1f2e3d
|
||||||
|
|
||||||
&__name
|
&__name
|
||||||
padding: 1rem 0 0 0
|
padding: 1rem 0 0 0
|
||||||
|
|
@ -138,7 +143,11 @@ h1
|
||||||
justify-content: flex-start
|
justify-content: flex-start
|
||||||
align-items: flex-start
|
align-items: flex-start
|
||||||
gap: 0.5rem
|
gap: 0.5rem
|
||||||
padding: 2rem 0 0 0
|
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
|
&__label
|
||||||
font-size: 0.75rem
|
font-size: 0.75rem
|
||||||
|
|
@ -149,3 +158,13 @@ h1
|
||||||
&__price
|
&__price
|
||||||
font-size: 1.75rem
|
font-size: 1.75rem
|
||||||
font-weight: 700
|
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
|
||||||
|
|
@ -1,11 +1,12 @@
|
||||||
import './Main.sass'
|
import './Main.sass'
|
||||||
import { Logo, Link, Page, Row, Padding, ModalButton, Box, Button } from '../../components/'
|
import { Logo, Link, Page, Row, Padding, ModalButton, Box, Button, Modal, Column } from '../../components/'
|
||||||
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 } from 'solid-js'
|
import { onMount, createSignal } from 'solid-js'
|
||||||
import dayjs from 'dayjs'
|
import dayjs from 'dayjs'
|
||||||
import { checkConnection } from '../../utils/functions'
|
import { checkConnection } from '../../utils/functions'
|
||||||
|
import { FaSolidThumbsUp } from 'solid-icons/fa'
|
||||||
|
|
||||||
const API = import.meta.env.VITE_BACKEND
|
const API = import.meta.env.VITE_BACKEND
|
||||||
const PESO = import.meta.env.VITE_PESO
|
const PESO = import.meta.env.VITE_PESO
|
||||||
|
|
@ -33,6 +34,8 @@ export default () => {
|
||||||
|
|
||||||
const [errorMessage, setErrorMessage] = createSignal('')
|
const [errorMessage, setErrorMessage] = createSignal('')
|
||||||
const [connected, setConnected] = createSignal(true)
|
const [connected, setConnected] = createSignal(true)
|
||||||
|
const [approved, setApproved] = createSignal(false)
|
||||||
|
const [approvedApplication, setApprovedApplication] = createSignal('')
|
||||||
|
|
||||||
const getListForApproval = async () => {
|
const getListForApproval = async () => {
|
||||||
try {
|
try {
|
||||||
|
|
@ -90,15 +93,24 @@ export default () => {
|
||||||
// return result
|
// return result
|
||||||
// }
|
// }
|
||||||
|
|
||||||
const approveHandler = async () => {
|
const approveHandler = async (application: string) => {
|
||||||
let signed: boolean = false
|
let signed: boolean = false
|
||||||
let forprinting: boolean = false
|
let forprinting: boolean = false
|
||||||
|
|
||||||
signed = await setNewStatus('ELECTRICAL ORDER OF PAYMENT APPROVED AND SIGNED', '170', 'ELECOPAPPROVEDSIGNED')
|
setConnected(await checkConnection())
|
||||||
if (signed) {
|
if (connected() === false) {
|
||||||
forprinting = await setNewStatus('FOR ELECTRICAL ORDER OF PAYMENT PRINTING', '95', 'ELECOPPRINT')
|
setErrorMessage('No Connection on Server')
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
signed = await setNewStatus('ELECTRICAL ORDER OF PAYMENT APPROVED AND SIGNED', '170', 'ELECOPAPPROVEDSIGNED')
|
||||||
|
if (!signed) return
|
||||||
|
|
||||||
|
forprinting = await setNewStatus('FOR ELECTRICAL ORDER OF PAYMENT PRINTING', '95', 'ELECOPPRINT')
|
||||||
|
|
||||||
if (forprinting) {
|
if (forprinting) {
|
||||||
|
setApprovedApplication(application)
|
||||||
|
setApproved(true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -143,6 +155,11 @@ export default () => {
|
||||||
setTfbo(tfboList)
|
setTfbo(tfboList)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const closeNotification = async () => {
|
||||||
|
setApproved(false)
|
||||||
|
await load()
|
||||||
|
}
|
||||||
|
|
||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
await load()
|
await load()
|
||||||
})
|
})
|
||||||
|
|
@ -251,44 +268,45 @@ export default () => {
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Padding top={0} left={2} right={2} bottom={0}>
|
<Padding top={0} left={2} right={2} bottom={0}>
|
||||||
<Box curved thickness={1} padding="1rem">
|
<span class="modal__application-number">{item}</span>
|
||||||
<span class="modal__application-number">{item}</span>
|
|
||||||
</Box>
|
|
||||||
<section class="modal__row">
|
|
||||||
<span class="modal__row__label">Name of Applicant:</span>
|
|
||||||
<span class="modal__row__detail">{nameList()[index]}</span>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="modal__row">
|
<Padding top={1} left={0} right={0} bottom={0}>
|
||||||
<span class="modal__row__label">Location:</span>
|
<section class="modal__row">
|
||||||
<span class="modal__row__detail">{location()}</span>
|
<span class="modal__row__label">Name of Applicant:</span>
|
||||||
</section>
|
<span class="modal__row__detail">{nameList()[index]}</span>
|
||||||
|
</section>
|
||||||
|
|
||||||
<section class="modal__row">
|
<section class="modal__row">
|
||||||
<span class="modal__row__label">Type:</span>
|
<span class="modal__row__label">Location:</span>
|
||||||
<span class="modal__row__detail">{type().toUpperCase()}</span>
|
<span class="modal__row__detail">{location()}</span>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="modal__row">
|
<section class="modal__row">
|
||||||
<span class="modal__row__label">Assessed By:</span>
|
<span class="modal__row__label">Type:</span>
|
||||||
<span class="modal__row__detail">{assessor()}</span>
|
<span class="modal__row__detail">{type().toUpperCase()}</span>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="modal__row">
|
<section class="modal__row">
|
||||||
<span class="modal__row__label">Date Assessed:</span>
|
<span class="modal__row__label">Assessed By:</span>
|
||||||
<span class="modal__row__detail">{dateOp().toUpperCase()}</span>
|
<span class="modal__row__detail">{assessor()}</span>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="modal__row">
|
<section class="modal__row">
|
||||||
<span class="modal__row__label">Total Fee:</span>
|
<span class="modal__row__label">Date Assessed:</span>
|
||||||
<span class="modal__row__detail__price">
|
<span class="modal__row__detail">{dateOp().toUpperCase()}</span>
|
||||||
{PESO} {totalOp().toFixed(2)}
|
</section>
|
||||||
</span>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<Row gap={12} padding="2rem 0 0 0">
|
<section class="modal__row">
|
||||||
<Button label="Cancel" edges="curved" design="bo-danger"></Button>
|
<span class="modal__row__label">Total Fee:</span>
|
||||||
<Button label="Approve" edges="curved" design="bo-primary" onClick={approveHandler}></Button>
|
<span class="modal__row__detail__price">
|
||||||
|
{PESO} {totalOp().toFixed(2)}
|
||||||
|
</span>
|
||||||
|
</section>
|
||||||
|
</Padding>
|
||||||
|
|
||||||
|
<Row padding="2rem 0 0 0">
|
||||||
|
<Button wide label="Approve" edges="curved" design="bo-primary" onClick={() => approveHandler(item)}></Button>
|
||||||
|
<span class="modal__cancel">To cancel click anywhere</span>
|
||||||
</Row>
|
</Row>
|
||||||
</Padding>
|
</Padding>
|
||||||
</ModalButton>
|
</ModalButton>
|
||||||
|
|
@ -303,6 +321,50 @@ export default () => {
|
||||||
</Row>
|
</Row>
|
||||||
</Padding>
|
</Padding>
|
||||||
</Page>
|
</Page>
|
||||||
|
|
||||||
|
<div onClick={() => setApproved(false)}>
|
||||||
|
<Modal trigger={approved()} background="#123220ff" color="#cdfbe1f0" opacity={0.8}>
|
||||||
|
<Padding top={1} bottom={1} left={2} right={2}>
|
||||||
|
<Column>
|
||||||
|
<Row gap={4}>
|
||||||
|
<FaSolidThumbsUp size={75} />
|
||||||
|
<Box curved thickness={3} color="#cdfbe1f0" padding="1rem">
|
||||||
|
<span class="approval">Approved</span>
|
||||||
|
</Box>
|
||||||
|
</Row>
|
||||||
|
<Row padding="2rem 0 0 0">
|
||||||
|
<h2>{approvedApplication()}</h2>
|
||||||
|
</Row>
|
||||||
|
|
||||||
|
<Row>
|
||||||
|
<span class="close-text">Click anywhere to proceed</span>
|
||||||
|
</Row>
|
||||||
|
</Column>
|
||||||
|
</Padding>
|
||||||
|
</Modal>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div onClick={closeNotification}>
|
||||||
|
<Modal trigger={approved()} background="#123220ff" color="#cdfbe1f0" opacity={0.8}>
|
||||||
|
<Padding top={1} bottom={1} left={2} right={2}>
|
||||||
|
<Column>
|
||||||
|
<Row gap={4}>
|
||||||
|
<FaSolidThumbsUp size={75} />
|
||||||
|
<Box curved thickness={3} color="#cdfbe1f0" padding="1rem">
|
||||||
|
<span class="approval">Approved</span>
|
||||||
|
</Box>
|
||||||
|
</Row>
|
||||||
|
<Row padding="2rem 0 0 0">
|
||||||
|
<h2>{approvedApplication()}</h2>
|
||||||
|
</Row>
|
||||||
|
|
||||||
|
<Row>
|
||||||
|
<span class="close-text">Click anywhere to proceed</span>
|
||||||
|
</Row>
|
||||||
|
</Column>
|
||||||
|
</Padding>
|
||||||
|
</Modal>
|
||||||
|
</div>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue