Updated assessor page
This commit is contained in:
parent
2ee72c8ae1
commit
f55447a116
1 changed files with 19 additions and 4 deletions
|
|
@ -9,7 +9,7 @@ import { checkConnection, createPdf } from '../../utils/functions'
|
|||
import { FaSolidThumbsUp } from 'solid-icons/fa'
|
||||
import { _employeeName, _employeeId } from '../../stores/employee'
|
||||
import { useNavigate } from '@solidjs/router'
|
||||
import { _applicationNo, _date, _optn, _name, _location, _type, _assessor, _feeList, _codeList, _amountList } from '../../stores/pdfinfo'
|
||||
import { _applicationNo, _date, _optn, _name, _location, _type, _assessor, _feeList, _codeList, _amountList, _signature, _assessorid } from '../../stores/pdfinfo'
|
||||
|
||||
const API = import.meta.env.VITE_BACKEND
|
||||
const PESO = import.meta.env.VITE_PESO
|
||||
|
|
@ -48,6 +48,8 @@ export default () => {
|
|||
const [employeeId, setEmployeeId] = createSignal(0)
|
||||
const [employeeName, setEmployeeName] = createSignal('')
|
||||
|
||||
const [sign, setSign] = createSignal('')
|
||||
|
||||
// const [docApplicationNo, setDocApplicationNo] = createSignal('')
|
||||
// const [docDate, setDocDate] = createSignal('')
|
||||
// const [docLocation, setDocLocation] = createSignal('')
|
||||
|
|
@ -79,6 +81,7 @@ export default () => {
|
|||
_location.set(location)
|
||||
_type.set(type)
|
||||
_assessor.set(assessor)
|
||||
_assessorid.set(employeeId())
|
||||
}
|
||||
|
||||
const getPrintDetailsFees = async (id: number) => {
|
||||
|
|
@ -151,6 +154,7 @@ export default () => {
|
|||
|
||||
getPrintDetails(op.result11[0])
|
||||
getPrintDetailsFees(op.result11[0])
|
||||
getSignatureImage(employeeId())
|
||||
}
|
||||
|
||||
const calculateTotal = (list: number[]) => {
|
||||
|
|
@ -207,14 +211,14 @@ export default () => {
|
|||
// updateOrderofpayment = await updateOp()
|
||||
|
||||
// if (updateOrderofpayment) {
|
||||
// setPrintedApplication(application)
|
||||
// setPrinted(true)
|
||||
// getPrintDetails(applicationId())
|
||||
// setPrintedApplication(application)
|
||||
// setPrinted(true)
|
||||
createPdf()
|
||||
// }
|
||||
}
|
||||
|
||||
const updateOp = async () => {
|
||||
console.log(applicationId())
|
||||
try {
|
||||
await ofetch(API + 'update-opprinted-electrical', {
|
||||
method: 'POST',
|
||||
|
|
@ -242,6 +246,17 @@ export default () => {
|
|||
}
|
||||
}
|
||||
|
||||
const getSignatureImage = async (id: number) => {
|
||||
try {
|
||||
const response = await ofetch(API + 'get-signatureimage/' + id, { parseResponse: JSON.parse })
|
||||
const image = response.result
|
||||
_signature.set(image)
|
||||
return true
|
||||
} catch {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
const logout = async () => {
|
||||
removeEmployee()
|
||||
navigate('/')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue