Updated assessor page

This commit is contained in:
Patrick Alvin Alcala 2025-11-19 18:07:57 +08:00
parent a0b2fd4340
commit 455d603248

View file

@ -25,8 +25,8 @@ export default () => {
const [type, setType] = createSignal('')
const [applicationId, setApplicationId] = createSignal(0)
const [applicationList, setApplicationList] = createSignal<string[]>([])
const [nameList, setNameList] = createSignal<string[]>([])
// const [applicationList, setApplicationList] = createSignal<string[]>([])
// const [nameList, setNameList] = createSignal<string[]>([])
const [applicationListElectrical, setApplicationListElectrical] = createSignal<string[]>([])
const [nameListElectrical, setNameListElectrical] = createSignal<string[]>([])
@ -218,7 +218,7 @@ export default () => {
setApplicationListOccupancy(filteredApplications)
setNameListOccupancy(filteredNames)
} else {
setApplicationlistBuilding(filteredApplications)
setApplicationListBuilding(filteredApplications)
setNameListBuilding(filteredNames)
}
return
@ -234,7 +234,6 @@ export default () => {
setApplicationListBuilding(response.result)
setNameListBuilding(response.result2)
}
} catch (error) {
console.error(error)
}
@ -410,17 +409,17 @@ export default () => {
}
})
// createEffect(async () => {
// if (filter() !== '') {
// if (isBuilding()) await getListForPrinting('building')
// if (isOccupancy()) await getListForPrinting('occupancy')
// if (isElectrical()) await getListForPrinting('electrical')
// } else if (filter() === '') {
// if (isBuilding()) await getListForPrinting('building')
// if (isOccupancy()) await getListForPrinting('occupancy')
// if (isElectrical()) await getListForPrinting('electrical')
// }
// })
createEffect(async () => {
if (filter() !== '') {
if (isBuilding()) await getListForPrinting('building')
if (isOccupancy()) await getListForPrinting('occupancy')
if (isElectrical()) await getListForPrinting('electrical')
} else if (filter() === '') {
if (isBuilding()) await getListForPrinting('building')
if (isOccupancy()) await getListForPrinting('occupancy')
if (isElectrical()) await getListForPrinting('electrical')
}
})
return (
<>
@ -497,7 +496,7 @@ export default () => {
{applicationListBuilding().map((item: string, index: number) => (
<tr>
<td>{item}</td>
<td>{nameList()[index]}</td>
<td>{nameListBuilding()[index]}</td>
<td>
<ModalButton
@ -516,7 +515,7 @@ export default () => {
<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">{nameList()[index]}</span>
<span class="modal__row__detail">{nameListBuilding()[index]}</span>
</section>
<section class="modal__row">
@ -588,7 +587,7 @@ export default () => {
{applicationListOccupancy().map((item: string, index: number) => (
<tr>
<td>{item}</td>
<td>{nameList()[index]}</td>
<td>{nameListOccupancy()[index]}</td>
<td>
<ModalButton
@ -607,7 +606,7 @@ export default () => {
<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">{nameList()[index]}</span>
<span class="modal__row__detail">{nameListOccupancy()[index]}</span>
</section>
<section class="modal__row">
@ -679,7 +678,7 @@ export default () => {
{applicationListElectrical().map((item: string, index: number) => (
<tr>
<td>{item}</td>
<td>{nameList()[index]}</td>
<td>{nameListElectrical()[index]}</td>
<td>
<ModalButton
@ -698,7 +697,7 @@ export default () => {
<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">{nameList()[index]}</span>
<span class="modal__row__detail">{nameListElectrical()[index]}</span>
</section>
<section class="modal__row">