Updated assessor page

This commit is contained in:
Patrick Alvin Alcala 2026-03-03 16:39:14 +08:00
parent bae809c49c
commit f67721abff
2 changed files with 111 additions and 79 deletions

View file

@ -80,3 +80,13 @@
&__button
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)

View file

@ -33,6 +33,7 @@ import {
_units,
} from '../../stores/pdfinfo.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'
const PESO = import.meta.env.VITE_PESO
@ -82,6 +83,7 @@ export default () => {
const [selectedType, setSelectedType] = createSignal('Print')
const [voidError, setVoidError] = createSignal(false)
const [isLoading, setIsLoading] = createSignal(false)
let bldgadditional = false
@ -246,6 +248,8 @@ export default () => {
}
const getListForPrinting = async (division: string) => {
setIsLoading(true)
try {
let response: any
@ -283,6 +287,8 @@ export default () => {
} catch (error) {
console.error(error)
}
setIsLoading(false)
}
const removeEmployee = () => {
@ -506,6 +512,11 @@ export default () => {
return true
}
const checkStatusPopsLocal = async (application: string) => {
const response = await getApi('check-statuspops-local', application)
return response
}
const statusPopsOp = async (application: string) => {
const response = await statusPopsApi(application)
return response
@ -866,6 +877,16 @@ export default () => {
</Padding>
<Row>
<Show when={isLoading()}>
<Padding top={2} bottom={0} right={10} left={10}>
<Column gap={1}>
<AiOutlineLoading3Quarters class="loading-spinner" size={42} opacity={0.8} />
<span>Downloading Data</span>
</Column>
</Padding>
</Show>
<Show when={!isLoading()}>
<table class="table">
<thead>
<tr>
@ -947,6 +968,7 @@ export default () => {
))}
</tbody>
</table>
</Show>
</Row>
</Tabs.Content>
</Tabs>