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.
 
 

132 line
5.6 KiB

  1. // material-ui
  2. import {
  3. Grid,
  4. Typography,
  5. Stack,
  6. Button,
  7. } from '@mui/material';
  8. import {
  9. checkIsOnlyOnlinePayment,
  10. } from "utils/Utils";
  11. import { useNavigate } from "react-router-dom";
  12. import * as DateUtils from "utils/DateUtils";
  13. import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png'
  14. import { FormattedMessage, useIntl } from "react-intl";
  15. const BackgroundHead = {
  16. backgroundImage: `url(${titleBackgroundImg})`,
  17. width: '100%',
  18. height: '100%',
  19. backgroundSize: 'contain',
  20. backgroundRepeat: 'no-repeat',
  21. backgroundColor: '#0C489E',
  22. backgroundPosition: 'right'
  23. }
  24. // ==============================|| DASHBOARD - DEFAULT ||============================== //
  25. const Index = ({ record }) => {
  26. const navigate = useNavigate()
  27. const intl = useIntl();
  28. const isAfter = checkIsOnlyOnlinePayment();
  29. return (
  30. (
  31. <Grid container sx={{ minHeight: '110vh', backgroundColor: '#fff' }} direction="column" justifyContent="flex-start" alignItems="center" >
  32. <Grid item xs={12} width="100%">
  33. <div style={BackgroundHead} width="100%" >
  34. <Stack direction="row" height='70px' >
  35. <Typography ml={15} color='#FFF' variant="h4" sx={{ display: { xs: 'none', sm: 'none', md: 'block' }, pt: 2 }} >
  36. <FormattedMessage id="proofRecord" />
  37. </Typography>
  38. </Stack>
  39. </div>
  40. </Grid>
  41. {/*row 1*/}
  42. <Grid item xs={12} md={12} >
  43. <Grid container justifyContent="flex-start" alignItems="center" >
  44. <center>
  45. <Grid item xs={12} md={8} >
  46. <Typography variant="h4" sx={{ textAlign: "left", ml: 4, mr: 4, mt: 4, borderBottom: "1px solid black" }}>
  47. <FormattedMessage
  48. id={isAfter ? "proofPaymentHeader_demandNote2" : "proofPaymentHeader_demandNote"}
  49. />
  50. </Typography>
  51. <Typography variant="h5" sx={{ ml: 8, mt: 4, mr: 8, textAlign: "left" }}>
  52. <div dangerouslySetInnerHTML={{
  53. __html: intl.formatMessage(
  54. {
  55. id: 'proofPaymentBody_demandNote'
  56. },
  57. {
  58. appNo: record?.appNo,
  59. }
  60. )
  61. }} />
  62. <br />
  63. <div dangerouslySetInnerHTML={{
  64. __html: intl.formatMessage(
  65. {
  66. id: 'proofPaymentBody_demandNote2'
  67. },
  68. {
  69. closingDateOff: DateUtils.dateFormat(record?.closingDateOff, intl.formatMessage({id: "dateStrFormat"})),
  70. email: record?.mail,
  71. }
  72. )
  73. }} />
  74. <br />
  75. <div dangerouslySetInnerHTML={{
  76. __html: intl.formatMessage(
  77. {
  78. id: 'proofPaymentBody_demandNote3'
  79. },
  80. {
  81. paymentDeadline: DateUtils.dateFormat(record?.closingDate, intl.formatMessage({id: "dateStrFormat"})),
  82. }
  83. )
  84. }} />
  85. <br />
  86. <div dangerouslySetInnerHTML={{
  87. __html: intl.formatMessage(
  88. {
  89. id: 'proofPaymentBody_demandNote4'
  90. }
  91. )
  92. }} />
  93. </Typography>
  94. <Typography variant="h3" sx={{ ml: 8, mt: 4, mr: 8, textAlign: "center" }}>
  95. <Button
  96. component="span"
  97. variant="contained"
  98. size="large"
  99. sx={{ m: 4 }}
  100. onClick={() => {
  101. navigate("/publicNotice");
  102. }}
  103. >
  104. <FormattedMessage id="backToNoticePage" />
  105. </Button>
  106. </Typography>
  107. </Grid>
  108. </center>
  109. </Grid>
  110. </Grid>
  111. {/*row 2*/}
  112. </Grid >
  113. )
  114. );
  115. };
  116. export default Index;