Updated assessor page
This commit is contained in:
parent
a0b2fd4340
commit
455d603248
1 changed files with 21 additions and 22 deletions
|
|
@ -25,8 +25,8 @@ export default () => {
|
||||||
const [type, setType] = createSignal('')
|
const [type, setType] = createSignal('')
|
||||||
const [applicationId, setApplicationId] = createSignal(0)
|
const [applicationId, setApplicationId] = createSignal(0)
|
||||||
|
|
||||||
const [applicationList, setApplicationList] = createSignal<string[]>([])
|
// const [applicationList, setApplicationList] = createSignal<string[]>([])
|
||||||
const [nameList, setNameList] = createSignal<string[]>([])
|
// const [nameList, setNameList] = createSignal<string[]>([])
|
||||||
|
|
||||||
const [applicationListElectrical, setApplicationListElectrical] = createSignal<string[]>([])
|
const [applicationListElectrical, setApplicationListElectrical] = createSignal<string[]>([])
|
||||||
const [nameListElectrical, setNameListElectrical] = createSignal<string[]>([])
|
const [nameListElectrical, setNameListElectrical] = createSignal<string[]>([])
|
||||||
|
|
@ -218,12 +218,12 @@ export default () => {
|
||||||
setApplicationListOccupancy(filteredApplications)
|
setApplicationListOccupancy(filteredApplications)
|
||||||
setNameListOccupancy(filteredNames)
|
setNameListOccupancy(filteredNames)
|
||||||
} else {
|
} else {
|
||||||
setApplicationlistBuilding(filteredApplications)
|
setApplicationListBuilding(filteredApplications)
|
||||||
setNameListBuilding(filteredNames)
|
setNameListBuilding(filteredNames)
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (division === 'electrical') {
|
if (division === 'electrical') {
|
||||||
setApplicationListElectrical(response.result)
|
setApplicationListElectrical(response.result)
|
||||||
setNameListElectrical(response.result2)
|
setNameListElectrical(response.result2)
|
||||||
|
|
@ -234,7 +234,6 @@ export default () => {
|
||||||
setApplicationListBuilding(response.result)
|
setApplicationListBuilding(response.result)
|
||||||
setNameListBuilding(response.result2)
|
setNameListBuilding(response.result2)
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error)
|
console.error(error)
|
||||||
}
|
}
|
||||||
|
|
@ -410,17 +409,17 @@ export default () => {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
// createEffect(async () => {
|
createEffect(async () => {
|
||||||
// if (filter() !== '') {
|
if (filter() !== '') {
|
||||||
// if (isBuilding()) await getListForPrinting('building')
|
if (isBuilding()) await getListForPrinting('building')
|
||||||
// if (isOccupancy()) await getListForPrinting('occupancy')
|
if (isOccupancy()) await getListForPrinting('occupancy')
|
||||||
// if (isElectrical()) await getListForPrinting('electrical')
|
if (isElectrical()) await getListForPrinting('electrical')
|
||||||
// } else if (filter() === '') {
|
} else if (filter() === '') {
|
||||||
// if (isBuilding()) await getListForPrinting('building')
|
if (isBuilding()) await getListForPrinting('building')
|
||||||
// if (isOccupancy()) await getListForPrinting('occupancy')
|
if (isOccupancy()) await getListForPrinting('occupancy')
|
||||||
// if (isElectrical()) await getListForPrinting('electrical')
|
if (isElectrical()) await getListForPrinting('electrical')
|
||||||
// }
|
}
|
||||||
// })
|
})
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|
@ -497,7 +496,7 @@ export default () => {
|
||||||
{applicationListBuilding().map((item: string, index: number) => (
|
{applicationListBuilding().map((item: string, index: number) => (
|
||||||
<tr>
|
<tr>
|
||||||
<td>{item}</td>
|
<td>{item}</td>
|
||||||
<td>{nameList()[index]}</td>
|
<td>{nameListBuilding()[index]}</td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
<ModalButton
|
<ModalButton
|
||||||
|
|
@ -516,7 +515,7 @@ export default () => {
|
||||||
<Padding top={1} left={0} right={0} bottom={0}>
|
<Padding top={1} left={0} right={0} bottom={0}>
|
||||||
<section class="modal__row">
|
<section class="modal__row">
|
||||||
<span class="modal__row__label">Name of Applicant:</span>
|
<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>
|
||||||
|
|
||||||
<section class="modal__row">
|
<section class="modal__row">
|
||||||
|
|
@ -588,7 +587,7 @@ export default () => {
|
||||||
{applicationListOccupancy().map((item: string, index: number) => (
|
{applicationListOccupancy().map((item: string, index: number) => (
|
||||||
<tr>
|
<tr>
|
||||||
<td>{item}</td>
|
<td>{item}</td>
|
||||||
<td>{nameList()[index]}</td>
|
<td>{nameListOccupancy()[index]}</td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
<ModalButton
|
<ModalButton
|
||||||
|
|
@ -607,7 +606,7 @@ export default () => {
|
||||||
<Padding top={1} left={0} right={0} bottom={0}>
|
<Padding top={1} left={0} right={0} bottom={0}>
|
||||||
<section class="modal__row">
|
<section class="modal__row">
|
||||||
<span class="modal__row__label">Name of Applicant:</span>
|
<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>
|
||||||
|
|
||||||
<section class="modal__row">
|
<section class="modal__row">
|
||||||
|
|
@ -679,7 +678,7 @@ export default () => {
|
||||||
{applicationListElectrical().map((item: string, index: number) => (
|
{applicationListElectrical().map((item: string, index: number) => (
|
||||||
<tr>
|
<tr>
|
||||||
<td>{item}</td>
|
<td>{item}</td>
|
||||||
<td>{nameList()[index]}</td>
|
<td>{nameListElectrical()[index]}</td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
<ModalButton
|
<ModalButton
|
||||||
|
|
@ -698,7 +697,7 @@ export default () => {
|
||||||
<Padding top={1} left={0} right={0} bottom={0}>
|
<Padding top={1} left={0} right={0} bottom={0}>
|
||||||
<section class="modal__row">
|
<section class="modal__row">
|
||||||
<span class="modal__row__label">Name of Applicant:</span>
|
<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>
|
||||||
|
|
||||||
<section class="modal__row">
|
<section class="modal__row">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue