// material-ui import { Grid, Typography, Stack } from '@mui/material'; import MainCard from "components/MainCard"; import * as React from "react"; import * as DateUtils from "utils/DateUtils"; import { getSearchCriteria } from "auth/utils"; import * as HttpUtils from "utils/HttpUtils"; import * as UrlUtils from "utils/ApiPathConst"; import Loadable from 'components/Loadable'; const LoadingComponent = Loadable(React.lazy(() => import('pages/extra-pages/LoadingComponent'))); const FullListForm = Loadable(React.lazy(() => import('./FullListForm'))); import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png' const BackgroundHead = { backgroundImage: `url(${titleBackgroundImg})`, width: '100%', height: '100%', backgroundSize: 'contain', backgroundRepeat: 'no-repeat', backgroundColor: '#0C489E', backgroundPosition: 'right' } // ==============================|| DASHBOARD - DEFAULT ||============================== // const ReportSearchPage = () => { const [searchCriteria, setSearchCriteria] = React.useState({}); const [onReady, setOnReady] = React.useState(false); const [issueCombo, setIssueCombo] = React.useState([]); React.useEffect(() => { getIssueCombo(); if (Object.keys(getSearchCriteria(window.location.pathname)).length>0){ setSearchCriteria(getSearchCriteria(window.location.pathname)) }else{ localStorage.setItem('searchCriteria',"") setSearchCriteria({ dateTo: DateUtils.dateValue(new Date()), dateFrom: DateUtils.dateValue(new Date().setDate(new Date().getDate()-14)), }) } }, []); function getIssueCombo() { HttpUtils.get({ url: UrlUtils.GET_ISSUE_COMBO, onSuccess: function (responseData) { let combo = responseData; setIssueCombo(combo); } }); } React.useEffect(() => { setOnReady(true); }, [searchCriteria]); return ( !onReady ? :
Gazette Notice Full List
{/*row 1*/} {/*row 2*/}
); } export default ReportSearchPage;