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