diff --git a/src/pages/AssessorPage/Assessor.tsx b/src/pages/AssessorPage/Assessor.tsx index 9c47f6f..193cd6f 100644 --- a/src/pages/AssessorPage/Assessor.tsx +++ b/src/pages/AssessorPage/Assessor.tsx @@ -1,12 +1,12 @@ -import { Tabs } from '@kobalte/core/tabs'; -import { useNavigate } from '@solidjs/router'; -import dayjs from 'dayjs'; -import { FaSolidThumbsUp } from 'solid-icons/fa'; -import { FiLogOut } from 'solid-icons/fi'; -import { VsRefresh } from 'solid-icons/vs'; -import { createEffect, createSignal, onMount } from 'solid-js'; -import { Show } from 'solid-js/web'; -import { Box, Button, Clickable, Column, Combobox, Input, Link, Logo, Modal, ModalButton, Padding, Page, Row } from '../../components/index.ts'; +import { Tabs } from '@kobalte/core/tabs' +import { useNavigate } from '@solidjs/router' +import dayjs from 'dayjs' +import { FaSolidThumbsUp, FaSolidUserGear } from 'solid-icons/fa' +import { FiLogOut } from 'solid-icons/fi' +import { VsRefresh } from 'solid-icons/vs' +import { createEffect, createSignal, onMount } from 'solid-js' +import { Show } from 'solid-js/web' +import { Box, Button, Clickable, Column, Combobox, Input, Link, Logo, Modal, ModalButton, Padding, Page, Row } from '../../components/index.ts' import { _additional, _additionalAmountList, @@ -31,10 +31,9 @@ import { _totalUnits, _type, _units, -} from '../../stores/pdfinfo.ts'; -import { checkConnection, createPdfElectrical, createPdfOccupancy, getApi, getApiMulti, postApi, statusPopsApi, voidPopsApi, saveNewName, saveNewPassword, securePassword, getDateTime } from '../../utils/functions/index.ts'; -import './Assessor.sass'; -import { FaSolidUserGear } from 'solid-icons/fa' +} from '../../stores/pdfinfo.ts' +import { checkConnection, createPdfElectrical, createPdfOccupancy, getApi, getApiMulti, getDateTime, postApi, saveNewName, saveNewPassword, securePassword, statusPopsApi, voidPopsApi } from '../../utils/functions/index.ts' +import './Assessor.sass' const PESO = import.meta.env.VITE_PESO @@ -79,7 +78,7 @@ export default () => { const [filter, setFilter] = createSignal('') - const listType = ['Print', 'Reprint (No Change)', 'Void and Reprint'] + const listType = ['Print', 'Reprint (No Change)', 'Void and Reapprove'] const [selectedType, setSelectedType] = createSignal('Print') const [voidError, setVoidError] = createSignal(false) @@ -348,13 +347,19 @@ export default () => { return } - if (selectedType().includes("Void")) { + if (selectedType().includes('Void')) { + // Return to ASSESSMENT + // TODO: + // Set current status (for validation) to 1, is_approve = 1 + // Clear order of payment as long as not Paid + // Clear esign_transactions + const status = await statusPopsOp(application) const message = status.message if (message.includes('No record')) { setVoidError(true) - setErrorMessage("No record found on Pops") + setErrorMessage('No record found on Pops') return } else { const pops_paid = message.pops_paid @@ -362,7 +367,7 @@ export default () => { if (pops_paid || epay_paid) { setVoidError(true) - setErrorMessage("Already Paid") + setErrorMessage('Already Paid') return } } @@ -525,7 +530,6 @@ export default () => { setConfigError('') encryptNewPassword() } - } else { setConfigError('Invalid Password') setConfigNewEncPassword('') @@ -590,13 +594,12 @@ export default () => { createEffect(() => { if (configPassword() !== '') { - checkCurrentPassword(); - } else checkCurrentPassword(); + checkCurrentPassword() + } else checkCurrentPassword() if (configNewPassword() !== '') { encryptNewPassword() } else encryptNewPassword() - }) return ( @@ -613,9 +616,7 @@ export default () => { - - {employeeName()} - + {employeeName()} setOpenConfig(true)}> @@ -664,7 +665,6 @@ export default () => { - {/* */} @@ -859,7 +859,7 @@ export default () => { {/* */} - + @@ -1020,25 +1020,24 @@ export default () => { - - + -
-
+
+
Name: {employeeName()}
-
- Change Displayed Name - - Leave blank to remain unchanged. +
+ Change Displayed Name + + Leave blank to remain unchanged.
-
- Change Password - - +
+ Change Password + + Current Encrypted Password: @@ -1051,18 +1050,18 @@ export default () => { {configError()} -
- +
@@ -1079,7 +1078,7 @@ export default () => { - +
)