@@ -33,7 +33,24 @@ import DownloadIcon from '@mui/icons-material/Download'; | |||
// import { Params } from '../../../node_modules/react-router-dom/dist/index'; | |||
// import {useNavigate} from "react-router-dom"; | |||
// 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 ||============================== // | |||
const ApplicationDetailCard = ( | |||
@@ -53,7 +70,7 @@ const ApplicationDetailCard = ( | |||
const [fileDetail, setfileDetail] = useState({}); | |||
const [onReady, setOnReady] = useState(false); | |||
// const [reload, setReload] = useState(false); | |||
// const classes = useStyles(); | |||
// const navigate = useNavigate() | |||
// const params = useParams(); | |||
@@ -407,15 +424,6 @@ const ApplicationDetailCard = ( | |||
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={{ | |||
maxLength: 3, | |||
}} | |||
@@ -424,6 +432,7 @@ const ApplicationDetailCard = ( | |||
<FormControl variant="outlined" sx={{ width: '100%' }} disabled={!editMode} > | |||
<OutlinedInput | |||
size="small" | |||
type="tel" | |||
{...register("contactTelNo.phoneNumber", | |||
{ | |||
value: currentApplicationDetailData.contactTelNo.phoneNumber, | |||
@@ -500,12 +509,15 @@ const ApplicationDetailCard = ( | |||
}} | |||
inputProps={{ | |||
maxLength: 3, | |||
type:"tel" | |||
}} | |||
/> | |||
</FormControl> | |||
<FormControl variant="outlined" sx={{ width: '100%' }} disabled={!editMode}> | |||
<OutlinedInput | |||
size="small" | |||
type="tel" | |||
{...register("contactFaxNo.faxNumber", | |||
{ | |||
value: currentApplicationDetailData.contactFaxNo.faxNumber, | |||
@@ -141,13 +141,13 @@ const StatusChangeDialog = (props) => { | |||
</FormikProvider> | |||
<Stack direction="row" justifyContent="space-around"> | |||
<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> | |||
</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> | |||
</DialogActions> | |||
</Stack> | |||
@@ -42,7 +42,6 @@ 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'))); | |||
@@ -80,11 +79,11 @@ const PublicNoticeDetail_GLD = () => { | |||
loadApplicationDetail() | |||
}, []); | |||
useEffect(() => { | |||
if (reload){ | |||
loadApplicationDetail() | |||
} | |||
}, [reload]); | |||
// useEffect(() => { | |||
// if (reload){ | |||
// loadApplicationDetail() | |||
// } | |||
// }, [reload]); | |||
useEffect(() => { | |||
if(editMode&&isSave){ | |||
@@ -127,7 +126,7 @@ const PublicNoticeDetail_GLD = () => { | |||
) | |||
.then((response) => { | |||
if (response.status === 200) { | |||
loadApplicationDetail() | |||
location.reload(); | |||
} | |||
}) | |||
.catch(error => { | |||
@@ -182,7 +181,7 @@ const PublicNoticeDetail_GLD = () => { | |||
if (response.status === 204) { | |||
setOpen(false); | |||
handleClose(); | |||
loadApplicationDetail() | |||
location.reload(); | |||
} | |||
}) | |||
.catch(error => { | |||
@@ -199,7 +198,7 @@ const PublicNoticeDetail_GLD = () => { | |||
if (response.status === 204) { | |||
setOpen(false); | |||
handleClose(); | |||
loadApplicationDetail() | |||
location.reload(); | |||
} | |||
}) | |||
.catch(error => { | |||
@@ -216,7 +215,7 @@ const PublicNoticeDetail_GLD = () => { | |||
if (response.status === 204) { | |||
setOpen(false); | |||
handleClose(); | |||
loadApplicationDetail() | |||
location.reload(); | |||
} | |||
}) | |||
.catch(error => { | |||
@@ -233,7 +232,7 @@ const PublicNoticeDetail_GLD = () => { | |||
if (response.status === 204) { | |||
setOpen(false); | |||
handleClose(); | |||
loadApplicationDetail() | |||
location.reload(); | |||
} | |||
}) | |||
.catch(error => { | |||
@@ -273,7 +272,7 @@ const PublicNoticeDetail_GLD = () => { | |||
<ApplicationDetailCard | |||
applicationDetailData={applicationDetailData} | |||
setStatus = {setStatus} | |||
setReload = {setReload} | |||
// setReload = {setReload} | |||
setUpdateApplicationObject={setUpdateApplicationObject} | |||
isEditMode = {isEditMode} | |||
setiIsSave={setiIsSave} | |||