Browse Source

fix i18n

CR003
Anna Ho 1 year ago
parent
commit
c0811a72df
2 changed files with 3 additions and 4 deletions
  1. +2
    -3
      src/pages/Proof/Payment/Pay_DN.js
  2. +1
    -1
      src/pages/Proof/Payment/Pay_Office.js

+ 2
- 3
src/pages/Proof/Payment/Pay_DN.js View File

@@ -26,7 +26,6 @@ const BackgroundHead = {
const Index = ({ record }) => { const Index = ({ record }) => {
const navigate = useNavigate() const navigate = useNavigate()
const intl = useIntl(); const intl = useIntl();
const { local } = intl;


return ( return (
( (
@@ -68,7 +67,7 @@ const Index = ({ record }) => {
id: 'proofPaymentBody_demandNote2' 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, email: record?.mail,
} }
) )
@@ -80,7 +79,7 @@ const Index = ({ record }) => {
id: 'proofPaymentBody_demandNote3' 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"})),
} }
) )
}} /> }} />


+ 1
- 1
src/pages/Proof/Payment/Pay_Office.js View File

@@ -92,7 +92,7 @@ const Index = ({ record }) => {
id: 'proofPaymentBody_office5' 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"})),
} }
) )
}} /> }} />


Loading…
Cancel
Save