| @@ -51,9 +51,11 @@ export function FiDataGrid({ rows, columns, sx, autoHeight, | |||||
| const [rowCount, setRowCount] = useState(0); | const [rowCount, setRowCount] = useState(0); | ||||
| useEffect(() => { | useEffect(() => { | ||||
| setPage(0); | |||||
| set_doLoad(doLoad); | |||||
| setLoading(true) | |||||
| if (doLoad !== undefined && Object.keys(doLoad).length>0 ){ | |||||
| setPage(0); | |||||
| set_doLoad(doLoad); | |||||
| setLoading(true) | |||||
| } | |||||
| }, [doLoad]); | }, [doLoad]); | ||||
| useEffect(() => { | useEffect(() => { | ||||
| @@ -93,6 +95,7 @@ export function FiDataGrid({ rows, columns, sx, autoHeight, | |||||
| if (customPageSize) { | if (customPageSize) { | ||||
| setPageSize(customPageSize); | setPageSize(customPageSize); | ||||
| } | } | ||||
| console.log(_doLoad) | |||||
| if (_doLoad !== undefined && Object.keys(_doLoad).length==0 ){ | if (_doLoad !== undefined && Object.keys(_doLoad).length==0 ){ | ||||
| setLoading(false) | setLoading(false) | ||||
| if (applyGridOnReady !== undefined){ | if (applyGridOnReady !== undefined){ | ||||
| @@ -125,7 +128,10 @@ export function FiDataGrid({ rows, columns, sx, autoHeight, | |||||
| // console.log(Object.keys(_doLoad.params).length > 0) | // console.log(Object.keys(_doLoad.params).length > 0) | ||||
| // console.log(Object.keys(_doLoad.params).length > 0) | // console.log(Object.keys(_doLoad.params).length > 0) | ||||
| if (_doLoad?.url == null) return; | |||||
| if (_doLoad?.url == null){ | |||||
| setLoading(false) | |||||
| return; | |||||
| } | |||||
| if (_doLoad.params == undefined) return; | if (_doLoad.params == undefined) return; | ||||
| if (_doLoad.params.searchCriteria !== undefined) return; | if (_doLoad.params.searchCriteria !== undefined) return; | ||||
| if (_doLoad.params == null) _doLoad.params = {}; | if (_doLoad.params == null) _doLoad.params = {}; | ||||
| @@ -388,8 +388,8 @@ const Index = () => { | |||||
| <Grid item xs={12} md={12} lg={12} sx={{ mb: 1, mt:5,}}> | <Grid item xs={12} md={12} lg={12} sx={{ mb: 1, mt:5,}}> | ||||
| <CancelOutlinedIcon color="error" sx={{ width: "200px", height: "200px" }} /> | <CancelOutlinedIcon color="error" sx={{ width: "200px", height: "200px" }} /> | ||||
| </Grid> | </Grid> | ||||
| <Grid item xs={12} md={12} lg={12} sx={{ mb: 1, mt:5,}}> | |||||
| <Typography display="inline" variant="h4"> | |||||
| <Grid item xs={12} md={12} lg={12} sx={{ mb: 1, mt:5, ml:2}}> | |||||
| <Typography display="inline" variant="h4" sx={{textAlign: 'justify'}}> | |||||
| <FormattedMessage id="verifyFail"/> | <FormattedMessage id="verifyFail"/> | ||||
| </Typography> | </Typography> | ||||
| </Grid> | </Grid> | ||||
| @@ -441,7 +441,7 @@ const Index = () => { | |||||
| {/* <Button disabled={true} hidden={true} variant="contained" type="submit" sx={{ fontSize: 12,height:'25px'}}>Submit</Button> */} | {/* <Button disabled={true} hidden={true} variant="contained" type="submit" sx={{ fontSize: 12,height:'25px'}}>Submit</Button> */} | ||||
| <CancelOutlinedIcon color="error" sx={{ width: "200px", height: "200px" }} /> | <CancelOutlinedIcon color="error" sx={{ width: "200px", height: "200px" }} /> | ||||
| </Grid> | </Grid> | ||||
| <Grid item xs={12} md={12} lg={12} sx={{ mb: 1, mt:5, display: { xs: 'none', sm: 'none', md: 'block' } }}> | |||||
| <Grid item xs={12} md={12} lg={12} sx={{ mb: 1, mt:5, ml:2, display: { xs: 'none', sm: 'none', md: 'block' } }}> | |||||
| <Typography display="inline" variant="h4"> | <Typography display="inline" variant="h4"> | ||||
| <FormattedMessage id="verifyFail"/> | <FormattedMessage id="verifyFail"/> | ||||
| </Typography> | </Typography> | ||||
| @@ -26,19 +26,27 @@ export default function Verify() { | |||||
| const params = useParams() | const params = useParams() | ||||
| const handleVerify = async () => { | const handleVerify = async () => { | ||||
| console.log("handleVerify()"); | |||||
| const response = await axios.get(GET_VERIFY_USER_ACCOUNT, { | |||||
| // console.log("handleVerify()"); | |||||
| await axios.get(GET_VERIFY_USER_ACCOUNT, { | |||||
| params: { | params: { | ||||
| email: decodeURIComponent(params.email), | email: decodeURIComponent(params.email), | ||||
| emailVerifyHash: decodeURIComponent(params.verifyCode) | emailVerifyHash: decodeURIComponent(params.verifyCode) | ||||
| } | } | ||||
| }) | |||||
| if (response.status === 200 && response.data) { | |||||
| setVerifyState(true) | |||||
| } else { | |||||
| }).then( | |||||
| (response)=>{ | |||||
| if (response.status === 200 && response.data) { | |||||
| setVerifyState(true) | |||||
| } else { | |||||
| setVerifyState(false) | |||||
| } | |||||
| setIsLoading(false) | |||||
| } | |||||
| ).catch(error => { | |||||
| console.log(error) | |||||
| setVerifyState(false) | setVerifyState(false) | ||||
| } | |||||
| setIsLoading(false) | |||||
| setIsLoading(false) | |||||
| }); | |||||
| } | } | ||||
| useEffect(() => { | useEffect(() => { | ||||
| @@ -80,7 +88,7 @@ export default function Verify() { | |||||
| <Stack mt={1} direction="column" justifyContent="flex-start" alignItems="center" spacing={2}> | <Stack mt={1} direction="column" justifyContent="flex-start" alignItems="center" spacing={2}> | ||||
| {/* <Button disabled={true} hidden={true} variant="contained" type="submit" sx={{ fontSize: 12,height:'25px'}}>Submit</Button> */} | {/* <Button disabled={true} hidden={true} variant="contained" type="submit" sx={{ fontSize: 12,height:'25px'}}>Submit</Button> */} | ||||
| <CancelOutlinedIcon color="error" sx={{ width: "200px", height: "200px" }} /> | <CancelOutlinedIcon color="error" sx={{ width: "200px", height: "200px" }} /> | ||||
| <Typography display="inline" variant="h4"> | |||||
| <Typography display="inline" variant="h4" sx={{textAlign: 'justify'}}> | |||||
| <FormattedMessage id="verifyFail"/> | <FormattedMessage id="verifyFail"/> | ||||
| </Typography> | </Typography> | ||||
| <Button color="error" variant="outlined" component={Link} to="/login"> | <Button color="error" variant="outlined" component={Link} to="/login"> | ||||