Updated main page
This commit is contained in:
parent
4b80ad9c83
commit
c140b00e12
1 changed files with 22 additions and 19 deletions
|
|
@ -166,8 +166,8 @@ export default () => {
|
||||||
|
|
||||||
if (division === 'electrical') {
|
if (division === 'electrical') {
|
||||||
signed = await setNewStatus(division, 'ELECTRICAL ORDER OF PAYMENT APPROVED AND SIGNED', '170', 'ELECOPAPPROVEDSIGNED', 1)
|
signed = await setNewStatus(division, 'ELECTRICAL ORDER OF PAYMENT APPROVED AND SIGNED', '170', 'ELECOPAPPROVEDSIGNED', 1)
|
||||||
const approvedid = await getIdByApplication(division, application)
|
// const approvedid = await getIdByApplication(division, application)
|
||||||
updateDocflow(division, approvedid, 'FOR ELECTRICAL ORDER OF PAYMENT APPROVAL')
|
updateDocflow(division, application, 'FOR ELECTRICAL ORDER OF PAYMENT APPROVAL')
|
||||||
if (!signed) return
|
if (!signed) return
|
||||||
|
|
||||||
forprinting = await setNewStatus(division, 'FOR ELECTRICAL ORDER OF PAYMENT PRINTING', '95', 'ELECOPPRINT', 0)
|
forprinting = await setNewStatus(division, 'FOR ELECTRICAL ORDER OF PAYMENT PRINTING', '95', 'ELECOPPRINT', 0)
|
||||||
|
|
@ -183,8 +183,9 @@ export default () => {
|
||||||
}
|
}
|
||||||
} else if (division === 'occupancy') {
|
} else if (division === 'occupancy') {
|
||||||
signed = await setNewStatus(division, 'OCCUPANCY ORDER OF PAYMENT APPROVED AND SIGNED', '172', 'OCCOPAPPROVEDSIGNED', 1)
|
signed = await setNewStatus(division, 'OCCUPANCY ORDER OF PAYMENT APPROVED AND SIGNED', '172', 'OCCOPAPPROVEDSIGNED', 1)
|
||||||
const approvedid = await getIdByApplication(division, application)
|
// const approvedid = await getIdByApplication(division, application)
|
||||||
updateDocflow(division, approvedid, 'FOR OCCUPANCY RECOMMENDING APPROVAL')
|
updateDocflow(division, application, 'FOR OCCUPANCY RECOMMENDING APPROVAL')
|
||||||
|
updateDocflow(division, application, 'FOR ADDITIONAL ORDER OF PAYMENT RECOMMENDING APPROVAL')
|
||||||
if (!signed) return
|
if (!signed) return
|
||||||
|
|
||||||
forprinting = await setNewStatus(division, 'APPROVED FOR PRINTING OF BUREAU OF FIRE AND ORDER OF PAYMENT', '23', 'OCORDEROFPAYMENT', 0)
|
forprinting = await setNewStatus(division, 'APPROVED FOR PRINTING OF BUREAU OF FIRE AND ORDER OF PAYMENT', '23', 'OCORDEROFPAYMENT', 0)
|
||||||
|
|
@ -333,23 +334,25 @@ export default () => {
|
||||||
await postApi('post-esigntransaction', { data: parseInt(id), data2: approvedApplication(), data3: formatedDate })
|
await postApi('post-esigntransaction', { data: parseInt(id), data2: approvedApplication(), data3: formatedDate })
|
||||||
}
|
}
|
||||||
|
|
||||||
const updateDocflow = async (division: string, applicationid: number, status: string) => {
|
const updateDocflow = async (division: string, application: string, status: string) => {
|
||||||
if (division === 'electrical') {
|
// if (division === 'electrical') {
|
||||||
await postApi('update-docflow-electrical', { data: parseInt(applicationid.toString()), data2: status })
|
// await postApi('update-docflow-electrical', { data: parseInt(applicationid.toString()), data2: status })
|
||||||
} else if (division === 'occupancy') {
|
// } else if (division === 'occupancy') {
|
||||||
await postApi('update-docflow-occupancy', { data: parseInt(applicationid.toString()), data2: status })
|
// await postApi('update-docflow-occupancy', { data: parseInt(applicationid.toString()), data2: status })
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
await postApi(`update-docflow-${division}`, { data: status, data2: application })
|
||||||
}
|
}
|
||||||
|
|
||||||
const getIdByApplication = async (division: string, applicationNo: string) => {
|
// const getIdByApplication = async (division: string, applicationNo: string) => {
|
||||||
let response
|
// let response
|
||||||
if (division === 'electrical') {
|
// if (division === 'electrical') {
|
||||||
response = await getApi('get-idbyapplication-electrical', applicationNo)
|
// response = await getApi('get-idbyapplication-electrical', applicationNo)
|
||||||
} else if (division === 'occupancy') {
|
// } else if (division === 'occupancy') {
|
||||||
response = await getApi('get-idbyapplication-occupancy', applicationNo)
|
// response = await getApi('get-idbyapplication-occupancy', applicationNo)
|
||||||
}
|
// }
|
||||||
return parseInt(response)
|
// return parseInt(response)
|
||||||
}
|
// }
|
||||||
|
|
||||||
const refresh = async (division: string) => {
|
const refresh = async (division: string) => {
|
||||||
if (division === 'electrical') {
|
if (division === 'electrical') {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue