Selaa lähdekoodia

re-submit add reason

master
Anna Ho 1 vuosi sitten
vanhempi
commit
a483b58e8d
2 muutettua tiedostoa jossa 31 lisäystä ja 16 poistoa
  1. +4
    -0
      src/pages/PublicNotice/Details_GLD/StatusChangeDialog.js
  2. +27
    -16
      src/pages/PublicNotice/Details_GLD/index.js

+ 4
- 0
src/pages/PublicNotice/Details_GLD/StatusChangeDialog.js Näytä tiedosto

@@ -42,6 +42,10 @@ const StatusChangeDialog = (props) => {
setDialogTitle("Not Accept Reason");
setPrositiveBtnText("Mark Not Accept");
return getNotAcceptedContent();
}if (props.getStatus == "resubmit") {
setDialogTitle("Re-Submit Reason");
setPrositiveBtnText("Mark Re-Submit");
return getNotAcceptedContent();
} else {
setDialogTitle("Action Confirm");
setPrositiveBtnText("Confirm");


+ 27
- 16
src/pages/PublicNotice/Details_GLD/index.js Näytä tiedosto

@@ -182,7 +182,7 @@ const PublicNoticeDetail_GLD = () => {
} else if (getStatus == "notAccepted") {
onNotAcceptClick(getReason);
} else if (getStatus == "resubmit") {
onReSubmitClick();
onReSubmitClick(getReason);
} else if (getStatus == "publish") {
onPublishClick();
}
@@ -278,22 +278,33 @@ const PublicNoticeDetail_GLD = () => {
}
};

const onReSubmitClick = () => {
const onReSubmitClick = (reason) => {
if (params.id > 0) {
axios.get(`${SET_PUBLIC_NOTICE_STATUS_RESUBMIT}/${params.id}`)
.then((response) => {
if (response.status === 204) {
setOpen(false);
handleClose();
// location.reload();
loadApplicationDetail()
notifySaveSuccess()
}
})
.catch(error => {
console.log(error);
return false;
});
HttpUtils.post({
url: `${SET_PUBLIC_NOTICE_STATUS_RESUBMIT}/${params.id}`,
params: reason,
onSuccess: function () {
setOpen(false);
handleClose();
// location.reload();
loadApplicationDetail()
notifySaveSuccess()
}
});
// axios.post(`${SET_PUBLIC_NOTICE_STATUS_RESUBMIT}/${params.id}`)
// .then((response) => {
// if (response.status === 204) {
// setOpen(false);
// handleClose();
// // location.reload();
// loadApplicationDetail()
// notifySaveSuccess()
// }
// })
// .catch(error => {
// console.log(error);
// return false;
// });
}
};



Ladataan…
Peruuta
Tallenna