Fixed date error on pdf

This commit is contained in:
Patrick Alvin Alcala 2025-10-16 17:25:28 +08:00
parent 03ebafab67
commit 9ecd74a82d

View file

@ -153,6 +153,9 @@ export default () => {
getPrintDetails(op.result11[0]) getPrintDetails(op.result11[0])
getPrintDetailsFees(op.result11[0]) getPrintDetailsFees(op.result11[0])
getSignatureImage(employeeId()) getSignatureImage(employeeId())
const approversignId = await geteSignId(276)
getApprovedDate(approversignId, applicationNo)
} }
const calculateTotal = (list: number[]) => { const calculateTotal = (list: number[]) => {
@ -260,9 +263,9 @@ export default () => {
} }
} }
const geteSignId = async () => { const geteSignId = async (id: number) => {
try { try {
const response = await ofetch(API + 'get-esignid/' + employeeId(), { parseResponse: JSON.parse }) const response = await ofetch(API + 'get-esignid/' + id, { parseResponse: JSON.parse })
const result = response.result const result = response.result
return result return result
} catch { } catch {
@ -271,7 +274,7 @@ export default () => {
} }
const postTransaction = async (application: string) => { const postTransaction = async (application: string) => {
const id = await geteSignId() const id = await geteSignId(employeeId())
const today = new Date() const today = new Date()
const formatedDate = dayjs(today).format('YYYY-MM-DD HH:mm:ss') const formatedDate = dayjs(today).format('YYYY-MM-DD HH:mm:ss')
@ -279,8 +282,6 @@ export default () => {
method: 'POST', method: 'POST',
body: { data: parseInt(id), data2: application, data3: formatedDate }, body: { data: parseInt(id), data2: application, data3: formatedDate },
}) })
getApprovedDate(id, application)
} }
const getApprovedDate = async (id: number, application: string) => { const getApprovedDate = async (id: number, application: string) => {