Updated assessor page
This commit is contained in:
parent
e60d1ef103
commit
320a53aac9
2 changed files with 23 additions and 9 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 } from '../../stores/pdfinfo'
|
||||
import { _applicationNo, _date, _optn, _name, _location, _type, _assessor, _feeList, _codeList, _amountList } from '../../stores/pdfinfo'
|
||||
|
||||
const API = import.meta.env.VITE_BACKEND
|
||||
const PESO = import.meta.env.VITE_PESO
|
||||
|
|
@ -65,11 +65,12 @@ export default () => {
|
|||
|
||||
const getPrintDetails = async (id: number) => {
|
||||
const response = await ofetch(API + 'get-printdetails-electrical/' + id)
|
||||
const applicationno = response.result[0]
|
||||
const date = response.result2[0]
|
||||
const location = response.result3[0]
|
||||
const name = response.result8[0]
|
||||
const type = `${response.result4[0]} - ${response.result5[0]}`
|
||||
const applicationno = response.result
|
||||
const date = response.result2
|
||||
const location = response.result3
|
||||
const name = response.result8
|
||||
const type = `${response.result4} - ${response.result5}`
|
||||
const assessor = response.result7
|
||||
|
||||
_optn.set('M' + applicationno.split('-')[0] + applicationno.split('-')[1])
|
||||
_applicationNo.set(applicationno)
|
||||
|
|
@ -77,10 +78,18 @@ export default () => {
|
|||
_name.set(name)
|
||||
_location.set(location)
|
||||
_type.set(type)
|
||||
_assessor.set(assessor)
|
||||
}
|
||||
|
||||
// setDocApplicationNo(applicationno)
|
||||
// setDocDate(dayjs(date).format('MMMM DD, YYYY'))
|
||||
// setDocLocation(location)
|
||||
const getPrintDetailsFees = async (id: number) => {
|
||||
const response = await ofetch(API + 'get-printdetailsfees-electrical/' + id)
|
||||
const feeList = response.result
|
||||
const accountCodeList = response.result2
|
||||
const amountList = response.result3
|
||||
|
||||
_feeList.set(feeList)
|
||||
_codeList.set(accountCodeList)
|
||||
_amountList.set(amountList)
|
||||
}
|
||||
|
||||
// const calculateAmounts = () => {
|
||||
|
|
@ -141,6 +150,7 @@ export default () => {
|
|||
// calculateAmounts()
|
||||
|
||||
getPrintDetails(op.result11[0])
|
||||
getPrintDetailsFees(op.result11[0])
|
||||
}
|
||||
|
||||
const calculateTotal = (list: number[]) => {
|
||||
|
|
|
|||
|
|
@ -7,4 +7,8 @@ export const _name = atom('')
|
|||
export const _location = atom('')
|
||||
export const _type = atom('')
|
||||
export const _code = atom('')
|
||||
export const _assessor = atom('')
|
||||
|
||||
export const _feeList = atom<string[]>([])
|
||||
export const _codeList = atom<string[]>([])
|
||||
export const _amountList = atom<string[]>([])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue