Update assessor page
This commit is contained in:
parent
374c88016f
commit
45f8cf85d2
1 changed files with 26 additions and 11 deletions
|
|
@ -8,9 +8,10 @@ import { checkConnection, createPdf } from '../../utils/functions'
|
|||
import { FaSolidThumbsUp } from 'solid-icons/fa'
|
||||
import { _employeeName, _employeeId } from '../../stores/employee'
|
||||
import { useNavigate } from '@solidjs/router'
|
||||
import { _applicationNo, _date, _optn, _name, _location, _type, _assessor, _feeList, _codeList, _amountList, _signatureAssessor, _signatureApprover, _assessorid, _approvedDate, _assessedDate } from '../../stores/pdfinfo'
|
||||
import { _applicationNo, _date, _optn, _name, _location, _type, _assessor, _feeList, _codeList, _amountList, _signatureAssessor, _signatureApprover, _assessorid, _approvedDate, _assessedDate, _units, _totalUnits, _floorArea } from '../../stores/pdfinfo'
|
||||
import { VsRefresh } from 'solid-icons/vs'
|
||||
import { getApi, getApiMulti, postApi } from '../../utils/functions'
|
||||
import createPdfOccupancy from '../../utils/functions/createPdfOccupancy'
|
||||
|
||||
const PESO = import.meta.env.VITE_PESO
|
||||
|
||||
|
|
@ -56,6 +57,17 @@ export default () => {
|
|||
const name = response.result8
|
||||
const type = `${response.result4} - ${response.result5}`
|
||||
const assessor = response.result7
|
||||
const units = response.result6
|
||||
let totalUnits = 0
|
||||
let floorArea = 0
|
||||
|
||||
if (division === 'occupancy') {
|
||||
totalUnits = response.result9
|
||||
floorArea = response.result10
|
||||
|
||||
_totalUnits.set(totalUnits)
|
||||
_floorArea.set(floorArea)
|
||||
}
|
||||
|
||||
_optn.set('M' + applicationno.split('-')[0] + applicationno.split('-')[1])
|
||||
_applicationNo.set(applicationno)
|
||||
|
|
@ -65,6 +77,7 @@ export default () => {
|
|||
_type.set(type)
|
||||
_assessor.set(assessor)
|
||||
_assessorid.set(employeeId())
|
||||
_units.set(units)
|
||||
}
|
||||
|
||||
const getPrintDetailsFees = async (division: string, id: number) => {
|
||||
|
|
@ -209,20 +222,22 @@ export default () => {
|
|||
return
|
||||
}
|
||||
|
||||
signed = await setNewStatus(division, 'ELECTRICAL ORDER OF PAYMENT PRINTED', '171', 'ELECOPPRINTED', 1)
|
||||
if (!signed) return
|
||||
// signed = await setNewStatus(division, 'ELECTRICAL ORDER OF PAYMENT PRINTED', '171', 'ELECOPPRINTED', 1)
|
||||
// if (!signed) return
|
||||
|
||||
forprinting = await setNewStatus(division, 'FOR ELECTRICAL OFFICIAL RECEIPT VALIDATION', '98', 'ELECORVALIDATE', 0)
|
||||
if (!forprinting) return
|
||||
// forprinting = await setNewStatus(division, 'FOR ELECTRICAL OFFICIAL RECEIPT VALIDATION', '98', 'ELECORVALIDATE', 0)
|
||||
// if (!forprinting) return
|
||||
|
||||
updateOrderofpayment = await updateOp(division)
|
||||
// updateOrderofpayment = await updateOp(division)
|
||||
|
||||
if (updateOrderofpayment) {
|
||||
postTransaction(application)
|
||||
setPrintedApplication(application)
|
||||
setPrinted(true)
|
||||
// if (updateOrderofpayment) {
|
||||
// postTransaction(application)
|
||||
setPrintedApplication(application)
|
||||
setPrinted(true)
|
||||
if (division === 'electrical') {
|
||||
createPdf()
|
||||
}
|
||||
} else createPdfOccupancy()
|
||||
// }
|
||||
}
|
||||
|
||||
const updateOp = async (division: string) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue