Bläddra i källkod

check issue when doing apply

master
Anna Ho 1 år sedan
förälder
incheckning
61386cb5dc
4 ändrade filer med 17 tillägg och 3 borttagningar
  1. +12
    -1
      src/pages/PublicNotice/ApplyForm/PublicNoticeApplyForm.js
  2. +3
    -2
      src/translations/en.json
  3. +1
    -0
      src/translations/zh-CN.json
  4. +1
    -0
      src/translations/zh-HK.json

+ 12
- 1
src/pages/PublicNotice/ApplyForm/PublicNoticeApplyForm.js Visa fil

@@ -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();
}
}
}}
>


+ 3
- 2
src/translations/en.json Visa fil

@@ -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",


+ 1
- 0
src/translations/zh-CN.json Visa fil

@@ -336,6 +336,7 @@
"requiredUploadFix": "请上载稿件修改的档案",
"upload": "上载",
"actionFail": "行动失败: 请检查内容并再次提交回覆",
"issueInvalidMsg": "行动失败: 无效宪报期数,请重新申请",

"transactionNo": "交易号码",
"transactionDate": "交易日期",


+ 1
- 0
src/translations/zh-HK.json Visa fil

@@ -341,6 +341,7 @@
"requiredUploadFix": "請上載稿件修改的檔案",
"upload": "上載",
"actionFail": "行動失敗: 請檢查內容並再次提交回覆",
"issueInvalidMsg": "行動失敗: 無效憲報期數,請重新申請",

"transactionNo": "交易號碼",
"transactionDate": "交易日期",


Laddar…
Avbryt
Spara