Updated main page
This commit is contained in:
parent
f127c49aca
commit
dce9885540
1 changed files with 19 additions and 8 deletions
|
|
@ -150,10 +150,13 @@ export default () => {
|
||||||
updateOrderofpayment = await updateOp(division)
|
updateOrderofpayment = await updateOp(division)
|
||||||
|
|
||||||
if (updateOrderofpayment) {
|
if (updateOrderofpayment) {
|
||||||
postTransaction()
|
|
||||||
postPops(division, application)
|
postPops(division, application)
|
||||||
setApprovedApplication(application)
|
|
||||||
setApproved(true)
|
if (checkPops()) {
|
||||||
|
postTransaction()
|
||||||
|
setApprovedApplication(application)
|
||||||
|
setApproved(true)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else if (division === 'occupancy') {
|
} else if (division === 'occupancy') {
|
||||||
const additionalResult = await getApi('check-bldgadditional-approval', application)
|
const additionalResult = await getApi('check-bldgadditional-approval', application)
|
||||||
|
|
@ -173,10 +176,13 @@ export default () => {
|
||||||
updateOrderofpayment = await updateOp(division)
|
updateOrderofpayment = await updateOp(division)
|
||||||
|
|
||||||
if (updateOrderofpayment) {
|
if (updateOrderofpayment) {
|
||||||
postTransaction()
|
|
||||||
postPops(division, application)
|
postPops(division, application)
|
||||||
setApprovedApplication(application)
|
|
||||||
setApproved(true)
|
if (checkPops()){
|
||||||
|
postTransaction()
|
||||||
|
setApprovedApplication(application)
|
||||||
|
setApproved(true)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -194,8 +200,6 @@ export default () => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const updateOp = async (division: string) => {
|
const updateOp = async (division: string) => {
|
||||||
if (division === 'electrical') {
|
if (division === 'electrical') {
|
||||||
return await postApi('update-opapproved-electrical', { data: parseInt(applicationId().toString()) })
|
return await postApi('update-opapproved-electrical', { data: parseInt(applicationId().toString()) })
|
||||||
|
|
@ -233,6 +237,13 @@ export default () => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const checkPops = async (application string) => {
|
||||||
|
const response = await getApi('check-popsrecord', application)
|
||||||
|
const result = response.result[0]
|
||||||
|
|
||||||
|
return result > 0
|
||||||
|
}
|
||||||
|
|
||||||
// const calculateAmounts = () => {
|
// const calculateAmounts = () => {
|
||||||
// const amounts: string[] = amountList()
|
// const amounts: string[] = amountList()
|
||||||
// let gflguList: number[] = []
|
// let gflguList: number[] = []
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue