Updated main page
This commit is contained in:
parent
f127c49aca
commit
dce9885540
1 changed files with 19 additions and 8 deletions
|
|
@ -150,11 +150,14 @@ export default () => {
|
|||
updateOrderofpayment = await updateOp(division)
|
||||
|
||||
if (updateOrderofpayment) {
|
||||
postTransaction()
|
||||
postPops(division, application)
|
||||
|
||||
if (checkPops()) {
|
||||
postTransaction()
|
||||
setApprovedApplication(application)
|
||||
setApproved(true)
|
||||
}
|
||||
}
|
||||
} else if (division === 'occupancy') {
|
||||
const additionalResult = await getApi('check-bldgadditional-approval', application)
|
||||
bldgadditional = additionalResult > 0
|
||||
|
|
@ -173,13 +176,16 @@ export default () => {
|
|||
updateOrderofpayment = await updateOp(division)
|
||||
|
||||
if (updateOrderofpayment) {
|
||||
postTransaction()
|
||||
postPops(division, application)
|
||||
|
||||
if (checkPops()){
|
||||
postTransaction()
|
||||
setApprovedApplication(application)
|
||||
setApproved(true)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const setNewStatus = async (division: string, status: string, tag: string, tagword: string, approved: number) => {
|
||||
// const today = new Date()
|
||||
|
|
@ -194,8 +200,6 @@ export default () => {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
const updateOp = async (division: string) => {
|
||||
if (division === 'electrical') {
|
||||
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 amounts: string[] = amountList()
|
||||
// let gflguList: number[] = []
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue