From 9ecd74a82db35cce9d6b544d08b3d9e9da88e115 Mon Sep 17 00:00:00 2001 From: Patrick Alvin Alcala Date: Thu, 16 Oct 2025 17:25:28 +0800 Subject: [PATCH] Fixed date error on pdf --- src/pages/AssessorPage/Assessor.tsx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/pages/AssessorPage/Assessor.tsx b/src/pages/AssessorPage/Assessor.tsx index bcd053c..cf5f935 100644 --- a/src/pages/AssessorPage/Assessor.tsx +++ b/src/pages/AssessorPage/Assessor.tsx @@ -153,6 +153,9 @@ export default () => { getPrintDetails(op.result11[0]) getPrintDetailsFees(op.result11[0]) getSignatureImage(employeeId()) + + const approversignId = await geteSignId(276) + getApprovedDate(approversignId, applicationNo) } const calculateTotal = (list: number[]) => { @@ -260,9 +263,9 @@ export default () => { } } - const geteSignId = async () => { + const geteSignId = async (id: number) => { 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 return result } catch { @@ -271,7 +274,7 @@ export default () => { } const postTransaction = async (application: string) => { - const id = await geteSignId() + const id = await geteSignId(employeeId()) const today = new Date() const formatedDate = dayjs(today).format('YYYY-MM-DD HH:mm:ss') @@ -279,8 +282,6 @@ export default () => { method: 'POST', body: { data: parseInt(id), data2: application, data3: formatedDate }, }) - - getApprovedDate(id, application) } const getApprovedDate = async (id: number, application: string) => {