Browse Source

fix bug returnBeforeDate

master
Anna Ho 1 year ago
parent
commit
84ee9ae2d1
3 changed files with 2 additions and 4 deletions
  1. +1
    -1
      src/pages/Proof/Reply_GLD/ApplicationDetails.js
  2. +1
    -1
      src/pages/Proof/Reply_Public/ApplicationDetails.js
  3. +0
    -2
      src/pages/Proof/Reply_Public/ProofForm.js

+ 1
- 1
src/pages/Proof/Reply_GLD/ApplicationDetails.js View File

@@ -252,7 +252,7 @@ const ApplicationDetailCard = ({
<Typography variant="h5">Deadline for payment and reply:</Typography>
</Grid>
<Grid item xs={12} md={12} lg={12} sx={{ mb: 4, display: 'flex', alignItems: 'center' }}>
<Typography variant="h5">{DateUtils.dateStr(data.returnBeforeDate)} Before 2:00 PM</Typography>
<Typography variant="h5">Before {DateUtils.datetimeStr(data.returnBeforeDate)}</Typography>
</Grid>
<Grid item xs={12} md={3} lg={3}
sx={{ mb: 1, display: 'flex', alignItems: 'center' }}>


+ 1
- 1
src/pages/Proof/Reply_Public/ApplicationDetails.js View File

@@ -207,7 +207,7 @@ const ApplicationDetailCard = ({ formData, }) => {
<Typography variant="h5" display="inline"><Typography variant="h5" style={{color:'red'}} display="inline">繳費及</Typography>返稿最後限期:</Typography>
</Grid>
<Grid item xs={12} md={12} lg={12} sx={{ mb: 4, display: 'flex', alignItems: 'center' }}>
<Typography variant="h5">&emsp;{DateUtils.dateStr_Cht(data.returnBeforeDate)} 下午 2:00前</Typography>
<Typography variant="h5">&emsp;{DateUtils.datetimeStr_Cht(data.returnBeforeDate)} 前</Typography>
</Grid>
<Grid item xs={12} md={3} lg={3}
sx={{ mb: 1, display: 'flex', alignItems: 'center' }}>


+ 0
- 2
src/pages/Proof/Reply_Public/ProofForm.js View File

@@ -125,8 +125,6 @@ const FormPanel = ({ formData }) => {
const isOverTime = () => {
let returnBeforeDate = DateUtils.convertToDate(formik.values?.returnBeforeDate);
if (!returnBeforeDate) return true;
returnBeforeDate = returnBeforeDate.setHours(14, 0, 0, 0);

let current = new Date();
return current.getTime() > returnBeforeDate;
}


Loading…
Cancel
Save