From c0811a72dfd19e701406b0c1a64d8a979b7b7c38 Mon Sep 17 00:00:00 2001 From: anna Date: Tue, 6 Aug 2024 13:55:11 +0800 Subject: [PATCH] fix i18n --- src/pages/Proof/Payment/Pay_DN.js | 5 ++--- src/pages/Proof/Payment/Pay_Office.js | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/pages/Proof/Payment/Pay_DN.js b/src/pages/Proof/Payment/Pay_DN.js index a4316c4..37e68aa 100644 --- a/src/pages/Proof/Payment/Pay_DN.js +++ b/src/pages/Proof/Payment/Pay_DN.js @@ -26,7 +26,6 @@ const BackgroundHead = { const Index = ({ record }) => { const navigate = useNavigate() const intl = useIntl(); - const { local } = intl; return ( ( @@ -68,7 +67,7 @@ const Index = ({ record }) => { id: 'proofPaymentBody_demandNote2' }, { - closingDateOff: local === "en"? DateUtils.dateStr_Eng(record.closingDateOff): DateUtils.dateStr_Cht(record?.closingDateOff), + closingDateOff: DateUtils.dateFormat(record?.closingDateOff, intl.formatMessage({id: "dateStrFormat"})), email: record?.mail, } ) @@ -80,7 +79,7 @@ const Index = ({ record }) => { id: 'proofPaymentBody_demandNote3' }, { - paymentDeadline: local === "en"? DateUtils.dateStr_Eng(record?.closingDate): DateUtils.dateStr_Cht(record?.closingDate), + paymentDeadline: DateUtils.dateFormat(record?.closingDate, intl.formatMessage({id: "dateStrFormat"})), } ) }} /> diff --git a/src/pages/Proof/Payment/Pay_Office.js b/src/pages/Proof/Payment/Pay_Office.js index 7f2d91c..c954a8d 100644 --- a/src/pages/Proof/Payment/Pay_Office.js +++ b/src/pages/Proof/Payment/Pay_Office.js @@ -92,7 +92,7 @@ const Index = ({ record }) => { id: 'proofPaymentBody_office5' }, { - paymentDeadline: locale ==='en'? DateUtils.dateStr_Eng(record?.closingDate):DateUtils.dateStr_Cht(record?.closingDate) + paymentDeadline: DateUtils.dateFormat(record?.closingDate, intl.formatMessage({id: "dateStrFormat"})), } ) }} />