選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

82 行
2.5 KiB

  1. // material-ui
  2. import {
  3. Grid,
  4. } from '@mui/material';
  5. import MainCard from "components/MainCard";
  6. import * as UrlUtils from "utils/ApiPathConst";
  7. import * as React from "react";
  8. import * as HttpUtils from "utils/HttpUtils";
  9. import { useParams } from "react-router-dom";
  10. import Loadable from 'components/Loadable';
  11. const LoadingComponent = Loadable(React.lazy(() => import('pages/extra-pages/LoadingComponent')));
  12. const ApplicationDetails = Loadable(React.lazy(() => import('./ApplicationDetails')));
  13. //const GazetteDetails = Loadable(React.lazy(() => import('./GazetteDetails')));
  14. const EventTable = Loadable(React.lazy(() => import('./DataGrid')));
  15. // ==============================|| DASHBOARD - DEFAULT ||============================== //
  16. const Index = () => {
  17. const params = useParams();
  18. const [record, setRecord] = React.useState();
  19. const [onReady, setOnReady] = React.useState(false);
  20. React.useEffect(() => {
  21. loadForm();
  22. }, []);
  23. React.useEffect(() => {
  24. setOnReady(true);
  25. }, [record]);
  26. const loadForm = () => {
  27. if(params.id > 0){
  28. HttpUtils.get({
  29. url: UrlUtils.GET_PUBLIC_NOTICE_APPLY_DETAIL+"/"+params.id,
  30. onSuccess:(responseData)=>{
  31. setRecord(responseData);
  32. }
  33. });
  34. }
  35. }
  36. return (
  37. !onReady ?
  38. <LoadingComponent />
  39. :
  40. <Grid container sx={{ minHeight: '85vh', backgroundColor: '#eee' }} direction="column" spacing={1} >
  41. {/*row 1*/}
  42. <Grid item xs={12} md={12} lg={12}>
  43. <Grid container spacing={1}>
  44. <Grid item xs={12} md={12} lg={8}>
  45. <ApplicationDetails
  46. formData={record}
  47. />
  48. </Grid>
  49. <Grid item xs={12} md={12} lg={4}>
  50. <ApplicationDetails
  51. formData={record}
  52. />
  53. </Grid>
  54. </Grid>
  55. </Grid>
  56. {/*row 2*/}
  57. <Grid item xs={12} md={12} lg={12}>
  58. <MainCard elevation={0}
  59. border={false}
  60. content={false}
  61. >
  62. <EventTable
  63. recordList={record}
  64. />
  65. </MainCard>
  66. </Grid>
  67. </Grid>
  68. );
  69. };
  70. export default Index;