@@ -33,7 +33,24 @@ import DownloadIcon from '@mui/icons-material/Download'; | |||||
// import { Params } from '../../../node_modules/react-router-dom/dist/index'; | // import { Params } from '../../../node_modules/react-router-dom/dist/index'; | ||||
// import {useNavigate} from "react-router-dom"; | // import {useNavigate} from "react-router-dom"; | ||||
// import axios from "axios"; | // import axios from "axios"; | ||||
// import { makeStyles } from '@material-ui/core/styles'; | |||||
// const useStyles = makeStyles({ | |||||
// input: { | |||||
// '& input[type=number]': { | |||||
// '-moz-appearance': 'textfield' | |||||
// }, | |||||
// '& input[type=number]::-webkit-outer-spin-button': { | |||||
// '-webkit-appearance': 'none', | |||||
// margin: 0 | |||||
// }, | |||||
// '& input[type=number]::-webkit-inner-spin-button': { | |||||
// '-webkit-appearance': 'none', | |||||
// margin: 0 | |||||
// } | |||||
// }, | |||||
// }); | |||||
// ==============================|| DASHBOARD - DEFAULT ||============================== // | // ==============================|| DASHBOARD - DEFAULT ||============================== // | ||||
const ApplicationDetailCard = ( | const ApplicationDetailCard = ( | ||||
@@ -53,7 +70,7 @@ const ApplicationDetailCard = ( | |||||
const [fileDetail, setfileDetail] = useState({}); | const [fileDetail, setfileDetail] = useState({}); | ||||
const [onReady, setOnReady] = useState(false); | const [onReady, setOnReady] = useState(false); | ||||
// const [reload, setReload] = useState(false); | // const [reload, setReload] = useState(false); | ||||
// const classes = useStyles(); | |||||
// const navigate = useNavigate() | // const navigate = useNavigate() | ||||
// const params = useParams(); | // const params = useParams(); | ||||
@@ -407,15 +424,6 @@ const ApplicationDetailCard = ( | |||||
background: "#f8f8f8", | background: "#f8f8f8", | ||||
}, | }, | ||||
}} | }} | ||||
onChange={(event) => { | |||||
const value = event.target.value; | |||||
console.log(event) | |||||
if (value.match(/[^0-9]/)) { | |||||
return event.preventDefault(); | |||||
} | |||||
console.log("321") | |||||
// setValue(value); | |||||
}} | |||||
inputProps={{ | inputProps={{ | ||||
maxLength: 3, | maxLength: 3, | ||||
}} | }} | ||||
@@ -424,6 +432,7 @@ const ApplicationDetailCard = ( | |||||
<FormControl variant="outlined" sx={{ width: '100%' }} disabled={!editMode} > | <FormControl variant="outlined" sx={{ width: '100%' }} disabled={!editMode} > | ||||
<OutlinedInput | <OutlinedInput | ||||
size="small" | size="small" | ||||
type="tel" | |||||
{...register("contactTelNo.phoneNumber", | {...register("contactTelNo.phoneNumber", | ||||
{ | { | ||||
value: currentApplicationDetailData.contactTelNo.phoneNumber, | value: currentApplicationDetailData.contactTelNo.phoneNumber, | ||||
@@ -500,12 +509,15 @@ const ApplicationDetailCard = ( | |||||
}} | }} | ||||
inputProps={{ | inputProps={{ | ||||
maxLength: 3, | maxLength: 3, | ||||
type:"tel" | |||||
}} | }} | ||||
/> | /> | ||||
</FormControl> | </FormControl> | ||||
<FormControl variant="outlined" sx={{ width: '100%' }} disabled={!editMode}> | <FormControl variant="outlined" sx={{ width: '100%' }} disabled={!editMode}> | ||||
<OutlinedInput | <OutlinedInput | ||||
size="small" | size="small" | ||||
type="tel" | |||||
{...register("contactFaxNo.faxNumber", | {...register("contactFaxNo.faxNumber", | ||||
{ | { | ||||
value: currentApplicationDetailData.contactFaxNo.faxNumber, | value: currentApplicationDetailData.contactFaxNo.faxNumber, | ||||
@@ -141,13 +141,13 @@ const StatusChangeDialog = (props) => { | |||||
</FormikProvider> | </FormikProvider> | ||||
<Stack direction="row" justifyContent="space-around"> | <Stack direction="row" justifyContent="space-around"> | ||||
<DialogActions> | <DialogActions> | ||||
<Button variant="contained" color="success" onClick={acceptedHandle()} autoFocus disabled={Object.keys(props.selectedGazetteGroup).length === 0}> | |||||
{status} | |||||
<Button variant="contained" onClick={props.handleClose} autoFocus > | |||||
Cancel | |||||
</Button> | </Button> | ||||
</DialogActions> | </DialogActions> | ||||
<DialogActions> | <DialogActions> | ||||
<Button variant="contained" onClick={props.handleClose} autoFocus > | |||||
Cancel | |||||
<Button variant="contained" color="success" onClick={acceptedHandle()} autoFocus disabled={Object.keys(props.selectedGazetteGroup).length === 0&&status==="Accept"}> | |||||
{status==="Accept"?"Confirm":status} | |||||
</Button> | </Button> | ||||
</DialogActions> | </DialogActions> | ||||
</Stack> | </Stack> | ||||
@@ -42,7 +42,6 @@ const PublicNoticeDetail_GLD = () => { | |||||
// const navigate = useNavigate() | // const navigate = useNavigate() | ||||
const [applicationDetailData, setApplicationDetailData] = useState({}); | const [applicationDetailData, setApplicationDetailData] = useState({}); | ||||
// const [refApplicationDetailData, setRefApplicationDetailData] = React.useState({}); | // const [refApplicationDetailData, setRefApplicationDetailData] = React.useState({}); | ||||
const [reload, setReload] = useState(false); | |||||
const [isLoading,setLoading] = useState(false); | const [isLoading,setLoading] = useState(false); | ||||
const LoadingComponent = Loadable(lazy(() => import('../extra-pages/LoadingComponent'))); | const LoadingComponent = Loadable(lazy(() => import('../extra-pages/LoadingComponent'))); | ||||
@@ -80,11 +79,11 @@ const PublicNoticeDetail_GLD = () => { | |||||
loadApplicationDetail() | loadApplicationDetail() | ||||
}, []); | }, []); | ||||
useEffect(() => { | |||||
if (reload){ | |||||
loadApplicationDetail() | |||||
} | |||||
}, [reload]); | |||||
// useEffect(() => { | |||||
// if (reload){ | |||||
// loadApplicationDetail() | |||||
// } | |||||
// }, [reload]); | |||||
useEffect(() => { | useEffect(() => { | ||||
if(editMode&&isSave){ | if(editMode&&isSave){ | ||||
@@ -127,7 +126,7 @@ const PublicNoticeDetail_GLD = () => { | |||||
) | ) | ||||
.then((response) => { | .then((response) => { | ||||
if (response.status === 200) { | if (response.status === 200) { | ||||
loadApplicationDetail() | |||||
location.reload(); | |||||
} | } | ||||
}) | }) | ||||
.catch(error => { | .catch(error => { | ||||
@@ -182,7 +181,7 @@ const PublicNoticeDetail_GLD = () => { | |||||
if (response.status === 204) { | if (response.status === 204) { | ||||
setOpen(false); | setOpen(false); | ||||
handleClose(); | handleClose(); | ||||
loadApplicationDetail() | |||||
location.reload(); | |||||
} | } | ||||
}) | }) | ||||
.catch(error => { | .catch(error => { | ||||
@@ -199,7 +198,7 @@ const PublicNoticeDetail_GLD = () => { | |||||
if (response.status === 204) { | if (response.status === 204) { | ||||
setOpen(false); | setOpen(false); | ||||
handleClose(); | handleClose(); | ||||
loadApplicationDetail() | |||||
location.reload(); | |||||
} | } | ||||
}) | }) | ||||
.catch(error => { | .catch(error => { | ||||
@@ -216,7 +215,7 @@ const PublicNoticeDetail_GLD = () => { | |||||
if (response.status === 204) { | if (response.status === 204) { | ||||
setOpen(false); | setOpen(false); | ||||
handleClose(); | handleClose(); | ||||
loadApplicationDetail() | |||||
location.reload(); | |||||
} | } | ||||
}) | }) | ||||
.catch(error => { | .catch(error => { | ||||
@@ -233,7 +232,7 @@ const PublicNoticeDetail_GLD = () => { | |||||
if (response.status === 204) { | if (response.status === 204) { | ||||
setOpen(false); | setOpen(false); | ||||
handleClose(); | handleClose(); | ||||
loadApplicationDetail() | |||||
location.reload(); | |||||
} | } | ||||
}) | }) | ||||
.catch(error => { | .catch(error => { | ||||
@@ -273,7 +272,7 @@ const PublicNoticeDetail_GLD = () => { | |||||
<ApplicationDetailCard | <ApplicationDetailCard | ||||
applicationDetailData={applicationDetailData} | applicationDetailData={applicationDetailData} | ||||
setStatus = {setStatus} | setStatus = {setStatus} | ||||
setReload = {setReload} | |||||
// setReload = {setReload} | |||||
setUpdateApplicationObject={setUpdateApplicationObject} | setUpdateApplicationObject={setUpdateApplicationObject} | ||||
isEditMode = {isEditMode} | isEditMode = {isEditMode} | ||||
setiIsSave={setiIsSave} | setiIsSave={setiIsSave} | ||||