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.
 
 

203 linhas
14 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: '100%',
  9. height: '100%',
  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. useEffect(() => {
  22. setOnReady(true);
  23. }, [locale]);
  24. const tableStyle = {
  25. fontFamily: "arial, sans-serif",
  26. borderCollapse: "collapse",
  27. width: "100%",
  28. }
  29. const cellStyle = {
  30. border: "1px solid #dddddd",
  31. textAlign: "left",
  32. padding: "8px"
  33. };
  34. const getRow = ({ title, orgEn, orgZh, orgCn, indEn, indZh, indCn }) => {
  35. return <>
  36. <tr>
  37. <td style={cellStyle}>{title}</td>
  38. <td style={cellStyle}><a href={locale=="zh-HK"?orgZh: locale=="en"?orgEn:orgCn} target='_brank'><DownloadIcon /></a></td>
  39. <td style={cellStyle}><a href={locale=="zh-HK"?indZh: locale=="en"?indEn:indCn} target='_brank'><DownloadIcon /></a></td>
  40. </tr>
  41. </>
  42. ;
  43. }
  44. return (
  45. !onReady ?
  46. <Grid container sx={{ minHeight: '87vh', mb: 3 }} direction="column" justifyContent="center" alignItems="center">
  47. <Grid item>
  48. <LoadingComponent />
  49. </Grid>
  50. </Grid>
  51. :
  52. (
  53. <Grid container justifyContent="center" alignItems="center" >
  54. <Grid item xs={12}>
  55. <div style={BackgroundHead}>
  56. <Stack direction="row" height='70px' justifyContent="flex-start" alignItems="center">
  57. <Typography ml={15} color='#FFF' variant="h4" sx={{ display: { xs: 'none', sm: 'none', md: 'block', pt: 2 } }}>
  58. <FormattedMessage id="userGuide" />
  59. </Typography>
  60. </Stack>
  61. </div>
  62. </Grid>
  63. <Grid item xs={10} md={8} lg={6}>
  64. <div style={{
  65. textAlign: "justify",
  66. textJustify: "interWord",
  67. fontStyle: "normal"
  68. }}>
  69. <p>
  70. <table style={tableStyle}>
  71. <tr>
  72. <th style={cellStyle} width="70%"> <FormattedMessage id="fileName" /></th>
  73. <th style={cellStyle} width="15%"> <FormattedMessage id="forOrgUser" /></th>
  74. <th style={cellStyle} width="15%"> <FormattedMessage id="forIndUser" /></th>
  75. </tr>
  76. {getRow({
  77. title: <FormattedMessage id="userGuide1" />,
  78. orgEn: "https://pnsps.gld.gov.hk/user-guide-pub/eng/01 - Create account - c 1.pdf",
  79. orgZh: "https://pnsps.gld.gov.hk/user-guide-pub/cht/01c - Create account - c 1.pdf",
  80. orgCn: "https://pnsps.gld.gov.hk/user-guide-pub/chs/01sc - Create account - c 1.pdf",
  81. indEn: "https://pnsps.gld.gov.hk/user-guide-pub/eng/01 - Create account - p 1.pdf",
  82. indZh: "https://pnsps.gld.gov.hk/user-guide-pub/cht/01c - Create account - p 1.pdf",
  83. indCn: "https://pnsps.gld.gov.hk/user-guide-pub/chs/01sc - Create account - p 1.pdf"
  84. })}
  85. {getRow({
  86. title: <FormattedMessage id="userGuide2" />,
  87. orgEn: "https://pnsps.gld.gov.hk/user-guide-pub/eng/02 - Login - c 1.pdf",
  88. orgZh: "https://pnsps.gld.gov.hk/user-guide-pub/cht/02c - Login - c 1.pdf",
  89. orgCn: "https://pnsps.gld.gov.hk/user-guide-pub/chs/02sc - Login - c 1.pdf",
  90. indEn: "https://pnsps.gld.gov.hk/user-guide-pub/eng/02 - Login - p 1.pdf",
  91. indZh: "https://pnsps.gld.gov.hk/user-guide-pub/cht/02c - Login - p 1.pdf",
  92. indCn: "https://pnsps.gld.gov.hk/user-guide-pub/chs/02sc - Login - p 1.pdf"
  93. })}
  94. {getRow({
  95. title: <FormattedMessage id="userGuide3" />,
  96. orgEn: "https://pnsps.gld.gov.hk/user-guide-pub/eng/03 - Application for publishing a Public Notice in the Gazette - c 1.pdf",
  97. orgZh: "https://pnsps.gld.gov.hk/user-guide-pub/cht/03c - Application for publishing a Public Notice in the Gazette - c 1.pdf",
  98. orgCn: "https://pnsps.gld.gov.hk/user-guide-pub/chs/03sc - Application for publishing a Public Notice in the Gazette - c 1.pdf",
  99. indEn: "https://pnsps.gld.gov.hk/user-guide-pub/eng/03 - Application for publishing a Public Notice in the Gazette - p 1.pdf",
  100. indZh: "https://pnsps.gld.gov.hk/user-guide-pub/cht/03c - Application for publishing a Public Notice in the Gazette - p 1.pdf",
  101. indCn: "https://pnsps.gld.gov.hk/user-guide-pub/chs/03sc - Application for publishing a Public Notice in the Gazette - p 1.pdf"
  102. })}
  103. {getRow({
  104. title: <FormattedMessage id="userGuide4" />,
  105. orgEn: "https://pnsps.gld.gov.hk/user-guide-pub/eng/04 - Proofreading reply (with correction) - c 1.pdf",
  106. orgZh: "https://pnsps.gld.gov.hk/user-guide-pub/cht/04c - Proofreading reply (with correction) - c 1.pdf",
  107. orgCn: "https://pnsps.gld.gov.hk/user-guide-pub/chs/04sc - Proofreading reply (with correction) - c 1.pdf",
  108. indEn: "https://pnsps.gld.gov.hk/user-guide-pub/eng/04 - Proofreading reply (with correction) - p 1.pdf",
  109. indZh: "https://pnsps.gld.gov.hk/user-guide-pub/cht/04c - Proofreading reply (with correction) - p 1.pdf",
  110. indCn: "https://pnsps.gld.gov.hk/user-guide-pub/chs/04sc - Proofreading reply (with correction) - p 1.pdf"
  111. })}
  112. {getRow({
  113. title: <FormattedMessage id="userGuide5" />,
  114. orgEn: "https://pnsps.gld.gov.hk/user-guide-pub/eng/05 - Proofreading reply (pass for printing) - c 1.pdf",
  115. orgZh: "https://pnsps.gld.gov.hk/user-guide-pub/cht/05c - Proofreading reply (pass for printing) - c 1.pdf",
  116. orgCn: "https://pnsps.gld.gov.hk/user-guide-pub/chs/05sc - Proofreading reply (pass for printing) - c 1.pdf",
  117. indEn: "https://pnsps.gld.gov.hk/user-guide-pub/eng/05 - Proofreading reply (pass for printing) - p 1.pdf",
  118. indZh: "https://pnsps.gld.gov.hk/user-guide-pub/cht/05c - Proofreading reply (pass for printing) - p 1.pdf",
  119. indCn: "https://pnsps.gld.gov.hk/user-guide-pub/chs/05sc - Proofreading reply (pass for printing) - p 1.pdf"
  120. })}
  121. {getRow({
  122. title: <FormattedMessage id="userGuide6" />,
  123. orgEn: "https://pnsps.gld.gov.hk/user-guide-pub/eng/06 - Cancellation of application for publishing a Public Notice in the Gazette - c 1.pdf",
  124. orgZh: "https://pnsps.gld.gov.hk/user-guide-pub/cht/06c - Cancellation of application for publishing a Public Notice in the Gazette - c 1.pdf",
  125. orgCn: "https://pnsps.gld.gov.hk/user-guide-pub/chs/06sc - Cancellation of application for publishing a Public Notice in the Gazette - c 1.pdf",
  126. indEn: "https://pnsps.gld.gov.hk/user-guide-pub/eng/06 - Cancellation of application for publishing a Public Notice in the Gazette - p 1.pdf",
  127. indZh: "https://pnsps.gld.gov.hk/user-guide-pub/cht/06c - Cancellation of application for publishing a Public Notice in the Gazette - p 1.pdf",
  128. indCn: "https://pnsps.gld.gov.hk/user-guide-pub/chs/06sc - Cancellation of application for publishing a Public Notice in the Gazette - p 1.pdf"
  129. })}
  130. {getRow({
  131. title: <FormattedMessage id="userGuide7" />,
  132. orgEn: "https://pnsps.gld.gov.hk/user-guide-pub/eng/07 - Forgot password - c 1.pdf",
  133. orgZh: "https://pnsps.gld.gov.hk/user-guide-pub/cht/07c - Forgot password - c 1.pdf",
  134. orgCn: "https://pnsps.gld.gov.hk/user-guide-pub/chs/07sc - Forgot password - c 1.pdf",
  135. indEn: "https://pnsps.gld.gov.hk/user-guide-pub/eng/07 - Forgot password - p 1.pdf",
  136. indZh: "https://pnsps.gld.gov.hk/user-guide-pub/cht/07c - Forgot password - p 1.pdf",
  137. indCn: "https://pnsps.gld.gov.hk/user-guide-pub/chs/07sc - Forgot password - p 1.pdf"
  138. })}
  139. {getRow({
  140. title: <FormattedMessage id="userGuide8" />,
  141. orgEn: "https://pnsps.gld.gov.hk/user-guide-pub/eng/08 - Change password - c 1.pdf",
  142. orgZh: "https://pnsps.gld.gov.hk/user-guide-pub/cht/08c - Change password - c 1.pdf",
  143. orgCn: "https://pnsps.gld.gov.hk/user-guide-pub/chs/08sc - Change password - c 1.pdf",
  144. indEn: "https://pnsps.gld.gov.hk/user-guide-pub/eng/08 - Change password - p 1.pdf",
  145. indZh: "https://pnsps.gld.gov.hk/user-guide-pub/cht/08c - Change password - p 1.pdf",
  146. indCn: "https://pnsps.gld.gov.hk/user-guide-pub/chs/08sc - Change password - p 1.pdf"
  147. })}
  148. {getRow({
  149. title: <FormattedMessage id="userGuide9" />,
  150. orgEn: "https://pnsps.gld.gov.hk/user-guide-pub/eng/09 - Language of email notification - c 1.pdf",
  151. orgZh: "https://pnsps.gld.gov.hk/user-guide-pub/cht/09c - Language of email notification - c 1.pdf",
  152. orgCn: "https://pnsps.gld.gov.hk/user-guide-pub/chs/09sc - Language of email notification - c 1.pdf",
  153. indEn: "https://pnsps.gld.gov.hk/user-guide-pub/eng/09 - Language of email notification - p 1.pdf",
  154. indZh: "https://pnsps.gld.gov.hk/user-guide-pub/cht/09c - Language of email notification - p 1.pdf",
  155. indCn: "https://pnsps.gld.gov.hk/user-guide-pub/chs/09sc - Language of email notification - p 1.pdf"
  156. })}
  157. {getRow({
  158. title: <FormattedMessage id="userGuidePub10" />,
  159. orgEn: "https://pnsps.gld.gov.hk/user-guide-pub/eng/10 - Payment - c 1.pdf",
  160. orgZh: "https://pnsps.gld.gov.hk/user-guide-pub/cht/10c - Payment - c 1.pdf",
  161. orgCn: "https://pnsps.gld.gov.hk/user-guide-pub/chs/10sc - Payment - c 1.pdf",
  162. indEn: "https://pnsps.gld.gov.hk/user-guide-pub/eng/10 - Payment - p 1.pdf",
  163. indZh: "https://pnsps.gld.gov.hk/user-guide-pub/cht/10c - Payment - p 1.pdf",
  164. indCn: "https://pnsps.gld.gov.hk/user-guide-pub/chs/10sc - Payment - p 1.pdf"
  165. })}
  166. </table>
  167. <FormattedMessage id="userGuidePubNote" />
  168. </p>
  169. </div>
  170. </Grid>
  171. </Grid>
  172. )
  173. );
  174. }
  175. export default UserMenu;