diff --git a/src/pages/PublicNotice/ApplyForm/PublicNoticeApplyForm.js b/src/pages/PublicNotice/ApplyForm/PublicNoticeApplyForm.js index 5d5cd95..37fbd81 100644 --- a/src/pages/PublicNotice/ApplyForm/PublicNoticeApplyForm.js +++ b/src/pages/PublicNotice/ApplyForm/PublicNoticeApplyForm.js @@ -34,6 +34,7 @@ const PublicNoticeApplyForm = ({ loadedData, selections }) => { const intl = useIntl(); const [val, setVal] = React.useState({}); + const [reloadPage, setReloadPage] = React.useState(false); const [issueId, setIssueId] = React.useState(loadedData.issueId); const navigate = useNavigate(); @@ -121,7 +122,14 @@ const PublicNoticeApplyForm = ({ loadedData, selections }) => { remarks: values.remarks ? values.remarks : "", }, files: [attachment], - onSuccess: function () { + onSuccess: function (responData) { + if(responData.msg){ + setVal({}); + setReloadPage(true); + setWarningText(intl.formatMessage({id: responData.msg})); + setIsWarningPopUp(true); + return; + } notifyActionSuccess(intl.formatMessage({id: 'submissionSuccess'}) + '!') navigate("/publicNotice"); // location.reload(); @@ -345,6 +353,9 @@ const PublicNoticeApplyForm = ({ loadedData, selections }) => { setIsWarningPopUp(false); }else{ setIsWarningPopUp(false); + if(reloadPage){ + window.reload(); + } } }} > diff --git a/src/translations/en.json b/src/translations/en.json index 5c3a766..689a55a 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -325,8 +325,8 @@ "applicationPublishDate": "Publish date", "pleaseCheckReminder": "Please download the following printed manuscript file and proofread it carefully", "payAnd": "Pay and ", - "commentDeadline": "Deadline for Revise", - "paymentDeadline": "Deadline for Payment", + "commentDeadline": "Deadline of Proof with Revise", + "paymentDeadline": "Deadline of Confirm Proof and Payment", "before": "Before", "page": "Page", "proofReplyDate": "Proof Reply Date", @@ -340,6 +340,7 @@ "requiredUploadFix": "Please upload the modified file of the manuscript", "upload": "Upload", "actionFail": "Action failed: Please check the content and submit the reply again", + "issueInvalidMsg": "Action failed: The Gazette Issue invalid, please apply again", "transactionNo": "Transaction number", "transactionDate": "Transaction date", diff --git a/src/translations/zh-CN.json b/src/translations/zh-CN.json index 6c011ca..b0eeb96 100644 --- a/src/translations/zh-CN.json +++ b/src/translations/zh-CN.json @@ -336,6 +336,7 @@ "requiredUploadFix": "请上载稿件修改的档案", "upload": "上载", "actionFail": "行动失败: 请检查内容并再次提交回覆", + "issueInvalidMsg": "行动失败: 无效宪报期数,请重新申请", "transactionNo": "交易号码", "transactionDate": "交易日期", diff --git a/src/translations/zh-HK.json b/src/translations/zh-HK.json index d8b906b..2b2ee40 100644 --- a/src/translations/zh-HK.json +++ b/src/translations/zh-HK.json @@ -341,6 +341,7 @@ "requiredUploadFix": "請上載稿件修改的檔案", "upload": "上載", "actionFail": "行動失敗: 請檢查內容並再次提交回覆", + "issueInvalidMsg": "行動失敗: 無效憲報期數,請重新申請", "transactionNo": "交易號碼", "transactionDate": "交易日期",