From f67721abff833438ec4f06b3055f0ff775a022d3 Mon Sep 17 00:00:00 2001 From: Patrick Alvin Alcala Date: Tue, 3 Mar 2026 16:39:14 +0800 Subject: [PATCH] Updated assessor page --- src/pages/AssessorPage/Assessor.sass | 10 ++ src/pages/AssessorPage/Assessor.tsx | 180 +++++++++++++++------------ 2 files changed, 111 insertions(+), 79 deletions(-) diff --git a/src/pages/AssessorPage/Assessor.sass b/src/pages/AssessorPage/Assessor.sass index 894a243..6dc3e9a 100644 --- a/src/pages/AssessorPage/Assessor.sass +++ b/src/pages/AssessorPage/Assessor.sass @@ -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) \ No newline at end of file diff --git a/src/pages/AssessorPage/Assessor.tsx b/src/pages/AssessorPage/Assessor.tsx index 193cd6f..a2f685a 100644 --- a/src/pages/AssessorPage/Assessor.tsx +++ b/src/pages/AssessorPage/Assessor.tsx @@ -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,87 +877,98 @@ export default () => { - - - - - - - - - - {applicationListElectrical().map((item: string, index: number) => ( + + + + + Downloading Data + + + + + +
Application NumberNameShow Details
+ - - - - + + + - ))} - -
{item}{nameListElectrical()[index]} - { - await getopdetails('electrical', item) - }} - > - - {item} - - - - - - - - - - - - - - - - - - - - - - - Click anywhere to cancel - - - - Application NumberNameShow Details
+ + + {applicationListElectrical().map((item: string, index: number) => ( + + {item} + {nameListElectrical()[index]} + + + { + await getopdetails('electrical', item) + }} + > + + {item} + + + + + + + + + + + + + + + + + + + + + + + Click anywhere to cancel + + + + + + ))} + + +