| @@ -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 = ( | |||
| <Typography ml={1} variant="h5">Not accept</Typography> | |||
| </Button> | |||
| </> : | |||
| currentApplicationDetailData.status == "paid" ? | |||
| (currentApplicationDetailData.status == "confirmed" && currentApplicationDetailData.creditor == 1) ? | |||
| <> | |||
| <Button | |||
| // size="large" | |||
| variant="contained" | |||
| onClick={complatedClick()} | |||
| onClick={doPublish()} | |||
| sx={{ | |||
| textTransform: 'capitalize', | |||
| alignItems: 'end', | |||
| backgroundColor: '#52b202' | |||
| }}> | |||
| <DoneIcon /> | |||
| <Typography ml={1} variant="h5">Complete</Typography> | |||
| <Typography ml={1} variant="h5">Publish</Typography> | |||
| </Button> | |||
| <Button | |||
| // size="large" | |||
| variant="contained" | |||
| onClick={withdrawnClick()} | |||
| sx={{ | |||
| textTransform: 'capitalize', | |||
| alignItems: 'end', | |||
| backgroundColor: '#ffa733' | |||
| }}> | |||
| <CloseIcon /> | |||
| <Typography ml={1} variant="h5">Withdraw</Typography> | |||
| </Button> | |||
| </> : null | |||
| </> | |||
| : | |||
| (currentApplicationDetailData.status == "paid" && currentApplicationDetailData.creditor == 0) ? | |||
| <> | |||
| <Button | |||
| // size="large" | |||
| variant="contained" | |||
| onClick={complatedClick()} | |||
| sx={{ | |||
| textTransform: 'capitalize', | |||
| alignItems: 'end', | |||
| backgroundColor: '#52b202' | |||
| }}> | |||
| <DoneIcon /> | |||
| <Typography ml={1} variant="h5">Complete</Typography> | |||
| </Button> | |||
| <Button | |||
| // size="large" | |||
| variant="contained" | |||
| onClick={withdrawnClick()} | |||
| sx={{ | |||
| textTransform: 'capitalize', | |||
| alignItems: 'end', | |||
| backgroundColor: '#ffa733' | |||
| }}> | |||
| <CloseIcon /> | |||
| <Typography ml={1} variant="h5">Withdraw</Typography> | |||
| </Button> | |||
| </> : null | |||
| } | |||
| </Stack> | |||
| </Grid> | |||
| @@ -267,7 +287,7 @@ const ApplicationDetailCard = ( | |||
| </Grid> | |||
| </Grid> | |||
| </Grid> | |||
| <Grid item xs={12} sm={12} md={5.5} lg={5.5} sx={{ mb: 1, ml: {md:1, lg:3} }}> | |||
| <Grid item xs={12} sm={12} md={5.5} lg={5.5} sx={{ mb: 1, ml: { md: 1, lg: 3 } }}> | |||
| <Grid container alignItems={"center"}> | |||
| <Grid item xs={12} md={4} lg={4} | |||
| sx={{ display: 'flex', alignItems: 'center' }}> | |||
| @@ -329,7 +349,7 @@ const ApplicationDetailCard = ( | |||
| </Grid> | |||
| </Grid> | |||
| </Grid> | |||
| <Grid item xs={12} md={5.5} lg={5.5} sx={{ mb: 1, ml: {md:1, lg:3} }}> | |||
| <Grid item xs={12} md={5.5} lg={5.5} sx={{ mb: 1, ml: { md: 1, lg: 3 } }}> | |||
| <Grid container alignItems={"center"}> | |||
| <Grid item xs={12} md={4} lg={4} | |||
| sx={{ display: 'flex', alignItems: 'center' }}> | |||
| @@ -351,7 +371,7 @@ const ApplicationDetailCard = ( | |||
| WebkitTextFillColor: "#000000", | |||
| background: "#f8f8f8", | |||
| }, | |||
| mr:1 | |||
| mr: 1 | |||
| }} | |||
| inputProps={{ | |||
| maxLength: 3, | |||
| @@ -414,7 +434,7 @@ const ApplicationDetailCard = ( | |||
| </Grid> | |||
| </Grid> | |||
| </Grid> | |||
| <Grid item xs={12} md={5.5} lg={5.5} sx={{ mb: 1, ml: {md:1, lg:3} }}> | |||
| <Grid item xs={12} md={5.5} lg={5.5} sx={{ mb: 1, ml: { md: 1, lg: 3 } }}> | |||
| <Grid container alignItems={"center"}> | |||
| <Grid item xs={12} md={4} lg={4} | |||
| sx={{ display: 'flex', alignItems: 'center' }}> | |||
| @@ -436,7 +456,7 @@ const ApplicationDetailCard = ( | |||
| WebkitTextFillColor: "#000000", | |||
| background: "#f8f8f8", | |||
| }, | |||
| mr:1, | |||
| mr: 1, | |||
| }} | |||
| inputProps={{ | |||
| maxLength: 3, | |||
| @@ -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 ( | |||
| <Grid container sx={{ width:"100%", backgroundColor: 'backgroundColor.default' }} direction="column"> | |||
| <Grid container sx={{ width: "100%", backgroundColor: 'backgroundColor.default' }} direction="column"> | |||
| <StatusChangeDialog open={open} | |||
| handleClose={handleClose} | |||
| setReason={setReason} | |||
| @@ -324,12 +340,12 @@ const PublicNoticeDetail_GLD = () => { | |||
| </div> | |||
| </Grid> | |||
| <Grid item xs={12} sm={12} md={12} lg={12}> | |||
| <Stack direction="row"> | |||
| <Button title="Back" sx={{ml:3.5, mt:2.5}} style={{ border: '2px solid' }} variant="outlined" onClick={()=>{navigate("/application/search")}}> | |||
| <ForwardIcon style={{height: 30, width: 50, transform : "rotate(180deg)"}}/> | |||
| <Stack direction="row"> | |||
| <Button title="Back" sx={{ ml: 3.5, mt: 2.5 }} style={{ border: '2px solid' }} variant="outlined" onClick={() => { navigate("/application/search") }}> | |||
| <ForwardIcon style={{ height: 30, width: 50, transform: "rotate(180deg)" }} /> | |||
| </Button> | |||
| <Typography ml={4} mt={3} variant="h4">{title}</Typography> | |||
| </Stack> | |||
| </Stack> | |||
| </Grid> | |||
| {/* <Grid item xs={12} > | |||
| <Stack direction="row" height='20px' justifyContent="flex-start" alignItems="center"> | |||
| @@ -341,7 +357,7 @@ const PublicNoticeDetail_GLD = () => { | |||
| <Grid item xs={12} md={12} lg={9} xl={9}> | |||
| <Grid container direction="column"> | |||
| <Grid item xs={12} sm={12} md={12} lg={12} xl={12}> | |||
| <Box xs={12} sx={{ ml:2 , mt:3, mr:{xs:2, sm:2}, borderRadius: '10px', backgroundColor: '#ffffff' }}> | |||
| <Box xs={12} sx={{ ml: 2, mt: 3, mr: { xs: 2, sm: 2 }, borderRadius: '10px', backgroundColor: '#ffffff' }}> | |||
| {isLoading && editMode ? | |||
| <LoadingComponent /> : | |||
| <ApplicationDetailCard | |||
| @@ -358,7 +374,7 @@ const PublicNoticeDetail_GLD = () => { | |||
| </Box> | |||
| </Grid> | |||
| <Grid item xs={12} md={12} lg={12} xl={12}> | |||
| <Box xs={12} sx={{ml:2, mt:3, mr:{xs:2, sm:2}, borderRadius: '10px', backgroundColor: '#ffffff' }}> | |||
| <Box xs={12} sx={{ ml: 2, mt: 3, mr: { xs: 2, sm: 2 }, borderRadius: '10px', backgroundColor: '#ffffff' }}> | |||
| <GazetteDetailCard | |||
| // updateUserObject={updateUserObject} | |||
| applicationDetailData={applicationDetailData} | |||
| @@ -369,21 +385,21 @@ const PublicNoticeDetail_GLD = () => { | |||
| </Box> | |||
| </Grid> | |||
| <Grid item xs={12} md={12} lg={12} xl={12}> | |||
| <Box xs={12} sx={{ml:2, mt:3, mr:{sm:2}, borderRadius: '10px',width: {xs:'92vw', sm:'96.5vw', md:"auto"}, backgroundColor: '#ffffff' }}> | |||
| <Box xs={12} sx={{ ml: 2, mt: 3, mr: { sm: 2 }, borderRadius: '10px', width: { xs: '92vw', sm: '96.5vw', md: "auto" }, backgroundColor: '#ffffff' }}> | |||
| <TabTableDetail | |||
| applicationDetailData={applicationDetailData} | |||
| proofList={proofList} | |||
| paymentList={paymentList} | |||
| /> | |||
| </Box> | |||
| <br/> | |||
| <br /> | |||
| </Grid> | |||
| </Grid> | |||
| </Grid> | |||
| <Grid item xs={12} md={12} lg={3} xl={3} sx={{mt:{xs: -3, sm:-3}}}> | |||
| <Grid item xs={12} md={12} lg={3} xl={3} sx={{ mt: { xs: -3, sm: -3 } }}> | |||
| <Grid container> | |||
| <Grid item xs={12} md={12}> | |||
| <Box xs={12} md={12} height='800px' sx={{ ml:2, mt:3, mb:3, mr:{xs:2, sm:2}, borderRadius: '10px', backgroundColor: '#ffffff' }}> | |||
| <Box xs={12} md={12} height='800px' sx={{ ml: 2, mt: 3, mb: 3, mr: { xs: 2, sm: 2 }, borderRadius: '10px', backgroundColor: '#ffffff' }}> | |||
| <ClientDetailCard | |||
| // updateUserObject={updateUserObject} | |||
| applicationDetailData={applicationDetailData} | |||
| @@ -77,6 +77,7 @@ export const SET_PUBLIC_NOTICE_STATUS_COMPLATED = apiPath+'/application/applicat | |||
| export const SET_PUBLIC_NOTICE_STATUS_WITHDRAW = apiPath+'/application/application-detail-status-withdrawn'; | |||
| export const SET_PUBLIC_NOTICE_STATUS_RESUBMIT = apiPath+'/application/application-detail-status-resubmit'; | |||
| export const SET_PUBLIC_NOTICE_STATUS_REVIEWED = apiPath+'/application/application-detail-status-reviewed'; | |||
| export const SET_PUBLIC_NOTICE_STATUS_PUBLISH = apiPath+'/application/application-detail-status-publish'; | |||
| export const UPDATE_PUBLIC_NOTICE_APPLY_DETAIL = apiPath+'/application/save'; | |||
| export const GET_ISSUE_COMBO = apiPath+'/gazette-issue/combo'; | |||