Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 

178 linhas
9.3 KiB

  1. import { Grid, Typography, Stack, } from '@mui/material';
  2. import { useState, useEffect, lazy } from "react";
  3. import Loadable from 'components/Loadable';
  4. import { useIntl, FormattedMessage } from "react-intl";
  5. import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png'
  6. const BackgroundHead = {
  7. backgroundImage: `url(${titleBackgroundImg})`,
  8. width: 'auto',
  9. height: 'auto',
  10. backgroundSize: 'contain',
  11. backgroundRepeat: 'no-repeat',
  12. backgroundColor: '#0C489E',
  13. backgroundPosition: 'right'
  14. }
  15. const LoadingComponent = Loadable(lazy(() => import('pages/extra-pages/LoadingComponent')));
  16. import DownloadIcon from '@mui/icons-material/Download';
  17. const UserMenu = () => {
  18. const intl = useIntl();
  19. const { locale } = intl;
  20. const [onReady, setOnReady] = useState(false);
  21. const pnspsurl = "https://"+window.location.hostname;
  22. useEffect(() => {
  23. setOnReady(true);
  24. }, [locale]);
  25. const tableStyle = {
  26. fontFamily: "arial, sans-serif",
  27. borderCollapse: "collapse",
  28. width: "100%",
  29. }
  30. const cellStyle = {
  31. border: "1px solid #dddddd",
  32. textAlign: "left",
  33. padding: "8px"
  34. };
  35. const getRow = ({ title, en, zh, cn }) => {
  36. return <>
  37. <tr>
  38. <td style={cellStyle}>{title}</td>
  39. <td style={cellStyle}><a href={en} target='_brank'><DownloadIcon /></a></td>
  40. <td style={cellStyle}><a href={zh} target='_brank'><DownloadIcon /></a></td>
  41. <td style={cellStyle}><a href={cn} target='_brank'><DownloadIcon /></a></td>
  42. </tr>
  43. </>
  44. ;
  45. }
  46. return (
  47. !onReady ?
  48. <Grid container sx={{ minHeight: '87vh', mb: 3 }} direction="column" justifyContent="center" alignItems="center">
  49. <Grid item>
  50. <LoadingComponent />
  51. </Grid>
  52. </Grid>
  53. :
  54. (
  55. <Grid container sx={{ minHeight: '87vh', mb: 3}} direction="column" alignItems="center" >
  56. <Grid item xs={12} md={12} width="100%">
  57. <div style={BackgroundHead}>
  58. <Stack direction="row" height='70px' justifyContent="flex-start" alignItems="center">
  59. <Typography ml={15} color='#FFF' variant="h4" sx={{ display: { xs: 'none', sm: 'none', md: 'block', pt: 2 } }}>
  60. <FormattedMessage id="userGuide" />
  61. </Typography>
  62. </Stack>
  63. </div>
  64. </Grid>
  65. <Grid container justifyContent="center" alignItems="center" >
  66. <Grid item xs={10} md={8} lg={6}>
  67. <div style={{
  68. textAlign: "justify",
  69. textJustify: "interWord",
  70. fontStyle: "normal"
  71. }}>
  72. <p>
  73. <FormattedMessage id="userGuideDes" />
  74. <table style={tableStyle}>
  75. <tr>
  76. <th style={cellStyle} width="70%"></th>
  77. <th style={cellStyle} width="10%">English</th>
  78. <th style={cellStyle} width="10%">繁體中文</th>
  79. <th style={cellStyle} width="10%">简体中文</th>
  80. </tr>
  81. {getRow({
  82. title: <FormattedMessage id="userGuide1" />,
  83. en: pnspsurl + "/user-guide/eng/01 - Create account - 1.pdf",
  84. zh: pnspsurl + "/user-guide/cht/01c - Create account - 1.pdf",
  85. cn: pnspsurl + "/user-guide/chs/01sc - Create account - 1.pdf"
  86. })}
  87. {getRow({
  88. title: <FormattedMessage id="userGuide2" />,
  89. en: pnspsurl + "/user-guide/eng/02 - Login - 1.pdf",
  90. zh: pnspsurl + "/user-guide/cht/02c - Login - 1.pdf",
  91. cn: pnspsurl + "/user-guide/chs/02sc - Login - 1.pdf"
  92. })}
  93. {getRow({
  94. title: <FormattedMessage id="userGuide3" />,
  95. en: pnspsurl + "/user-guide/eng/03 - Application for publishing a Public Notice in the Gazette - 1.pdf",
  96. zh: pnspsurl + "/user-guide/cht/03c - Application for publishing a Public Notice in the Gazette - 1.pdf",
  97. cn: pnspsurl + "/user-guide/chs/03sc - Application for publishing a Public Notice in the Gazette - 1.pdf"
  98. })}
  99. {getRow({
  100. title: <FormattedMessage id="userGuide4" />,
  101. en: pnspsurl + "/user-guide/eng/04 - Proofreading reply (with correction) - 1.pdf",
  102. zh: pnspsurl + "/user-guide/cht/04c - Proofreading reply (with correction) - 1.pdf",
  103. cn: pnspsurl + "/user-guide/chs/04sc - Proofreading reply (with correction) - 1.pdf"
  104. })}
  105. {getRow({
  106. title: <FormattedMessage id="userGuide5" />,
  107. en: pnspsurl + "/user-guide/eng/05 - Proofreading reply (pass for printing) - 1.pdf",
  108. zh: pnspsurl + "/user-guide/cht/05c - Proofreading reply (pass for printing) - 1.pdf",
  109. cn: pnspsurl + "/user-guide/chs/05sc - Proofreading reply (pass for printing) - 1.pdf"
  110. })}
  111. {getRow({
  112. title: <FormattedMessage id="userGuide6" />,
  113. en: pnspsurl + "/user-guide/eng/06 - Cancellation of application for publishing a Public Notice in the Gazette - 1.pdf",
  114. zh: pnspsurl + "/user-guide/cht/06c - Cancellation of application for publishing a Public Notice in the Gazette - 1.pdf",
  115. cn: pnspsurl + "/user-guide/chs/06sc - Cancellation of application for publishing a Public Notice in the Gazette - 1.pdf"
  116. })}
  117. {getRow({
  118. title: <FormattedMessage id="userGuide7" />,
  119. en: pnspsurl + "/user-guide/eng/07 - Forgot password - 1.pdf",
  120. zh: pnspsurl + "/user-guide/cht/07c - Forgot password - 1.pdf",
  121. cn: pnspsurl + "/user-guide/chs/07sc - Forgot password - 1.pdf"
  122. })}
  123. {getRow({
  124. title: <FormattedMessage id="userGuide8" />,
  125. en: pnspsurl + "/user-guide/eng/08 - Change password - 1.pdf",
  126. zh: pnspsurl + "/user-guide/cht/08c - Change password - 1.pdf",
  127. cn: pnspsurl + "/user-guide/chs/08sc - Change password - 1.pdf"
  128. })}
  129. {getRow({
  130. title: <FormattedMessage id="userGuide9" />,
  131. en: pnspsurl + "/user-guide/eng/09 - Language of email notification - 1.pdf",
  132. zh: pnspsurl + "/user-guide/cht/09c - Language of email notification - 1.pdf",
  133. cn: pnspsurl + "/user-guide/chs/09sc - Language of email notification - 1.pdf"
  134. })}
  135. {getRow({
  136. title: <FormattedMessage id="userGuide10" />,
  137. en: pnspsurl + "/user-guide/eng/10 - Download General Demand Note for making payment(s) - 1.pdf",
  138. zh: pnspsurl + "/user-guide/cht/10c - Download General Demand Note for making payment(s) - 1.pdf",
  139. cn: pnspsurl + "/user-guide/chs/10sc - Download General Demand Note for making payment(s) - 1.pdf"
  140. })}
  141. </table>
  142. </p>
  143. </div>
  144. </Grid>
  145. </Grid>
  146. </Grid>
  147. )
  148. );
  149. }
  150. export default UserMenu;