Renamed createPdf
This commit is contained in:
parent
99608062ff
commit
b31c1b762f
4 changed files with 41 additions and 73 deletions
|
|
@ -64,23 +64,15 @@ export default () => {
|
|||
}
|
||||
|
||||
const getListForApprovalElectrical = async () => {
|
||||
try {
|
||||
const responseE = await getApiMulti('get-listopapproval-electrical')
|
||||
setApplicationListElectrical(responseE.result)
|
||||
setNameListElectrical(responseE.result2)
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
}
|
||||
const responseE = await getApiMulti('get-listopapproval-electrical')
|
||||
setApplicationListElectrical(responseE.result)
|
||||
setNameListElectrical(responseE.result2)
|
||||
}
|
||||
|
||||
const getListForApprovalOccupancy = async () => {
|
||||
try {
|
||||
const responseO = await getApiMulti('get-listopapproval-occupancy')
|
||||
setApplicationListOccupancy(responseO.result)
|
||||
setNameListOccupancy(responseO.result2)
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
}
|
||||
const responseO = await getApiMulti('get-listopapproval-occupancy')
|
||||
setApplicationListOccupancy(responseO.result)
|
||||
setNameListOccupancy(responseO.result2)
|
||||
}
|
||||
|
||||
const load = async (division: string) => {
|
||||
|
|
@ -114,7 +106,7 @@ export default () => {
|
|||
const total = calculateTotal(op.result4)
|
||||
const formattedTotal = new Intl.NumberFormat('en-US', {
|
||||
minimumFractionDigits: 2,
|
||||
// maximumFractionDigits: 2,
|
||||
maximumFractionDigits: 2,
|
||||
}).format(total)
|
||||
setTotalOp(formattedTotal)
|
||||
setDateOp(dayjs(op.result5[0]).format('MMMM DD, YYYY'))
|
||||
|
|
@ -159,7 +151,10 @@ export default () => {
|
|||
|
||||
signed = await setNewStatus(division, 'OCCUPANCY ORDER OF PAYMENT APPROVED AND SIGNED', '172', 'OCCOPAPPROVEDSIGNED', 1)
|
||||
updateDocflow(division, application, 'FOR OCCUPANCY RECOMMENDING APPROVAL')
|
||||
if (bldgadditional) updateDocflow(division, application, 'FOR ADDITIONAL ORDER OF PAYMENT RECOMMENDING APPROVAL')
|
||||
if (bldgadditional) {
|
||||
const neededToUpdate = await checkApproval(application, 'FOR ADDITIONAL ORDER OF PAYMENT RECOMMENDING APPROVAL')
|
||||
if (!neededToUpdate) updateDocflow(division, application, 'FOR ADDITIONAL ORDER OF PAYMENT RECOMMENDING APPROVAL')
|
||||
}
|
||||
if (!signed) return
|
||||
|
||||
forprinting = await setNewStatus(division, 'APPROVED FOR PRINTING OF BUREAU OF FIRE AND ORDER OF PAYMENT', '23', 'OCORDEROFPAYMENT', 0)
|
||||
|
|
@ -305,6 +300,11 @@ export default () => {
|
|||
}
|
||||
}
|
||||
|
||||
const checkApproval = async (application: string, status: string) => {
|
||||
const response = await getApi('check-approval', status, application)
|
||||
return response
|
||||
}
|
||||
|
||||
const logout = async () => {
|
||||
removeEmployee()
|
||||
navigate('/')
|
||||
|
|
@ -362,9 +362,11 @@ export default () => {
|
|||
<Tabs.Content class="tabs__content" value="building">
|
||||
<Row>
|
||||
{/* <h2>List of Ready to Approve and Sign Building Order of Payments</h2> */}
|
||||
<Box curved thickness={0} background="#602a2abf" padding="1rem 2rem">
|
||||
<h2>Under Development</h2>
|
||||
</Box>
|
||||
<Padding top={2} bottom={0} left={0} right={0}>
|
||||
<Box curved thickness={0} background="#602a2abf" padding="1rem 2rem">
|
||||
<h2>Under Development</h2>
|
||||
</Box>
|
||||
</Padding>
|
||||
</Row>
|
||||
|
||||
<Row>
|
||||
|
|
@ -382,7 +384,7 @@ export default () => {
|
|||
</Tabs.Content>
|
||||
<Tabs.Content class="tabs__content" value="occupancy">
|
||||
<Row>
|
||||
<h2>List of Ready to Approve and Sign Occupancy Order of Payments</h2>
|
||||
<h2>List of Ready to Approve and Sign in Occupancy Order of Payments</h2>
|
||||
</Row>
|
||||
|
||||
<Padding top={0} bottom={0} right={10} left={0}>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue