Updated assessor page
This commit is contained in:
parent
bae809c49c
commit
f67721abff
2 changed files with 111 additions and 79 deletions
|
|
@ -80,3 +80,13 @@
|
||||||
|
|
||||||
&__button
|
&__button
|
||||||
padding: 1rem 0 0 0
|
padding: 1rem 0 0 0
|
||||||
|
|
||||||
|
.loading-spinner
|
||||||
|
display: inline-block
|
||||||
|
animation: rotate 2s linear infinite
|
||||||
|
|
||||||
|
@keyframes rotate
|
||||||
|
from
|
||||||
|
transform: rotate(0deg)
|
||||||
|
to
|
||||||
|
transform: rotate(360deg)
|
||||||
|
|
@ -33,6 +33,7 @@ import {
|
||||||
_units,
|
_units,
|
||||||
} from '../../stores/pdfinfo.ts'
|
} from '../../stores/pdfinfo.ts'
|
||||||
import { checkConnection, createPdfElectrical, createPdfOccupancy, getApi, getApiMulti, getDateTime, postApi, saveNewName, saveNewPassword, securePassword, statusPopsApi, voidPopsApi } from '../../utils/functions/index.ts'
|
import { checkConnection, createPdfElectrical, createPdfOccupancy, getApi, getApiMulti, getDateTime, postApi, saveNewName, saveNewPassword, securePassword, statusPopsApi, voidPopsApi } from '../../utils/functions/index.ts'
|
||||||
|
import { AiOutlineLoading3Quarters } from 'solid-icons/ai'
|
||||||
import './Assessor.sass'
|
import './Assessor.sass'
|
||||||
|
|
||||||
const PESO = import.meta.env.VITE_PESO
|
const PESO = import.meta.env.VITE_PESO
|
||||||
|
|
@ -82,6 +83,7 @@ export default () => {
|
||||||
const [selectedType, setSelectedType] = createSignal('Print')
|
const [selectedType, setSelectedType] = createSignal('Print')
|
||||||
|
|
||||||
const [voidError, setVoidError] = createSignal(false)
|
const [voidError, setVoidError] = createSignal(false)
|
||||||
|
const [isLoading, setIsLoading] = createSignal(false)
|
||||||
|
|
||||||
let bldgadditional = false
|
let bldgadditional = false
|
||||||
|
|
||||||
|
|
@ -246,6 +248,8 @@ export default () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const getListForPrinting = async (division: string) => {
|
const getListForPrinting = async (division: string) => {
|
||||||
|
setIsLoading(true)
|
||||||
|
|
||||||
try {
|
try {
|
||||||
let response: any
|
let response: any
|
||||||
|
|
||||||
|
|
@ -283,6 +287,8 @@ export default () => {
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error)
|
console.error(error)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setIsLoading(false)
|
||||||
}
|
}
|
||||||
|
|
||||||
const removeEmployee = () => {
|
const removeEmployee = () => {
|
||||||
|
|
@ -506,6 +512,11 @@ export default () => {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const checkStatusPopsLocal = async (application: string) => {
|
||||||
|
const response = await getApi('check-statuspops-local', application)
|
||||||
|
return response
|
||||||
|
}
|
||||||
|
|
||||||
const statusPopsOp = async (application: string) => {
|
const statusPopsOp = async (application: string) => {
|
||||||
const response = await statusPopsApi(application)
|
const response = await statusPopsApi(application)
|
||||||
return response
|
return response
|
||||||
|
|
@ -866,87 +877,98 @@ export default () => {
|
||||||
</Padding>
|
</Padding>
|
||||||
|
|
||||||
<Row>
|
<Row>
|
||||||
<table class="table">
|
<Show when={isLoading()}>
|
||||||
<thead>
|
<Padding top={2} bottom={0} right={10} left={10}>
|
||||||
<tr>
|
<Column gap={1}>
|
||||||
<th>Application Number</th>
|
<AiOutlineLoading3Quarters class="loading-spinner" size={42} opacity={0.8} />
|
||||||
<th>Name</th>
|
<span>Downloading Data</span>
|
||||||
<th style="text-align: center">Show Details</th>
|
</Column>
|
||||||
</tr>
|
</Padding>
|
||||||
</thead>
|
</Show>
|
||||||
<tbody>
|
|
||||||
{applicationListElectrical().map((item: string, index: number) => (
|
<Show when={!isLoading()}>
|
||||||
|
<table class="table">
|
||||||
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{item}</td>
|
<th>Application Number</th>
|
||||||
<td>{nameListElectrical()[index]}</td>
|
<th>Name</th>
|
||||||
|
<th style="text-align: center">Show Details</th>
|
||||||
<td>
|
|
||||||
<ModalButton
|
|
||||||
class="modal"
|
|
||||||
label="Show Details"
|
|
||||||
design="bo-link"
|
|
||||||
background="#121e2acc"
|
|
||||||
color="#ffffffec"
|
|
||||||
function={async () => {
|
|
||||||
await getopdetails('electrical', item)
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Padding top={0} left={2} right={2} bottom={0}>
|
|
||||||
<span class="modal__application-number">{item}</span>
|
|
||||||
|
|
||||||
<Padding top={1} left={0} right={0} bottom={0}>
|
|
||||||
<section class="modal__row">
|
|
||||||
<span class="modal__row__label">Name of Applicant:</span>
|
|
||||||
<span class="modal__row__detail">{nameListElectrical()[index]}</span>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="modal__row">
|
|
||||||
<span class="modal__row__label">Location:</span>
|
|
||||||
<span class="modal__row__detail">{location()}</span>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="modal__row">
|
|
||||||
<span class="modal__row__label">Type:</span>
|
|
||||||
<span class="modal__row__detail">{type().toUpperCase()}</span>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="modal__row">
|
|
||||||
<span class="modal__row__label">Assessed By:</span>
|
|
||||||
<span class="modal__row__detail">{assessor()}</span>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="modal__row">
|
|
||||||
<span class="modal__row__label">Date Assessed:</span>
|
|
||||||
<span class="modal__row__detail">{dateOp().toUpperCase()}</span>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="modal__row">
|
|
||||||
<span class="modal__row__label">Total Fee:</span>
|
|
||||||
<span class="modal__row__detail__price">
|
|
||||||
{PESO}{' '}
|
|
||||||
{totalOp().toLocaleString('en-US', {
|
|
||||||
minimumFractionDigits: 2,
|
|
||||||
})}
|
|
||||||
</span>
|
|
||||||
</section>
|
|
||||||
</Padding>
|
|
||||||
|
|
||||||
<Row padding="2rem 0 0 0">
|
|
||||||
<Show when={selectedType() === 'Print'}>
|
|
||||||
<Button wide label="Print" edges="curved" design="bo-primary" onClick={() => printHandler('electrical', item)}></Button>
|
|
||||||
</Show>
|
|
||||||
<Show when={selectedType() !== 'Print'}>
|
|
||||||
<Button wide label="Reprint" edges="curved" design="bo-primary" onClick={() => rePrintHandler('electrical', item)}></Button>
|
|
||||||
</Show>
|
|
||||||
<span class="modal__cancel">Click anywhere to cancel</span>
|
|
||||||
</Row>
|
|
||||||
</Padding>
|
|
||||||
</ModalButton>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
))}
|
</thead>
|
||||||
</tbody>
|
<tbody>
|
||||||
</table>
|
{applicationListElectrical().map((item: string, index: number) => (
|
||||||
|
<tr>
|
||||||
|
<td>{item}</td>
|
||||||
|
<td>{nameListElectrical()[index]}</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
<ModalButton
|
||||||
|
class="modal"
|
||||||
|
label="Show Details"
|
||||||
|
design="bo-link"
|
||||||
|
background="#121e2acc"
|
||||||
|
color="#ffffffec"
|
||||||
|
function={async () => {
|
||||||
|
await getopdetails('electrical', item)
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Padding top={0} left={2} right={2} bottom={0}>
|
||||||
|
<span class="modal__application-number">{item}</span>
|
||||||
|
|
||||||
|
<Padding top={1} left={0} right={0} bottom={0}>
|
||||||
|
<section class="modal__row">
|
||||||
|
<span class="modal__row__label">Name of Applicant:</span>
|
||||||
|
<span class="modal__row__detail">{nameListElectrical()[index]}</span>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="modal__row">
|
||||||
|
<span class="modal__row__label">Location:</span>
|
||||||
|
<span class="modal__row__detail">{location()}</span>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="modal__row">
|
||||||
|
<span class="modal__row__label">Type:</span>
|
||||||
|
<span class="modal__row__detail">{type().toUpperCase()}</span>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="modal__row">
|
||||||
|
<span class="modal__row__label">Assessed By:</span>
|
||||||
|
<span class="modal__row__detail">{assessor()}</span>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="modal__row">
|
||||||
|
<span class="modal__row__label">Date Assessed:</span>
|
||||||
|
<span class="modal__row__detail">{dateOp().toUpperCase()}</span>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="modal__row">
|
||||||
|
<span class="modal__row__label">Total Fee:</span>
|
||||||
|
<span class="modal__row__detail__price">
|
||||||
|
{PESO}{' '}
|
||||||
|
{totalOp().toLocaleString('en-US', {
|
||||||
|
minimumFractionDigits: 2,
|
||||||
|
})}
|
||||||
|
</span>
|
||||||
|
</section>
|
||||||
|
</Padding>
|
||||||
|
|
||||||
|
<Row padding="2rem 0 0 0">
|
||||||
|
<Show when={selectedType() === 'Print'}>
|
||||||
|
<Button wide label="Print" edges="curved" design="bo-primary" onClick={() => printHandler('electrical', item)}></Button>
|
||||||
|
</Show>
|
||||||
|
<Show when={selectedType() !== 'Print'}>
|
||||||
|
<Button wide label="Reprint" edges="curved" design="bo-primary" onClick={() => rePrintHandler('electrical', item)}></Button>
|
||||||
|
</Show>
|
||||||
|
<span class="modal__cancel">Click anywhere to cancel</span>
|
||||||
|
</Row>
|
||||||
|
</Padding>
|
||||||
|
</ModalButton>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
))}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</Show>
|
||||||
</Row>
|
</Row>
|
||||||
</Tabs.Content>
|
</Tabs.Content>
|
||||||
</Tabs>
|
</Tabs>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue