You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

пре 2 година
пре 3 недеља
пре 2 година
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. // material-ui
  2. import {
  3. Grid,
  4. Typography,
  5. Stack
  6. } from '@mui/material';
  7. import MainCard from "components/MainCard";
  8. import * as UrlUtils from "utils/ApiPathConst";
  9. import * as HttpUtils from "utils/HttpUtils";
  10. import * as React from "react";
  11. import Loadable from 'components/Loadable';
  12. const LoadingComponent = Loadable(React.lazy(() => import('pages/extra-pages/LoadingComponent')));
  13. const SearchForm = Loadable(React.lazy(() => import('./SearchForm')));
  14. const EventTable = Loadable(React.lazy(() => import('./DataGrid')));
  15. import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png'
  16. const BackgroundHead = {
  17. backgroundImage: `url(${titleBackgroundImg})`,
  18. width: '100%',
  19. height: '100%',
  20. backgroundSize: 'contain',
  21. backgroundRepeat: 'no-repeat',
  22. backgroundColor: '#0C489E',
  23. backgroundPosition: 'right'
  24. }
  25. // ==============================|| DASHBOARD - DEFAULT ||============================== //
  26. const Index = () => {
  27. const [issueCombo, setIssueCombo] = React.useState([]);
  28. const [searchCriteria, setSearchCriteria] = React.useState({});
  29. const [onReady, setOnReady] = React.useState(false);
  30. // const [paymentCount, setPaymentCount] = React.useState(0);
  31. // const [publishCount, setPublishCount] = React.useState(0);
  32. React.useEffect(() => {
  33. getIssueCombo();
  34. }, []);
  35. React.useEffect(() => {
  36. setOnReady(true);
  37. }, [searchCriteria]);
  38. function getIssueCombo() {
  39. HttpUtils.get({
  40. url: UrlUtils.GET_ISSUE_COMBO,
  41. onSuccess: function (responseData) {
  42. let combo = responseData;
  43. setIssueCombo(combo);
  44. }
  45. });
  46. }
  47. function applySearch(input) {
  48. setSearchCriteria(input);
  49. }
  50. return (
  51. !onReady ?
  52. <LoadingComponent />
  53. :
  54. <Grid container sx={{ minHeight: '87vh', backgroundColor: 'backgroundColor.default' }} direction="column">
  55. <Grid item xs={12}>
  56. <div style={BackgroundHead}>
  57. <Stack direction="row" height='70px' justifyContent="flex-start" alignItems="center">
  58. <Typography ml={15} color='#FFF' variant="h4" sx={{ "textShadow": "0px 0px 25px #0c489e" }}>
  59. Export for GDN (Non Creditor)
  60. </Typography>
  61. </Stack>
  62. </div>
  63. </Grid>
  64. {/*row 1*/}
  65. <Grid item xs={12} md={12} lg={12} sx={{ mb: -1 }}>
  66. <SearchForm
  67. applySearch={applySearch}
  68. issueComboData={issueCombo}
  69. // _paymentCount={paymentCount}
  70. // _publishCount={publishCount}
  71. />
  72. </Grid>
  73. {/*row 2*/}
  74. <Grid item xs={12} md={12} lg={12}>
  75. <MainCard elevation={0}
  76. border={false}
  77. content={false}
  78. >
  79. <EventTable
  80. searchCriteria={searchCriteria}
  81. // setPaymentCount={setPaymentCount}
  82. // setPublishCount={setPublishCount}
  83. />
  84. </MainCard>
  85. </Grid>
  86. </Grid>
  87. );
  88. };
  89. export default Index;