@@ -39,8 +39,10 @@ import DownloadIcon from '@mui/icons-material/Download'; | |||
const ApplicationDetailCard = ( | |||
{ applicationDetailData, | |||
setStatus, | |||
// isCollectData, | |||
// updateUserObject, | |||
setReload, | |||
isEditMode, | |||
setUpdateApplicationObject, | |||
setiIsSave, | |||
// isNewRecord | |||
} | |||
) => { | |||
@@ -53,8 +55,24 @@ const ApplicationDetailCard = ( | |||
// const navigate = useNavigate() | |||
// const params = useParams(); | |||
const [editMode, setEditMode] = useState(false); | |||
const onEditClick = () => () => { | |||
setEditMode(true); | |||
isEditMode(true); | |||
}; | |||
const onSaveClick = () => () => { | |||
//upload latest data to parent | |||
const values = getValues(); | |||
const objectData ={ | |||
...values, | |||
} | |||
setUpdateApplicationObject({objectData}); | |||
setiIsSave(true) | |||
}; | |||
const {register, | |||
// getValues | |||
getValues | |||
} = useForm() | |||
useEffect(() => { | |||
@@ -84,8 +102,13 @@ const ApplicationDetailCard = ( | |||
}); | |||
}; | |||
const reloadHandle = () => () => { | |||
setReload(true) | |||
setEditMode(false) | |||
}; | |||
const acceptedClick = () => () =>{ | |||
setStatus("accepted") | |||
setStatus("accept") | |||
}; | |||
const rejectedClick = () => () =>{ | |||
@@ -108,7 +131,7 @@ const ApplicationDetailCard = ( | |||
border={false} | |||
content={false} | |||
> | |||
{verified? | |||
{verified && currentApplicationDetailData.status != "rejected"? | |||
<Grid container spacing={4} direction="row"> | |||
<Grid item xs={12} md={4} > | |||
<Stack | |||
@@ -118,17 +141,49 @@ const ApplicationDetailCard = ( | |||
spacing={2} | |||
mb={2} | |||
> | |||
<Button | |||
// size="large" | |||
variant="contained" | |||
// onClick={handleNewUserClick} | |||
sx={{ | |||
textTransform: 'capitalize', | |||
alignItems: 'end', | |||
}}> | |||
<BorderColorOutlinedIcon/> | |||
<Typography ml={1}> Edit</Typography> | |||
</Button> | |||
{editMode? | |||
<> | |||
<Button | |||
size="large" | |||
variant="contained" | |||
onClick={reloadHandle()} | |||
sx={{ | |||
textTransform: 'capitalize', | |||
alignItems: 'end' | |||
}} | |||
> | |||
Reset & Back | |||
</Button> | |||
<Button | |||
size="large" | |||
variant="contained" | |||
onClick={onSaveClick()} | |||
color="success" | |||
sx={{ | |||
textTransform: 'capitalize', | |||
alignItems: 'end' | |||
}} | |||
> | |||
Save | |||
</Button> | |||
</>: | |||
<> | |||
<Grid item sx={{ml: 3, mr: 3}}> | |||
<Button | |||
// size="large" | |||
variant="contained" | |||
onClick={onEditClick()} | |||
sx={{ | |||
textTransform: 'capitalize', | |||
alignItems: 'end', | |||
}}> | |||
<BorderColorOutlinedIcon/> | |||
<Typography ml={1}> Edit</Typography> | |||
</Button> | |||
</Grid> | |||
</> | |||
} | |||
{currentApplicationDetailData.status =="accepted"? | |||
<Button | |||
// size="large" | |||
@@ -228,7 +283,7 @@ const ApplicationDetailCard = ( | |||
</Grid> | |||
<Grid item xs={12} md={9} lg={9}> | |||
<FormControl variant="outlined" fullWidth > | |||
<FormControl variant="outlined" fullWidth disabled > | |||
<OutlinedInput | |||
fullWidth | |||
size="small" | |||
@@ -267,7 +322,7 @@ const ApplicationDetailCard = ( | |||
</Grid> | |||
<Grid item xs={12} md={9} lg={9}> | |||
<FormControl variant="outlined" fullWidth > | |||
<FormControl variant="outlined" fullWidth disabled > | |||
{ currentApplicationDetailData.orgId===null? | |||
<OutlinedInput | |||
fullWidth | |||
@@ -301,20 +356,20 @@ const ApplicationDetailCard = ( | |||
<Grid item xs={12} md={8} lg={8}> | |||
<Stack direction="row"> | |||
<FormControl variant="outlined" sx={{width:'25%'}}> | |||
<FormControl variant="outlined" sx={{width:'25%'}} disabled={!editMode} > | |||
<OutlinedInput | |||
size="small" | |||
{...register("countryCode", | |||
{...register("contactTelNo.countryCode", | |||
{ | |||
value: currentApplicationDetailData.contactTelNo.countryCode, | |||
})} | |||
id='countryCode' | |||
/> | |||
</FormControl> | |||
<FormControl variant="outlined" sx={{width:'100%'}}> | |||
<FormControl variant="outlined" sx={{width:'100%'}} disabled={!editMode} > | |||
<OutlinedInput | |||
size="small" | |||
{...register("phoneNumber", | |||
{...register("contactTelNo.phoneNumber", | |||
{ | |||
value: currentApplicationDetailData.contactTelNo.phoneNumber, | |||
})} | |||
@@ -336,7 +391,7 @@ const ApplicationDetailCard = ( | |||
</Grid> | |||
<Grid item xs={12} md={9} lg={9}> | |||
<FormControl variant="outlined" fullWidth > | |||
<FormControl variant="outlined" fullWidth disabled={!editMode}> | |||
<OutlinedInput | |||
fullWidth | |||
size="small" | |||
@@ -359,20 +414,20 @@ const ApplicationDetailCard = ( | |||
<Grid item xs={12} md={8} lg={8}> | |||
<Stack direction="row"> | |||
<FormControl variant="outlined" sx={{width:'25%'}}> | |||
<FormControl variant="outlined" sx={{width:'25%'}} disabled={!editMode}> | |||
<OutlinedInput | |||
size="small" | |||
{...register("countryCode", | |||
{...register("contactFaxNo.countryCode", | |||
{ | |||
value: currentApplicationDetailData.contactFaxNo.countryCode, | |||
})} | |||
id='countryCode' | |||
/> | |||
</FormControl> | |||
<FormControl variant="outlined" sx={{width:'100%'}}> | |||
<FormControl variant="outlined" sx={{width:'100%'}} disabled={!editMode}> | |||
<OutlinedInput | |||
size="small" | |||
{...register("faxNumber", | |||
{...register("contactFaxNo.faxNumber", | |||
{ | |||
value: currentApplicationDetailData.contactFaxNo.faxNumber, | |||
})} | |||
@@ -137,7 +137,7 @@ const ClientDetailCard = ( | |||
<FormLabel>Client Type:</FormLabel> | |||
</Grid> | |||
<Grid item xs={12} md={12} lg={12} mb={1} sx={{width:'100%'}} > | |||
<FormControl variant="outlined" sx={{width:'100%'}} > | |||
<FormControl variant="outlined" sx={{width:'100%'}} disabled> | |||
<OutlinedInput | |||
size="small" | |||
{...register("type", | |||
@@ -158,7 +158,7 @@ const ClientDetailCard = ( | |||
<FormLabel>Company Name (English):</FormLabel> | |||
</Grid> | |||
<Grid item xs={12} md={12} lg={12} mb={1} sx={{width:'100%'}} > | |||
<FormControl variant="outlined" sx={{width:'100%'}} > | |||
<FormControl variant="outlined" sx={{width:'100%'}} disabled > | |||
<OutlinedInput | |||
size="small" | |||
{...register("enCompanyName", | |||
@@ -177,7 +177,7 @@ const ClientDetailCard = ( | |||
<FormLabel>Company Name (Chinese):</FormLabel> | |||
</Grid> | |||
<Grid item xs={12} md={12} lg={12} mb={1} sx={{width:'100%'}} > | |||
<FormControl variant="outlined" sx={{width:'100%'}} > | |||
<FormControl variant="outlined" sx={{width:'100%'}} disabled > | |||
<OutlinedInput | |||
size="small" | |||
{...register("chCompanyName", | |||
@@ -196,7 +196,7 @@ const ClientDetailCard = ( | |||
<FormLabel>English Name:</FormLabel> | |||
</Grid> | |||
<Grid item xs={12} md={12} lg={12} mb={1} sx={{width:'100%'}} > | |||
<FormControl variant="outlined" sx={{width:'100%'}} > | |||
<FormControl variant="outlined" sx={{width:'100%'}} disabled > | |||
<OutlinedInput | |||
size="small" | |||
{...register("contactPerson", | |||
@@ -216,7 +216,7 @@ const ClientDetailCard = ( | |||
</Grid> | |||
<Grid item xs={12} md={12} lg={12} mb={1} > | |||
<Stack direction="row"> | |||
<FormControl variant="outlined" sx={{width:'40%'}}> | |||
<FormControl variant="outlined" sx={{width:'40%'}} disabled> | |||
<OutlinedInput | |||
size="small" | |||
{...register("countryCode", | |||
@@ -226,7 +226,7 @@ const ClientDetailCard = ( | |||
id='countryCode' | |||
/> | |||
</FormControl> | |||
<FormControl variant="outlined" sx={{width:'100%'}}> | |||
<FormControl variant="outlined" sx={{width:'100%'}} disabled> | |||
<OutlinedInput | |||
size="small" | |||
{...register("phoneNumber", | |||
@@ -246,7 +246,7 @@ const ClientDetailCard = ( | |||
<FormLabel>Email:</FormLabel> | |||
</Grid> | |||
<Grid item xs={12} md={12} lg={12} mb={1} sx={{width:'100%'}} > | |||
<FormControl variant="outlined" sx={{width:'100%'}} > | |||
<FormControl variant="outlined" sx={{width:'100%'}} disabled > | |||
<OutlinedInput | |||
size="small" | |||
{...register("emailBus", | |||
@@ -267,7 +267,7 @@ const ClientDetailCard = ( | |||
<FormLabel>English Name:</FormLabel> | |||
</Grid> | |||
<Grid item xs={12} md={12} lg={12} mb={1} sx={{width:'100%'}} > | |||
<FormControl variant="outlined" sx={{width:'100%'}} > | |||
<FormControl variant="outlined" sx={{width:'100%'}} disabled > | |||
<OutlinedInput | |||
size="small" | |||
{...register("enName", | |||
@@ -286,7 +286,7 @@ const ClientDetailCard = ( | |||
<FormLabel>Chinese Name:</FormLabel> | |||
</Grid> | |||
<Grid item xs={12} md={12} lg={12} mb={1} sx={{width:'100%'}} > | |||
<FormControl variant="outlined" sx={{width:'100%'}} > | |||
<FormControl variant="outlined" sx={{width:'100%'}} disabled > | |||
<OutlinedInput | |||
size="small" | |||
{...register("chName", | |||
@@ -306,7 +306,7 @@ const ClientDetailCard = ( | |||
</Grid> | |||
<Grid item xs={12} md={12} lg={12} mb={1} sx={{width:'100%'}} > | |||
<Stack direction="row"> | |||
<FormControl variant="outlined" sx={{width:'40%'}}> | |||
<FormControl variant="outlined" sx={{width:'40%'}} disabled> | |||
<OutlinedInput | |||
size="small" | |||
{...register("countryCode", | |||
@@ -316,7 +316,7 @@ const ClientDetailCard = ( | |||
id='countryCode' | |||
/> | |||
</FormControl> | |||
<FormControl variant="outlined" sx={{width:'100%'}}> | |||
<FormControl variant="outlined" sx={{width:'100%'}} disabled> | |||
<OutlinedInput | |||
size="small" | |||
{...register("phoneNumber", | |||
@@ -336,7 +336,7 @@ const ClientDetailCard = ( | |||
<FormLabel>Email:</FormLabel> | |||
</Grid> | |||
<Grid item xs={12} md={12} lg={12} mb={1} sx={{width:'100%'}} > | |||
<FormControl variant="outlined" sx={{width:'100%'}} > | |||
<FormControl variant="outlined" sx={{width:'100%'}} disabled > | |||
<OutlinedInput | |||
size="small" | |||
{...register("emailAddress", | |||
@@ -95,7 +95,7 @@ const GazetteDetailCard = ( | |||
</Grid> | |||
<Grid item xs={12} md={9} lg={9}> | |||
<FormControl variant="outlined" fullWidth > | |||
<FormControl variant="outlined" fullWidth disabled > | |||
<OutlinedInput | |||
fullWidth | |||
size="small" | |||
@@ -117,7 +117,7 @@ const GazetteDetailCard = ( | |||
</Grid> | |||
<Grid item xs={12} md={9} lg={9}> | |||
<FormControl variant="outlined" fullWidth > | |||
<FormControl variant="outlined" fullWidth disabled > | |||
<OutlinedInput | |||
fullWidth | |||
size="small" | |||
@@ -142,7 +142,7 @@ const GazetteDetailCard = ( | |||
</Grid> | |||
<Grid item xs={12} md={9} lg={9}> | |||
<FormControl variant="outlined" fullWidth > | |||
<FormControl variant="outlined" fullWidth disabled > | |||
<OutlinedInput | |||
fullWidth | |||
size="small" | |||
@@ -158,13 +158,13 @@ const GazetteDetailCard = ( | |||
</Grid> | |||
<Grid item xs={12} md={5} lg={5} sx={{mb: 1, ml:1}}> | |||
<Grid container alignItems={"center"}> | |||
<Grid item xs={12} md={4} lg={4} | |||
<Grid item xs={12} md={3} lg={3} | |||
sx={{display: 'flex', alignItems: 'center'}}> | |||
<FormLabel>Group Title:</FormLabel> | |||
</Grid> | |||
<Grid item xs={12} md={8} lg={8}> | |||
<FormControl variant="outlined" fullWidth > | |||
<Grid item xs={12} md={9} lg={9}> | |||
<FormControl variant="outlined" fullWidth disabled > | |||
<OutlinedInput | |||
fullWidth | |||
size="small" | |||
@@ -1,6 +1,6 @@ | |||
import { | |||
useEffect, | |||
// useState | |||
useState | |||
} from "react"; | |||
// material-ui | |||
@@ -25,19 +25,20 @@ import * as yup from 'yup'; | |||
const StatusChangeDialog = (props) => { | |||
// const [selectedGazetteGroup, setSelectedGazetteGroup] = useState({}); | |||
const [status, setStatus] = useState(""); | |||
// const [selectedGazetteGroupInputType, setSelectedGazetteGroupInputType] = useState(""); | |||
const groupTitleComboList = ComboData.groupTitle; | |||
useEffect(() => { | |||
if(props.getStatus == "accepted"){ | |||
onAcceptedClick() | |||
console.log(Object.keys(!props.selectedGazetteGroup).length) | |||
if(props.getStatus == "accept"){ | |||
setStatus("Accept") | |||
}else if (props.getStatus == "reject"){ | |||
onRejectedClick() | |||
setStatus("Reject") | |||
}else if (props.getStatus == "complete"){ | |||
onComplatedClick() | |||
setStatus("Complete") | |||
}else if (props.getStatus == "withdraw"){ | |||
onWithdrawnClick() | |||
setStatus("Withdraw") | |||
} | |||
}, [props.getStatus]); | |||
@@ -47,12 +48,12 @@ const StatusChangeDialog = (props) => { | |||
}; | |||
const formik = useFormik({ | |||
initialValues:({ | |||
username:'', | |||
}), | |||
validationSchema:yup.object().shape({ | |||
}), | |||
const formik = useFormik({ | |||
initialValues:({ | |||
username:'', | |||
}), | |||
validationSchema:yup.object().shape({ | |||
}), | |||
}); | |||
// const handleReset = () => { | |||
@@ -72,7 +73,7 @@ const StatusChangeDialog = (props) => { | |||
<Grid item> | |||
<Stack direction="row" height='70px' justifyContent="flex-start" alignItems="center"> | |||
<Typography variant="h4"> | |||
Accept Application | |||
{status} Application | |||
</Typography> | |||
</Stack> | |||
</Grid> | |||
@@ -82,6 +83,7 @@ const StatusChangeDialog = (props) => { | |||
<form> | |||
<DialogContent> | |||
<DialogContentText> | |||
{props.getStatus == "accept"? | |||
<Grid container direction="row" justifyContent="center" alignItems="center"> | |||
<Grid item xs={12} md={8} lg={8} sx={{mb: 1,}}> | |||
<Grid container alignItems={"center"}> | |||
@@ -113,7 +115,7 @@ const StatusChangeDialog = (props) => { | |||
if (newValue!=null && newValue != {}){ | |||
props.setSelectedGazetteGroupInputType(newValue.label); | |||
props.setSelectedGazetteGroup(newValue); | |||
formik.setFieldValue("checkDigit","") | |||
formik.setFieldValue("gazetteGroup","") | |||
}else{ | |||
props.setSelectedGazetteGroupInputType(""); | |||
} | |||
@@ -124,19 +126,27 @@ const StatusChangeDialog = (props) => { | |||
</Grid> | |||
</Grid> | |||
</Grid> | |||
</Grid> | |||
</Grid>: | |||
<Grid container direction="row" justifyContent="center" alignItems="center"> | |||
<Grid item xs={12} md={5} lg={5} sx={{mb: 5,}}> | |||
<FormLabel sx={{fontSize: "20px", color:"#000000",textAlign:"center"}}> | |||
Are you really {status} the Application? | |||
</FormLabel> | |||
</Grid> | |||
</Grid> | |||
} | |||
</DialogContentText> | |||
</DialogContent> | |||
</form> | |||
</FormikProvider> | |||
<Stack direction="row" justifyContent="space-around"> | |||
<DialogActions> | |||
<Button variant="contained" color="success" onClick={acceptedHandle()} autoFocus> | |||
Accept | |||
<Button variant="contained" color="success" onClick={acceptedHandle()} autoFocus disabled={Object.keys(props.selectedGazetteGroup).length === 0}> | |||
{status} | |||
</Button> | |||
</DialogActions> | |||
<DialogActions> | |||
<Button variant="contained" onClick={props.handleClose} autoFocus> | |||
<Button variant="contained" onClick={props.handleClose} autoFocus > | |||
Cancel | |||
</Button> | |||
</DialogActions> | |||
@@ -25,7 +25,11 @@ const ClientDetailCard = Loadable(lazy(() => import('./ClientDetailCard'))); | |||
const TabTableDetail = Loadable(lazy(() => import('./tabTableDetail/TabTable'))); | |||
import { | |||
GET_PUBLIC_NOTICE_APPLY_DETAIL, | |||
SET_PUBLIC_NOTICE_STATUS_ACCEPTED | |||
UPDATE_PUBLIC_NOTICE_APPLY_DETAIL, | |||
SET_PUBLIC_NOTICE_STATUS_ACCEPTED, | |||
SET_PUBLIC_NOTICE_STATUS_REJRCTED, | |||
SET_PUBLIC_NOTICE_STATUS_COMPLATED, | |||
SET_PUBLIC_NOTICE_STATUS_WITHDRAW | |||
} from "utils/ApiPathConst"; | |||
const StatusChangeDialog = Loadable(lazy(() => import('./StatusChangeDialog'))); | |||
import * as DateUtils from "utils/DateUtils"; | |||
@@ -38,18 +42,31 @@ const PublicNoticeDetail_GLD = () => { | |||
// const navigate = useNavigate() | |||
const [applicationDetailData, setApplicationDetailData] = useState({}); | |||
// const [refApplicationDetailData, setRefApplicationDetailData] = React.useState({}); | |||
const [reload, setReload] = useState(false); | |||
const [isLoading,setLoading] = useState(false); | |||
const LoadingComponent = Loadable(lazy(() => import('../extra-pages/LoadingComponent'))); | |||
//pageTitle | |||
const [appNo, setAapNo] = useState(""); | |||
const [gazetteIssue, setGazetteIssue] = useState(""); | |||
const [issueDate,setIssueDate] = useState(""); | |||
const [issueNum,setIssueNum] = useState(""); | |||
const [groupNo, setGroupNo] = useState(""); | |||
const [groupTitle, setGroupTitle] = useState(""); | |||
// const [groupTitle, setGroupTitle] = useState(""); | |||
//statusWindow | |||
const [open, setOpen] = useState(false); | |||
const [getStatus, setStatus] = useState(""); | |||
const [statusWindowAccepted, setStatusWindowAccepted] = useState(false); | |||
const [selectedGazetteGroup, setSelectedGazetteGroup] = useState({}); | |||
const [selectedGazetteGroupInputType, setSelectedGazetteGroupInputType] = useState(""); | |||
//editMode | |||
const [updateApplicationObject, setUpdateApplicationObject] = useState({}); | |||
const [editMode, isEditMode] = useState(false); | |||
const [isSave, setiIsSave] = useState(false); | |||
const BackgroundHead = { | |||
backgroundImage: `url(${titleBackgroundImg})`, | |||
width: '100%', | |||
@@ -57,14 +74,26 @@ const PublicNoticeDetail_GLD = () => { | |||
backgroundSize:'cover' | |||
} | |||
const title = groupNo!=""?("Application / "+appNo+", "+gazetteIssue+", "+groupNo+" , "+groupTitle):("Application / "+appNo+", "+gazetteIssue) | |||
const title = groupNo!=null?("Application / "+appNo+", "+gazetteIssue+", "+issueNum+" , "+groupNo):("Application / "+appNo+", "+gazetteIssue+", "+issueNum) | |||
useEffect(() => { | |||
loadApplicationDetail() | |||
loadApplicationDetail() | |||
}, []); | |||
useEffect(() => { | |||
if (reload){ | |||
loadApplicationDetail() | |||
} | |||
}, [reload]); | |||
useEffect(() => { | |||
if(editMode&&isSave){ | |||
onUpdateClick(updateApplicationObject) | |||
} | |||
}, [updateApplicationObject]); | |||
const loadApplicationDetail = () => { | |||
if(params.id > 0 ){ | |||
if(params.id > 0){ | |||
axios.get(`${GET_PUBLIC_NOTICE_APPLY_DETAIL}/${params.id}`) | |||
.then((response) => { | |||
if (response.status === 200) { | |||
@@ -74,10 +103,8 @@ const PublicNoticeDetail_GLD = () => { | |||
setGazetteIssue(gazetteIssueDetail.year +" Vol "+gazetteIssueDetail.volume); | |||
setIssueNum(" No. "+gazetteIssueDetail.issueNo); | |||
setIssueDate(DateUtils.dateFormat(gazetteIssueDetail.issueDate, "D MMM YYYY (ddd)")); | |||
if (gazetteIssueDetail.data!==null&&gazetteIssueDetail.data!==undefined){ | |||
setGroupNo("No. "+gazetteIssueDetail.data.groupNo); | |||
setGroupTitle("No. "+gazetteIssueDetail.data.groupTitle); | |||
} | |||
setGroupNo(response.data.data.groupNo); | |||
setLoading(false); | |||
} | |||
}) | |||
.catch(error => { | |||
@@ -87,6 +114,29 @@ const PublicNoticeDetail_GLD = () => { | |||
} | |||
} | |||
const onUpdateClick = (updateApplicationObject) => { | |||
const data = updateApplicationObject.objectData | |||
if(params.id > 0 ){ | |||
setLoading(true); | |||
axios.post(`${UPDATE_PUBLIC_NOTICE_APPLY_DETAIL}/${params.id}`, | |||
{ | |||
contactPerson:data.contactPerson, | |||
contactFaxNo:data.contactFaxNo, | |||
contactTelNo:data.contactTelNo, | |||
} | |||
) | |||
.then((response) => { | |||
if (response.status === 200) { | |||
loadApplicationDetail() | |||
} | |||
}) | |||
.catch(error => { | |||
console.log(error); | |||
return false; | |||
}); | |||
} | |||
}; | |||
useEffect(() => { | |||
// console.log(getStatus) | |||
if(getStatus!==""){ | |||
@@ -108,8 +158,7 @@ const PublicNoticeDetail_GLD = () => { | |||
useEffect(() => { | |||
if(statusWindowAccepted){ | |||
console.log(selectedGazetteGroup) | |||
if(getStatus == "accepted"){ | |||
if(getStatus == "accept"){ | |||
onAcceptedClick() | |||
}else if (getStatus== "reject"){ | |||
onRejectedClick() | |||
@@ -123,7 +172,12 @@ const PublicNoticeDetail_GLD = () => { | |||
const onAcceptedClick = () => { | |||
if(params.id > 0 ){ | |||
axios.get(`${SET_PUBLIC_NOTICE_STATUS_ACCEPTED}/${params.id}`) | |||
axios.post(`${SET_PUBLIC_NOTICE_STATUS_ACCEPTED}/${params.id}`, | |||
{ | |||
"groupTitle": selectedGazetteGroup.title, | |||
"groupNo": selectedGazetteGroup.type, | |||
} | |||
) | |||
.then((response) => { | |||
if (response.status === 204) { | |||
setOpen(false); | |||
@@ -138,7 +192,7 @@ const PublicNoticeDetail_GLD = () => { | |||
} | |||
}; | |||
const onRejectedClick = () => () => { | |||
const onRejectedClick = () => { | |||
if(params.id > 0 ){ | |||
axios.get(`${SET_PUBLIC_NOTICE_STATUS_REJRCTED}/${params.id}`) | |||
.then((response) => { | |||
@@ -155,7 +209,7 @@ const PublicNoticeDetail_GLD = () => { | |||
} | |||
}; | |||
const onComplatedClick = () => () => { | |||
const onComplatedClick = () => { | |||
if(params.id > 0 ){ | |||
axios.get(`${SET_PUBLIC_NOTICE_STATUS_COMPLATED}/${params.id}`) | |||
.then((response) => { | |||
@@ -172,7 +226,7 @@ const PublicNoticeDetail_GLD = () => { | |||
} | |||
}; | |||
const onWithdrawnClick = () => () => { | |||
const onWithdrawnClick = () => { | |||
if(params.id > 0 ){ | |||
axios.get(`${SET_PUBLIC_NOTICE_STATUS_WITHDRAW}/${params.id}`) | |||
.then((response) => { | |||
@@ -192,7 +246,7 @@ const PublicNoticeDetail_GLD = () => { | |||
return ( | |||
<Grid container sx={{maxnHeight: '500vh',backgroundColor:'#ffffff'}} direction="column"> | |||
<StatusChangeDialog open={open} handleClose={handleClose} setStatusWindowAccepted={setStatusWindowAccepted} | |||
issueDate={issueDate} issueNum={issueNum} gazetteIssue={gazetteIssue} | |||
getStatus={getStatus} issueDate={issueDate} issueNum={issueNum} gazetteIssue={gazetteIssue} | |||
selectedGazetteGroup={selectedGazetteGroup} setSelectedGazetteGroup={setSelectedGazetteGroup} | |||
selectedGazetteGroupInputType={selectedGazetteGroupInputType} setSelectedGazetteGroupInputType={setSelectedGazetteGroupInputType} | |||
/> | |||
@@ -214,13 +268,18 @@ const PublicNoticeDetail_GLD = () => { | |||
<Grid container direction="column"> | |||
<Grid item xs={12} md={10}> | |||
<Box xs={12} ml={4} mt={3} sx={{ p: 2, border: '3px groove grey', borderRadius: '10px'}}> | |||
<ApplicationDetailCard | |||
// updateUserObject={updateUserObject} | |||
{isLoading&&editMode? | |||
<LoadingComponent/>: | |||
<ApplicationDetailCard | |||
applicationDetailData={applicationDetailData} | |||
setStatus = {setStatus} | |||
// isCollectData={isCollectData} | |||
setReload = {setReload} | |||
setUpdateApplicationObject={setUpdateApplicationObject} | |||
isEditMode = {isEditMode} | |||
setiIsSave={setiIsSave} | |||
// isNewRecord={isNewRecord} | |||
/> | |||
/> | |||
} | |||
</Box> | |||
</Grid> | |||
<Grid item xs={12} md={10}> | |||
@@ -63,6 +63,7 @@ export const SET_PUBLIC_NOTICE_STATUS_REJRCTED = apiPath+'/application/applicati | |||
export const SET_PUBLIC_NOTICE_STATUS_CANCELLED = apiPath+'/application/application-detail-status-cancelled'; | |||
export const SET_PUBLIC_NOTICE_STATUS_COMPLATED = apiPath+'/application/application-detail-status-complated'; | |||
export const SET_PUBLIC_NOTICE_STATUS_WITHDRAW = apiPath+'/application/application-detail-status-withdrawn'; | |||
export const UPDATE_PUBLIC_NOTICE_APPLY_DETAIL = apiPath+'/application/save'; | |||
//User Group | |||
export const POST_AND_UPDATE_USER_GROUP = apiPath+'/group/save'; |
@@ -34,9 +34,9 @@ export const publicNoticeStaticEng = [ | |||
]; | |||
export const groupTitle = [ | |||
{ key: 1, label: 'Private Bill', type: 'A' }, | |||
{ key: 2, label: 'Companies Ordinance', type: 'B' }, | |||
{ key: 3, label: 'High Court', type: 'C' }, | |||
{ key: 4, label: 'Notices', type: 'D' }, | |||
{ key: 5, label: 'Miscellaneous (Companies)', type: 'E' }, | |||
{ key: 1, label: 'A - Private Bill', title: 'Private Bill', type: 'A'}, | |||
{ key: 2, label: 'B - Companies Ordinance', title: 'Companies Ordinance', type: 'B' }, | |||
{ key: 3, label: 'C - High Court', title: 'High Court', type: 'C' }, | |||
{ key: 4, label: 'D - Notices', title: 'Notices', type: 'D' }, | |||
{ key: 5, label: 'E - Miscellaneous (Companies)', title: 'Miscellaneous (Companies)', type: 'E' }, | |||
]; |