| @@ -91,11 +91,11 @@ const FormPanel = ({ formData }) => { | |||||
| })); | })); | ||||
| formik.setFieldValue("noOfPages", responseData.data.total_no_of_page); | formik.setFieldValue("noOfPages", responseData.data.total_no_of_page); | ||||
| formik.setFieldValue("fee", (data.groupType == "Private Bill" ? 6552 * responseData.data.total_no_of_page : responseData.data.length * colValue)); | formik.setFieldValue("fee", (data.groupType == "Private Bill" ? 6552 * responseData.data.total_no_of_page : responseData.data.length * colValue)); | ||||
| if(data.groupType == "Private Bill" && responseData.data.file.length>0){ | |||||
| if (data.groupType == "Private Bill" && responseData.data.file.length > 0) { | |||||
| let attachmentList = attachments; | let attachmentList = attachments; | ||||
| for(let i=0; i<responseData.data.file.length; i++){ | |||||
| for (let i = 0; i < responseData.data.file.length; i++) { | |||||
| let file = responseData.data.file[i]; | let file = responseData.data.file[i]; | ||||
| attachmentList.find(item=> item.name == file.filename)["no_of_page"] = file.no_of_page; | |||||
| attachmentList.find(item => item.name == file.filename)["no_of_page"] = file.no_of_page; | |||||
| } | } | ||||
| setAttachments(attachmentList); | setAttachments(attachmentList); | ||||
| } | } | ||||
| @@ -129,7 +129,8 @@ const FormPanel = ({ formData }) => { | |||||
| length: values.length, | length: values.length, | ||||
| colCount: columnPrice.colCount, | colCount: columnPrice.colCount, | ||||
| noOfPages: values.noOfPages, | noOfPages: values.noOfPages, | ||||
| returnBeforeDate: DateUtils.convertToDate(values.beforeDate).getTime() | |||||
| reviseDeadline: DateUtils.convertToDate(values.reviseDeadline).getTime(), | |||||
| proofPaymentDeadline: DateUtils.convertToDate(values.proofPaymentDeadline).getTime() | |||||
| }, | }, | ||||
| files: attachments, | files: attachments, | ||||
| onSuccess: function (responeData) { | onSuccess: function (responeData) { | ||||
| @@ -196,15 +197,41 @@ const FormPanel = ({ formData }) => { | |||||
| <Grid item xs={12} md={12}> | <Grid item xs={12} md={12}> | ||||
| <Stack direction="row" sx={{ display: 'flex', alignItems: 'center' }}> | <Stack direction="row" sx={{ display: 'flex', alignItems: 'center' }}> | ||||
| <FormLabel sx={{ paddingRight: 2, textAlign: "center" }}> | <FormLabel sx={{ paddingRight: 2, textAlign: "center" }}> | ||||
| <Typography variant="h5">Return Before Date:</Typography> | |||||
| <Typography variant="h5">Return Revise Before:</Typography> | |||||
| </FormLabel> | </FormLabel> | ||||
| <TextField | <TextField | ||||
| fullWidth | fullWidth | ||||
| size="small" | size="small" | ||||
| type="datetime-local" | type="datetime-local" | ||||
| onChange={formik.handleChange} | onChange={formik.handleChange} | ||||
| name="beforeDate" | |||||
| value={formik.values["beforeDate"]} | |||||
| name="reviseDeadline" | |||||
| value={formik.values["reviseDeadline"]} | |||||
| variant="outlined" | |||||
| sx={ | |||||
| { | |||||
| "& .MuiInputBase-input.Mui-disabled": { | |||||
| WebkitTextFillColor: "#000000", | |||||
| background: "#f8f8f8", | |||||
| }, | |||||
| width: '30%' | |||||
| } | |||||
| } | |||||
| /> | |||||
| </Stack> | |||||
| </Grid> | |||||
| <Grid item xs={12} md={12}> | |||||
| <Stack direction="row" sx={{ display: 'flex', alignItems: 'center' }}> | |||||
| <FormLabel sx={{ paddingRight: 2, textAlign: "center" }}> | |||||
| <Typography variant="h5">Payment Before Date:</Typography> | |||||
| </FormLabel> | |||||
| <TextField | |||||
| fullWidth | |||||
| size="small" | |||||
| type="datetime-local" | |||||
| onChange={formik.handleChange} | |||||
| name="proofPaymentDeadline" | |||||
| value={formik.values["proofPaymentDeadline"]} | |||||
| variant="outlined" | variant="outlined" | ||||
| sx={ | sx={ | ||||
| { | { | ||||
| @@ -245,12 +272,12 @@ const FormPanel = ({ formData }) => { | |||||
| <Grid item xs={12} md={12}> | <Grid item xs={12} md={12}> | ||||
| <UploadFileTable | |||||
| key="uploadTable" | |||||
| recordList={attachments} | |||||
| setRecordList={setAttachments} | |||||
| showPageColumn = {formik.values.groupType == "Private Bill"} | |||||
| /> | |||||
| <UploadFileTable | |||||
| key="uploadTable" | |||||
| recordList={attachments} | |||||
| setRecordList={setAttachments} | |||||
| showPageColumn={formik.values.groupType == "Private Bill"} | |||||
| /> | |||||
| </Grid> | </Grid> | ||||
| { | { | ||||
| @@ -414,7 +441,7 @@ const FormPanel = ({ formData }) => { | |||||
| variant="contained" | variant="contained" | ||||
| color="success" | color="success" | ||||
| type="submit" | type="submit" | ||||
| disabled = {saving} | |||||
| disabled={saving} | |||||
| sx={{ | sx={{ | ||||
| textTransform: 'capitalize', | textTransform: 'capitalize', | ||||
| alignItems: 'end' | alignItems: 'end' | ||||
| @@ -59,7 +59,8 @@ const Index = () => { | |||||
| responseData.data["groupType"] = responseData.data.groupTitle; | responseData.data["groupType"] = responseData.data.groupTitle; | ||||
| responseData.data["beforeDate"] = DateUtils.datetimeFieldFormat(responseData.data.returnBeforeDate); | |||||
| responseData.data["reviseDeadline"] = DateUtils.datetimeFieldFormat(responseData.data.reviseDeadline); | |||||
| responseData.data["proofPaymentDeadline"] = DateUtils.datetimeFieldFormat(responseData.data.proofPaymentDeadline); | |||||
| setRecord(responseData.data); | setRecord(responseData.data); | ||||
| } | } | ||||
| }); | }); | ||||
| @@ -109,7 +109,7 @@ const Index = () => { | |||||
| <Typography variant="h4" sx={{ ml: 8, mt: 4, mr: 8, textAlign: "left" }}> | <Typography variant="h4" sx={{ ml: 8, mt: 4, mr: 8, textAlign: "left" }}> | ||||
| 我們已收到申請編號: {record?.appNo} 的稿件校對確定及可付印的指示。 | 我們已收到申請編號: {record?.appNo} 的稿件校對確定及可付印的指示。 | ||||
| <br /><br /> | <br /><br /> | ||||
| 請於 <span style={{ color: "red" }}>{DateUtils.dateStr_Cht(record?.returnBeforeDate)} 下午 2:00 前</span> 完成繳費,我們將於收到繳費確認後處理刊出事宜。 | |||||
| 請於 <span style={{ color: "red" }}>{DateUtils.datetimeStr(record?.proofPaymentDeadline)} 前</span> 完成繳費,我們將於收到繳費確認後處理刊出事宜。 | |||||
| <br /><br /> | <br /><br /> | ||||
| 如你在憲報期數 {record?.issueYear} 年 {record?.issueVolume} 卷, 第 {record?.issueNo} 期內有多於一個公共啟事的申請,你可選擇完成所有此期所有稿件校對確定後,於繳費期限前在「我的公共啟事」內合併付款。 | 如你在憲報期數 {record?.issueYear} 年 {record?.issueVolume} 卷, 第 {record?.issueNo} 期內有多於一個公共啟事的申請,你可選擇完成所有此期所有稿件校對確定後,於繳費期限前在「我的公共啟事」內合併付款。 | ||||
| </Typography> | </Typography> | ||||
| @@ -266,10 +266,17 @@ const ApplicationDetailCard = ({ | |||||
| <Grid container alignItems={"center"}> | <Grid container alignItems={"center"}> | ||||
| <Grid item xs={12} md={12} lg={12} | <Grid item xs={12} md={12} lg={12} | ||||
| sx={{ display: 'flex', alignItems: 'center' }}> | sx={{ display: 'flex', alignItems: 'center' }}> | ||||
| <Typography variant="h5">Deadline for payment and reply:</Typography> | |||||
| <Typography variant="h5">Deadline for payment:</Typography> | |||||
| </Grid> | </Grid> | ||||
| <Grid item xs={12} md={12} lg={12} sx={{ mb: 4, display: 'flex', alignItems: 'center' }}> | <Grid item xs={12} md={12} lg={12} sx={{ mb: 4, display: 'flex', alignItems: 'center' }}> | ||||
| <Typography variant="h5">Before {DateUtils.datetimeStr(data.returnBeforeDate)}</Typography> | |||||
| <Typography variant="h5">Before {DateUtils.datetimeStr(data.proofPaymentDeadline)}</Typography> | |||||
| </Grid> | |||||
| <Grid item xs={12} md={12} lg={12} | |||||
| sx={{ display: 'flex', alignItems: 'center' }}> | |||||
| <Typography variant="h5">Deadline for revise:</Typography> | |||||
| </Grid> | |||||
| <Grid item xs={12} md={12} lg={12} sx={{ mb: 4, display: 'flex', alignItems: 'center' }}> | |||||
| <Typography variant="h5">Before {DateUtils.datetimeStr(data.reviseDeadline)}</Typography> | |||||
| </Grid> | </Grid> | ||||
| <Grid item xs={12} md={3} lg={3} | <Grid item xs={12} md={3} lg={3} | ||||
| sx={{ mb: 1, display: 'flex', alignItems: 'center' }}> | sx={{ mb: 1, display: 'flex', alignItems: 'center' }}> | ||||
| @@ -76,10 +76,10 @@ const Index = () => { | |||||
| responseData.data["groupType"] = responseData.data.groupTitle; | responseData.data["groupType"] = responseData.data.groupTitle; | ||||
| responseData.data["action"] = responseData.data.replyDate ? responseData.data.action : true; | responseData.data["action"] = responseData.data.replyDate ? responseData.data.action : true; | ||||
| let returnBeforeDate = DateUtils.convertToDate(responseData.data.returnBeforeDate); | |||||
| let proofPaymentDeadline = DateUtils.convertToDate(responseData.data.proofPaymentDeadline); | |||||
| let current = new Date(); | let current = new Date(); | ||||
| setIsOverTime(current.getTime() > returnBeforeDate.getTime()); | |||||
| setShowCancelBtn(responseData.data.cancelled || responseData.data.replyDate || current.getTime() > returnBeforeDate.getTime()) | |||||
| setIsOverTime(current.getTime() > proofPaymentDeadline.getTime()); | |||||
| setShowCancelBtn(responseData.data.cancelled || responseData.data.replyDate || current.getTime() > proofPaymentDeadline.getTime()) | |||||
| @@ -240,12 +240,32 @@ const ApplicationDetailCard = ({ formData, }) => { | |||||
| <Grid item xs={12} md={12} lg={12} sx={{ mb: 4, display: 'flex', alignItems: 'center' }}> | <Grid item xs={12} md={12} lg={12} sx={{ mb: 4, display: 'flex', alignItems: 'center' }}> | ||||
| <Typography variant="h5">  | <Typography variant="h5">  | ||||
| {locale === 'en' ? | {locale === 'en' ? | ||||
| `${intl.formatMessage({id: 'before'})} ${DateUtils.datetimeStr(data.returnBeforeDate)} ` | |||||
| `${intl.formatMessage({id: 'before'})} ${DateUtils.datetimeStr(data.reviseDeadline)} ` | |||||
| : | : | ||||
| `${DateUtils.datetimeStr_Cht(data.returnBeforeDate)} ${intl.formatMessage({id: 'before'})}` | |||||
| `${DateUtils.datetimeStr_Cht(data.reviseDeadline)} ${intl.formatMessage({id: 'before'})}` | |||||
| } | } | ||||
| </Typography> | </Typography> | ||||
| </Grid> | </Grid> | ||||
| <Grid item xs={12} md={12} lg={12} | |||||
| sx={{ display: 'flex', alignItems: 'center' }}> | |||||
| <Typography variant="h5" display="inline"> | |||||
| <Typography variant="h5" style={{color:'red'}} display="inline"> | |||||
| <FormattedMessage id="payAnd" /> | |||||
| </Typography> | |||||
| <FormattedMessage id="paymentDeadline" />: | |||||
| </Typography> | |||||
| </Grid> | |||||
| <Grid item xs={12} md={12} lg={12} sx={{ mb: 4, display: 'flex', alignItems: 'center' }}> | |||||
| <Typography variant="h5">  | |||||
| {locale === 'en' ? | |||||
| `${intl.formatMessage({id: 'before'})} ${DateUtils.datetimeStr(data.proofPaymentDeadline)} ` | |||||
| : | |||||
| `${DateUtils.datetimeStr_Cht(data.proofPaymentDeadline)} ${intl.formatMessage({id: 'before'})}` | |||||
| } | |||||
| </Typography> | |||||
| </Grid> | |||||
| <Grid item xs={12} sm={3} md={3} lg={3} | <Grid item xs={12} sm={3} md={3} lg={3} | ||||
| sx={{ mb: 1, display: 'flex', alignItems: 'center' }}> | sx={{ mb: 1, display: 'flex', alignItems: 'center' }}> | ||||
| <Typography variant="pnspsFormParagraph"> | <Typography variant="pnspsFormParagraph"> | ||||
| @@ -131,10 +131,10 @@ const FormPanel = ({ formData }) => { | |||||
| } | } | ||||
| const isOverTime = () => { | const isOverTime = () => { | ||||
| let returnBeforeDate = DateUtils.convertToDate(formik.values?.returnBeforeDate); | |||||
| if (!returnBeforeDate) return true; | |||||
| let proofPaymentDeadline = DateUtils.convertToDate(formik.values?.proofPaymentDeadline); | |||||
| if (!proofPaymentDeadline) return true; | |||||
| let current = new Date(); | let current = new Date(); | ||||
| return current.getTime() > returnBeforeDate; | |||||
| return current.getTime() > proofPaymentDeadline; | |||||
| } | } | ||||
| @@ -105,15 +105,15 @@ export default function SearchPublicNoticeTable({ recordList }) { | |||||
| } | } | ||||
| }, | }, | ||||
| { | { | ||||
| id: 'returnBeforeDate', | |||||
| field: 'returnBeforeDate', | |||||
| id: 'proofPaymentDeadline', | |||||
| field: 'proofPaymentDeadline', | |||||
| headerName: intl.formatMessage({id: 'replyBefore'}), | headerName: intl.formatMessage({id: 'replyBefore'}), | ||||
| width: isMdOrLg ? 'auto' : 250, | width: isMdOrLg ? 'auto' : 250, | ||||
| flex: isMdOrLg ? 1.5 : undefined, | flex: isMdOrLg ? 1.5 : undefined, | ||||
| valueGetter: (params) => { | valueGetter: (params) => { | ||||
| let returnBeforeDate = DateUtils.convertToDate(params?.value); | |||||
| returnBeforeDate = returnBeforeDate.setHours(14, 0, 0, 0); | |||||
| return locale === 'en' ? DateUtils.datetimeStr(returnBeforeDate) : DateUtils.datetimeStr_Cht(returnBeforeDate); | |||||
| let proofPaymentDeadline = DateUtils.convertToDate(params?.value); | |||||
| proofPaymentDeadline = proofPaymentDeadline.setHours(14, 0, 0, 0); | |||||
| return locale === 'en' ? DateUtils.datetimeStr(proofPaymentDeadline) : DateUtils.datetimeStr_Cht(proofPaymentDeadline); | |||||
| } | } | ||||
| }, | }, | ||||
| { | { | ||||
| @@ -325,7 +325,8 @@ | |||||
| "applicationPublishDate": "Publish date", | "applicationPublishDate": "Publish date", | ||||
| "pleaseCheckReminder": "Please download the following printed manuscript file and proofread it carefully", | "pleaseCheckReminder": "Please download the following printed manuscript file and proofread it carefully", | ||||
| "payAnd": "Pay and ", | "payAnd": "Pay and ", | ||||
| "commentDeadline": "Deadline for submission of manuscripts", | |||||
| "commentDeadline": "Deadline for Revise", | |||||
| "paymentDeadline": "Deadline for Payment", | |||||
| "before": "Before", | "before": "Before", | ||||
| "page": "Page", | "page": "Page", | ||||
| "proofReplyDate": "Proof Reply Date", | "proofReplyDate": "Proof Reply Date", | ||||
| @@ -322,6 +322,7 @@ | |||||
| "pleaseCheckReminder": "请下载下列印刷稿档案,并仔细校对", | "pleaseCheckReminder": "请下载下列印刷稿档案,并仔细校对", | ||||
| "payAnd": "缴费及", | "payAnd": "缴费及", | ||||
| "commentDeadline": "返稿最后限期", | "commentDeadline": "返稿最后限期", | ||||
| "paymentDeadline": "付款最后限期", | |||||
| "before": "前", | "before": "前", | ||||
| "page": "页", | "page": "页", | ||||
| "proofReplyDate": "校对回覆日期", | "proofReplyDate": "校对回覆日期", | ||||
| @@ -327,6 +327,7 @@ | |||||
| "pleaseCheckReminder": "請下載下列印刷稿檔案,並仔細校對", | "pleaseCheckReminder": "請下載下列印刷稿檔案,並仔細校對", | ||||
| "payAnd": "繳費及", | "payAnd": "繳費及", | ||||
| "commentDeadline": "返稿最後限期", | "commentDeadline": "返稿最後限期", | ||||
| "paymentDeadline": "付款最後限期", | |||||
| "before": "前", | "before": "前", | ||||
| "page": "頁", | "page": "頁", | ||||
| "proofReplyDate": "校對回覆日期", | "proofReplyDate": "校對回覆日期", | ||||
| @@ -31,7 +31,7 @@ function getStatus(params) { | |||||
| // console.log(params) | // console.log(params) | ||||
| let replyDate = params.row?params.row.replyDate:params.replyDate; | let replyDate = params.row?params.row.replyDate:params.replyDate; | ||||
| let action = params.row?params.row.action:params.action; | let action = params.row?params.row.action:params.action; | ||||
| let returnBeforeDate = params.row?params.row.returnBeforeDate:params.returnBeforeDate; | |||||
| let proofPaymentDeadline = params.row?params.row.proofPaymentDeadline:params.proofPaymentDeadline; | |||||
| let isCancelled = params.row?params.row.cancelled:params.cancelled; | let isCancelled = params.row?params.row.cancelled:params.cancelled; | ||||
| if(isCancelled) return cancel; | if(isCancelled) return cancel; | ||||
| @@ -40,14 +40,14 @@ function getStatus(params) { | |||||
| if(replyDate){ | if(replyDate){ | ||||
| return action?confirm:unable; | return action?confirm:unable; | ||||
| }else{ | }else{ | ||||
| return isOverTime(returnBeforeDate)? timeOut: pendingReply; | |||||
| return isOverTime(proofPaymentDeadline)? timeOut: pendingReply; | |||||
| } | } | ||||
| } | } | ||||
| const isOverTime = (returnBeforeDate) => { | |||||
| if (!returnBeforeDate) return true; | |||||
| returnBeforeDate = DateUtils.convertToDate(returnBeforeDate); | |||||
| const isOverTime = (proofPaymentDeadline) => { | |||||
| if (!proofPaymentDeadline) return true; | |||||
| proofPaymentDeadline = DateUtils.convertToDate(proofPaymentDeadline); | |||||
| let current = new Date(); | let current = new Date(); | ||||
| return current.getTime() > returnBeforeDate.getTime(); | |||||
| return current.getTime() > proofPaymentDeadline.getTime(); | |||||
| } | } | ||||