diff --git a/src/pages/PublicNotice/Details_GLD/ApplicationDetailCard.js b/src/pages/PublicNotice/Details_GLD/ApplicationDetailCard.js
index 76da039..dfd0d10 100644
--- a/src/pages/PublicNotice/Details_GLD/ApplicationDetailCard.js
+++ b/src/pages/PublicNotice/Details_GLD/ApplicationDetailCard.js
@@ -100,19 +100,23 @@ const ApplicationDetailCard = (
setStatus("withdraw")
};
+ const doPublish =()=>()=>{
+ setStatus("published")
+ }
+
const onProofClick = () => {
if (applicationDetailData.data.groupNo) {
HttpUtils.get({
- url: UrlUtils.CHECK_CREATE_PROOF+"/"+currentApplicationDetailData.id,
- onSuccess:function(responeData){
- if(responeData.success == true){
+ url: UrlUtils.CHECK_CREATE_PROOF + "/" + currentApplicationDetailData.id,
+ onSuccess: function (responeData) {
+ if (responeData.success == true) {
window.open("/proof/create/" + currentApplicationDetailData.id, "_blank", "noreferrer");
window.addEventListener("focus", onFocus)
- }else{
+ } else {
let msg = responeData.msg;
- if(msg === "haveActiveProof"){
+ if (msg === "haveActiveProof") {
msg = "Action Failed: There is already a pending payment and proofreading record for client review."
- }else if(msg === "haveProofed"){
+ } else if (msg === "haveProofed") {
msg = "Action Failed: Already proofed."
}
setWarningText(msg);
@@ -120,8 +124,8 @@ const ApplicationDetailCard = (
}
}
});
-
- }else {
+
+ } else {
setWarningText("Please generate Gazette Code before Create Proof.");
setIsWarningPopUp(true);
}
@@ -199,33 +203,49 @@ const ApplicationDetailCard = (
Not accept
> :
- currentApplicationDetailData.status == "paid" ?
+ (currentApplicationDetailData.status == "confirmed" && currentApplicationDetailData.creditor == 1) ?
<>
-
- > : null
+ >
+ :
+ (currentApplicationDetailData.status == "paid" && currentApplicationDetailData.creditor == 0) ?
+ <>
+
+
+ > : null
}
@@ -267,7 +287,7 @@ const ApplicationDetailCard = (
-
+
@@ -329,7 +349,7 @@ const ApplicationDetailCard = (
-
+
@@ -351,7 +371,7 @@ const ApplicationDetailCard = (
WebkitTextFillColor: "#000000",
background: "#f8f8f8",
},
- mr:1
+ mr: 1
}}
inputProps={{
maxLength: 3,
@@ -414,7 +434,7 @@ const ApplicationDetailCard = (
-
+
@@ -436,7 +456,7 @@ const ApplicationDetailCard = (
WebkitTextFillColor: "#000000",
background: "#f8f8f8",
},
- mr:1,
+ mr: 1,
}}
inputProps={{
maxLength: 3,
diff --git a/src/pages/PublicNotice/Details_GLD/index.js b/src/pages/PublicNotice/Details_GLD/index.js
index a92c56e..e7a9bb3 100644
--- a/src/pages/PublicNotice/Details_GLD/index.js
+++ b/src/pages/PublicNotice/Details_GLD/index.js
@@ -32,7 +32,8 @@ import {
SET_PUBLIC_NOTICE_STATUS_COMPLATED,
SET_PUBLIC_NOTICE_STATUS_WITHDRAW,
SET_PUBLIC_NOTICE_STATUS_RESUBMIT,
- SET_PUBLIC_NOTICE_STATUS_REVIEWED
+ SET_PUBLIC_NOTICE_STATUS_REVIEWED,
+ SET_PUBLIC_NOTICE_STATUS_PUBLISH
} from "utils/ApiPathConst";
const StatusChangeDialog = Loadable(lazy(() => import('./StatusChangeDialog')));
import * as DateUtils from "utils/DateUtils";
@@ -182,6 +183,8 @@ const PublicNoticeDetail_GLD = () => {
onNotAcceptClick(getReason);
} else if (getStatus == "resubmit") {
onReSubmitClick();
+ } else if (getStatus == "published") {
+ onPublishClick();
}
}
}, [statusWindowAccepted]);
@@ -225,6 +228,19 @@ const PublicNoticeDetail_GLD = () => {
});
}
+ const onPublishClick = () => {
+ if (params.id <= 0) return;
+ HttpUtils.post({
+ url: `${SET_PUBLIC_NOTICE_STATUS_PUBLISH}/${params.id}`,
+ onSuccess: function () {
+ setOpen(false);
+ handleClose();
+ loadApplicationDetail()
+ notifySaveSuccess()
+ }
+ });
+ }
+
const onComplatedClick = () => {
if (params.id > 0) {
axios.get(`${SET_PUBLIC_NOTICE_STATUS_COMPLATED}/${params.id}`)
@@ -301,7 +317,7 @@ const PublicNoticeDetail_GLD = () => {
}, [getUploadStatus]);
return (
-
+
{
-
-
{/*
@@ -341,7 +357,7 @@ const PublicNoticeDetail_GLD = () => {
-
+
{isLoading && editMode ?
:
{
-
+
{
-
+
-
+
-
+
-
+