diff --git a/src/pages/MainPage/Main.tsx b/src/pages/MainPage/Main.tsx index 27e5af4..43554ef 100644 --- a/src/pages/MainPage/Main.tsx +++ b/src/pages/MainPage/Main.tsx @@ -9,8 +9,6 @@ import { checkConnection, createPdf } from '../../utils/functions' import { FaSolidThumbsUp } from 'solid-icons/fa' import { _employeeName } from '../../stores/employee' import { useNavigate } from '@solidjs/router' -// @ts-ignore -// import * as openssl from 'openssl-nodejs' const API = import.meta.env.VITE_BACKEND const PESO = import.meta.env.VITE_PESO @@ -25,15 +23,15 @@ export default () => { const [location, setLocation] = createSignal('') const [type, setType] = createSignal('') const [applicationId, setApplicationId] = createSignal(0) - const [assessorId, setAssessorId] = createSignal(0) + // const [assessorId, setAssessorId] = createSignal(0) - const [gflgu, setGflgu] = createSignal([]) - const [gfdpwh, setGfdpwh] = createSignal([]) - const [tfbo, setTfbo] = createSignal([]) + // const [gflgu, setGflgu] = createSignal([]) + // const [gfdpwh, setGfdpwh] = createSignal([]) + // const [tfbo, setTfbo] = createSignal([]) - const [descriptionList, setDescriptionList] = createSignal([]) - const [amountList, setAmountList] = createSignal([]) - const [dateOpList, setDateOpList] = createSignal([]) + // const [descriptionList, setDescriptionList] = createSignal([]) + // const [amountList, setAmountList] = createSignal([]) + // const [dateOpList, setDateOpList] = createSignal([]) const [applicationList, setApplicationList] = createSignal([]) const [nameList, setNameList] = createSignal([]) @@ -73,13 +71,13 @@ export default () => { setType(op.result6[0]) setDateOp(dayjs(op.result10[0]).format('MMMM DD, YYYY')) setApplicationId(op.result11[0]) - setAssessorId(op.result12[0]) + // setAssessorId(op.result12[0]) setTotalOp(calculateTotal(op.result9)) - setDescriptionList(op.result8) - setAmountList(op.result9) - setDateOpList(op.result10) - calculateAmounts() + // setDescriptionList(op.result8) + // setAmountList(op.result9) + // setDateOpList(op.result10) + // calculateAmounts() } const calculateTotal = (list: number[]) => { @@ -130,7 +128,7 @@ export default () => { const updateOp = async () => { try { - await ofetch(API + 'update-op-electrical', { + await ofetch(API + 'update-opapproved-electrical', { method: 'POST', body: { data: parseInt(applicationId().toString()) }, }) @@ -140,30 +138,30 @@ export default () => { } } - const calculateAmounts = () => { - const amounts: string[] = amountList() - let gflguList: number[] = [] - let gfdpwhList: number[] = [] - let tfboList: number[] = [] + // const calculateAmounts = () => { + // const amounts: string[] = amountList() + // let gflguList: number[] = [] + // let gfdpwhList: number[] = [] + // let tfboList: number[] = [] - for (let i = 0; i < amounts.length; i++) { - const gflgu = parseFloat(amounts[i]) * 0.8 - const gfdpwh = parseFloat(amounts[i]) * 0.05 - const tfbo = parseFloat(amounts[i]) * 0.15 + // for (let i = 0; i < amounts.length; i++) { + // const gflgu = parseFloat(amounts[i]) * 0.8 + // const gfdpwh = parseFloat(amounts[i]) * 0.05 + // const tfbo = parseFloat(amounts[i]) * 0.15 - const roundedGflgu = parseFloat(gflgu.toFixed(2)) - const roundedGfdpwh = parseFloat(gfdpwh.toFixed(2)) - const roundedTfbo = parseFloat(tfbo.toFixed(2)) + // const roundedGflgu = parseFloat(gflgu.toFixed(2)) + // const roundedGfdpwh = parseFloat(gfdpwh.toFixed(2)) + // const roundedTfbo = parseFloat(tfbo.toFixed(2)) - gflguList.push(roundedGflgu) - gfdpwhList.push(roundedGfdpwh) - tfboList.push(roundedTfbo) - } + // gflguList.push(roundedGflgu) + // gfdpwhList.push(roundedGfdpwh) + // tfboList.push(roundedTfbo) + // } - setGflgu(gflguList) - setGfdpwh(gfdpwhList) - setTfbo(tfboList) - } + // setGflgu(gflguList) + // setGfdpwh(gfdpwhList) + // setTfbo(tfboList) + // } const closeNotification = async () => { setApproved(false) @@ -219,7 +217,9 @@ export default () => { - {employeeName()} + + {employeeName()} + @@ -247,7 +247,10 @@ export default () => { -

List of Ready to Approve and Sign Building Order of Payments

+ {/*

List of Ready to Approve and Sign Building Order of Payments

*/} + +

Under Development

+
@@ -265,7 +268,10 @@ export default () => {
-

List of Ready to Approve and Sign Occupancy Order of Payments

+ {/*

List of Ready to Approve and Sign Occupancy Order of Payments

*/} + +

Under Development

+