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.
 
 

678 lines
40 KiB

  1. // material-ui
  2. import {
  3. FormControl,
  4. Button,
  5. Grid,
  6. // InputAdornment,
  7. Typography, FormLabel,
  8. OutlinedInput,
  9. Stack,
  10. Dialog, DialogTitle, DialogContent, DialogActions
  11. } from '@mui/material';
  12. // import MainCard from "../../components/MainCard";
  13. const MainCard = Loadable(lazy(() => import('components/MainCard')));
  14. import { useForm } from "react-hook-form";
  15. import { useNavigate } from "react-router-dom";
  16. import {
  17. useEffect,
  18. useState
  19. } from "react";
  20. // import Checkbox from "@mui/material/Checkbox";
  21. import Loadable from 'components/Loadable';
  22. import { lazy } from 'react';
  23. const LoadingComponent = Loadable(lazy(() => import('../../extra-pages/LoadingComponent')));
  24. // import {useParams} from "react-router-dom";
  25. import * as HttpUtils from "utils/HttpUtils"
  26. import * as UrlUtils from "utils/ApiPathConst"
  27. import * as StatusUtils from "utils/statusUtils/PublicNoteStatusUtils";
  28. import * as DateUtils from "utils/DateUtils";
  29. import * as FormatUtils from "utils/FormatUtils";
  30. import {
  31. isORGLoggedIn,
  32. } from "utils/Utils";
  33. // import BorderColorOutlinedIcon from '@mui/icons-material/BorderColorOutlined';
  34. // import DoneIcon from '@mui/icons-material/Done';
  35. import CloseIcon from '@mui/icons-material/Close';
  36. import EditNoteIcon from '@mui/icons-material/EditNote';
  37. import DownloadIcon from '@mui/icons-material/Download';
  38. import { PNSPS_BUTTON_THEME } from "../../../themes/buttonConst";
  39. import { ThemeProvider } from "@emotion/react";
  40. import * as React from "react";
  41. import { FormattedMessage, useIntl } from "react-intl";
  42. // ==============================|| DASHBOARD - DEFAULT ||============================== //
  43. const ApplicationDetailCard = (
  44. { applicationDetailData,
  45. setStatus,
  46. // updateUserObject,
  47. // isNewRecord
  48. }
  49. ) => {
  50. const [isPopUp, setIsPopUp] = useState(false);
  51. const [errorText, setErrorText] = useState("");
  52. const [errorPopUp, setErrorPopUp] = useState(false);
  53. // const params = useParams();
  54. const [currentApplicationDetailData, setCurrentApplicationDetailData] = useState({});
  55. const [fee, setFee] = useState(0);
  56. const [companyName, setCompanyName] = useState({});
  57. const [fileDetail, setfileDetail] = useState({});
  58. const [onReady, setOnReady] = useState(false);
  59. const [issueNum, setIssueNum] = useState("");
  60. const [issueDate, setIssueDate] = useState("");
  61. const { register,
  62. // getValues
  63. } = useForm();
  64. const navigate = useNavigate();
  65. const intl = useIntl();
  66. useEffect(() => {
  67. //if user data from parent are not null
  68. // console.log(applicationDetailData)
  69. if (Object.keys(applicationDetailData).length > 0 && applicationDetailData.data !== null) {
  70. setCurrentApplicationDetailData(applicationDetailData.data);
  71. setCompanyName(applicationDetailData.companyName);
  72. setfileDetail(applicationDetailData.fileDetail);
  73. setIssueNum(applicationDetailData.gazetteIssueDetail.volume + "/" + applicationDetailData.gazetteIssueDetail.issueYear
  74. + " No. " + applicationDetailData.gazetteIssueDetail.issueNo);
  75. setIssueDate(DateUtils.dateFormat(applicationDetailData.gazetteIssueDetail.issueDate, "D MMM YYYY (ddd)"));
  76. for (let i = 0; i < applicationDetailData.proofList.length; i++) {
  77. if (applicationDetailData.proofList[i].action == true) {
  78. setFee(applicationDetailData.proofList[i].fee);
  79. }
  80. }
  81. }
  82. }, [applicationDetailData]);
  83. useEffect(() => {
  84. //if state data are ready and assign to different field
  85. // console.log(currentApplicationDetailData)
  86. if (Object.keys(currentApplicationDetailData).length > 0) {
  87. setOnReady(true);
  88. }
  89. }, [currentApplicationDetailData]);
  90. const onDownloadClick = () => () => {
  91. HttpUtils.fileDownload({
  92. fileId: fileDetail?.id,
  93. skey: fileDetail?.skey,
  94. filename: fileDetail?.filename,
  95. });
  96. };
  97. const cancelledClick = () => () => {
  98. setStatus("cancel")
  99. };
  100. const checkExprityDate = () => {
  101. HttpUtils.post({
  102. url: UrlUtils.POST_CHECK_APP_EXPRITY_DATE,
  103. params: {
  104. ids: [currentApplicationDetailData.id]
  105. },
  106. onSuccess: (responData) => {
  107. if (responData.success == true) {
  108. setIsPopUp(true);
  109. return;
  110. }
  111. setErrorText("公共啟事申請已過期");
  112. setErrorPopUp(true);
  113. }
  114. });
  115. };
  116. function doPayment() {
  117. setIsPopUp(false);
  118. navigate('/paymentPage', { state: { amount: fee, appIdList: [currentApplicationDetailData.id] } });
  119. }
  120. return (
  121. !onReady ?
  122. <LoadingComponent />
  123. :
  124. <MainCard elevation={0}
  125. border={false}
  126. content={false}
  127. >
  128. <Grid container spacing={1} direction="row">
  129. <Grid item xs={12}>
  130. <Stack
  131. direction="row"
  132. justifyContent="space-between"
  133. alignItems="center"
  134. spacing={2}
  135. mb={2}
  136. >
  137. <ThemeProvider theme={PNSPS_BUTTON_THEME}>
  138. {
  139. currentApplicationDetailData.status == "confirmed" ?
  140. <Button
  141. variant="contained"
  142. color="create"
  143. onClick={() => { checkExprityDate(true) }}
  144. disabled={currentApplicationDetailData.status == "rejected"
  145. || currentApplicationDetailData.status == "cancelled"
  146. || currentApplicationDetailData.status == "paid"
  147. || currentApplicationDetailData.creditor}
  148. startIcon={<EditNoteIcon />}
  149. aria-label={intl.formatMessage({ id: 'payFor' })}
  150. >
  151. <FormattedMessage id="payFor" />
  152. </Button>
  153. : null
  154. }
  155. <Button
  156. variant="contained"
  157. onClick={cancelledClick()}
  158. color="edit"
  159. disabled={currentApplicationDetailData.status == "rejected"
  160. || currentApplicationDetailData.status == "cancelled"
  161. || (!currentApplicationDetailData.creditor
  162. && currentApplicationDetailData.status == "paid")
  163. || (currentApplicationDetailData.creditor
  164. && currentApplicationDetailData.status == "confirmed")
  165. }
  166. title={intl.formatMessage({ id: 'cancel' })}
  167. startIcon={<CloseIcon />}
  168. aria-label={intl.formatMessage({ id: 'cancel' })}
  169. >
  170. <FormattedMessage id="cancel" />
  171. </Button>
  172. </ThemeProvider>
  173. </Stack>
  174. </Grid>
  175. </Grid>
  176. <Typography variant="h4" sx={{ mb: 2, borderBottom: "1px solid black" }}>
  177. <FormattedMessage id="publicNoticeDetailTitle" />
  178. </Typography>
  179. <form>
  180. <Grid container direction="column">
  181. <Grid item xs={12} md={12}>
  182. <Grid container direction="row" justifyContent="space-between"
  183. alignItems="center">
  184. <Grid item xs={12} sm={12} md={9} lg={6} sx={{ mb: 1 }}>
  185. <Grid container alignItems={"center"}>
  186. <Grid item xs={12} md={3} lg={3}
  187. sx={{ display: 'flex', alignItems: 'center' }}>
  188. <FormLabel><Typography variant="pnspsFormParagraph">
  189. <FormattedMessage id="applicationId" />:
  190. </Typography></FormLabel>
  191. </Grid>
  192. <Grid item xs={12} md={9} lg={9}>
  193. <FormControl variant="outlined" fullWidth disabled>
  194. <OutlinedInput
  195. fullWidth
  196. size="small"
  197. {...register("appNo",
  198. {
  199. value: currentApplicationDetailData.appNo,
  200. })}
  201. id='appNo'
  202. sx={{
  203. "& .MuiInputBase-input.Mui-disabled": {
  204. WebkitTextFillColor: "#000000",
  205. background: "#f8f8f8",
  206. },
  207. }}
  208. />
  209. </FormControl>
  210. </Grid>
  211. </Grid>
  212. </Grid>
  213. <Grid item xs={12} sm={12} md={9} lg={5} sx={{ mb: 1, ml: 1 }}>
  214. <Grid container alignItems={"center"}>
  215. <Grid item xs={12} md={3} lg={3}
  216. sx={{ display: 'flex', alignItems: 'center' }}>
  217. <FormLabel><Typography variant="pnspsFormParagraph">
  218. <FormattedMessage id="applyStatus" />:
  219. </Typography></FormLabel>
  220. </Grid>
  221. <Grid item xs={12} md={4} lg={4}>
  222. <FormControl variant="outlined">
  223. {currentApplicationDetailData.status ? StatusUtils.getStatusByTextIntl(currentApplicationDetailData.status, false, intl) : ""}
  224. </FormControl>
  225. </Grid>
  226. </Grid>
  227. {
  228. currentApplicationDetailData.reason ?
  229. <Grid item xs={12} md={12} lg={12}>
  230. <Grid container alignItems={"center"} direction="row" >
  231. <Grid item xs={12} md={3} lg={3}>
  232. <FormLabel><Typography variant="pnspsFormParagraph"><FormattedMessage id="reason" />:</Typography></FormLabel>
  233. </Grid>
  234. <Grid item xs={12} md={9} lg={9}>
  235. <FormLabel>
  236. <Typography id='reason' variant="pnspsFormParagraph">
  237. {currentApplicationDetailData.reason}
  238. </Typography>
  239. </FormLabel>
  240. </Grid>
  241. </Grid>
  242. </Grid>
  243. : ""
  244. }
  245. </Grid>
  246. </Grid>
  247. <Grid container direction="row" justifyContent="space-between"
  248. alignItems="center">
  249. <Grid item xs={12} sm={12} md={9} lg={6} sx={{ mb: 1 }}>
  250. <Grid container alignItems={"center"}>
  251. <Grid item xs={12} md={3} lg={3}
  252. sx={{ display: 'flex', alignItems: 'center' }}>
  253. <FormLabel><Typography variant="pnspsFormParagraph">
  254. <FormattedMessage id="applyPerson" />:
  255. </Typography></FormLabel>
  256. </Grid>
  257. <Grid item xs={12} md={9} lg={9}>
  258. <FormControl variant="outlined" fullWidth disabled >
  259. {currentApplicationDetailData.orgId === null ?
  260. <OutlinedInput
  261. fullWidth
  262. size="small"
  263. {...register("contactPerson",
  264. {
  265. value: currentApplicationDetailData.contactPerson,
  266. })}
  267. id='contactPerson'
  268. sx={{
  269. "& .MuiInputBase-input.Mui-disabled": {
  270. WebkitTextFillColor: "#000000",
  271. background: "#f8f8f8",
  272. },
  273. }}
  274. /> :
  275. <OutlinedInput
  276. fullWidth
  277. size="small"
  278. {...register("companyName",
  279. {
  280. value: companyName.enCompanyName,
  281. })}
  282. id='companyName'
  283. sx={{
  284. "& .MuiInputBase-input.Mui-disabled": {
  285. WebkitTextFillColor: "#000000",
  286. background: "#f8f8f8",
  287. },
  288. }}
  289. />
  290. }
  291. </FormControl>
  292. </Grid>
  293. </Grid>
  294. </Grid>
  295. <Grid item xs={12} sm={12} md={9} lg={5} sx={{ mb: 1, ml: { lg: 1 } }}>
  296. <Grid container alignItems={"center"}>
  297. <Grid item xs={12} md={3} lg={3}
  298. sx={{ display: 'flex', alignItems: 'center' }}>
  299. <FormLabel><Typography variant="pnspsFormParagraph">
  300. <FormattedMessage id="gazetteCount" />:
  301. </Typography></FormLabel>
  302. </Grid>
  303. <Grid item xs={12} md={9} lg={9}>
  304. <Stack direction="row">
  305. <FormControl variant="outlined" fullWidth disabled>
  306. <OutlinedInput
  307. size="small"
  308. {...register("issueNum",
  309. {
  310. value: issueNum,
  311. })}
  312. id='issueNum'
  313. sx={{
  314. "& .MuiInputBase-input.Mui-disabled": {
  315. WebkitTextFillColor: "#000000",
  316. background: "#f8f8f8",
  317. },
  318. }}
  319. />
  320. </FormControl>
  321. </Stack>
  322. </Grid>
  323. </Grid>
  324. </Grid>
  325. </Grid>
  326. <Grid container direction="row" justifyContent="space-between"
  327. alignItems="center">
  328. <Grid item xs={12} sm={12} md={9} lg={6} sx={{ mb: 1 }}>
  329. <Grid container alignItems={"center"}>
  330. <Grid item xs={12} md={3} lg={3}
  331. sx={{ display: 'flex', alignItems: 'center' }}>
  332. <FormLabel><Typography variant="pnspsFormParagraph">
  333. <FormattedMessage id="contactPerson" />:
  334. </Typography></FormLabel>
  335. </Grid>
  336. <Grid item xs={12} md={9} lg={9}>
  337. <FormControl variant="outlined" fullWidth disabled>
  338. <OutlinedInput
  339. fullWidth
  340. size="small"
  341. {...register("contactPerson",
  342. {
  343. value: currentApplicationDetailData.contactPerson,
  344. })}
  345. id='contactPerson'
  346. sx={{
  347. "& .MuiInputBase-input.Mui-disabled": {
  348. WebkitTextFillColor: "#000000",
  349. background: "#f8f8f8",
  350. },
  351. }}
  352. />
  353. </FormControl>
  354. </Grid>
  355. </Grid>
  356. </Grid>
  357. <Grid item xs={12} sm={12} md={9} lg={5} sx={{ mb: 1, ml: { lg: 1 } }}>
  358. <Grid container alignItems={"center"}>
  359. <Grid item xs={12} md={3} lg={3}
  360. sx={{ display: 'flex', alignItems: 'center' }}>
  361. <FormLabel><Typography variant="pnspsFormParagraph">
  362. <FormattedMessage id="publishDate" />:
  363. </Typography></FormLabel>
  364. </Grid>
  365. <Grid item xs={12} md={9} lg={9}>
  366. <Stack direction="row">
  367. <FormControl variant="outlined" fullWidth disabled>
  368. <OutlinedInput
  369. size="small"
  370. {...register("issueDate",
  371. {
  372. value: issueDate,
  373. })}
  374. id='issueDate'
  375. sx={{
  376. "& .MuiInputBase-input.Mui-disabled": {
  377. WebkitTextFillColor: "#000000",
  378. background: "#f8f8f8",
  379. },
  380. }}
  381. />
  382. </FormControl>
  383. </Stack>
  384. </Grid>
  385. </Grid>
  386. </Grid>
  387. </Grid>
  388. <Grid container direction="row" justifyContent="space-between"
  389. alignItems="center">
  390. <Grid item xs={12} sm={12} md={9} lg={6} sx={{ mb: 1, }}>
  391. <Grid container alignItems={"center"}>
  392. <Grid item xs={12} md={3} lg={3}
  393. sx={{ display: 'flex', alignItems: 'center' }}>
  394. <FormLabel><Typography variant="pnspsFormParagraph">
  395. <FormattedMessage id="userContactNumber" />:
  396. </Typography></FormLabel>
  397. </Grid>
  398. <Grid item xs={12} md={9} lg={9}>
  399. <Stack direction="row">
  400. <FormControl variant="outlined" sx={{ width: '25%' }} disabled>
  401. <OutlinedInput
  402. size="small"
  403. {...register("countryCode",
  404. {
  405. value: currentApplicationDetailData.contactTelNo.countryCode,
  406. })}
  407. id='countryCode'
  408. sx={{
  409. "& .MuiInputBase-input.Mui-disabled": {
  410. WebkitTextFillColor: "#000000",
  411. background: "#f8f8f8",
  412. },
  413. }}
  414. />
  415. </FormControl>
  416. <FormControl variant="outlined" sx={{ width: '100%' }} disabled>
  417. <OutlinedInput
  418. size="small"
  419. {...register("phoneNumber",
  420. {
  421. value: currentApplicationDetailData.contactTelNo.phoneNumber,
  422. })}
  423. id='phoneNumber'
  424. sx={{
  425. "& .MuiInputBase-input.Mui-disabled": {
  426. WebkitTextFillColor: "#000000",
  427. background: "#f8f8f8",
  428. },
  429. }}
  430. />
  431. </FormControl>
  432. </Stack>
  433. </Grid>
  434. </Grid>
  435. </Grid>
  436. {
  437. fee > 0 ?
  438. <Grid item xs={12} sm={12} md={9} lg={5} sx={{ mb: 1, ml: 1 }}>
  439. <Grid container alignItems={"center"}>
  440. <Grid item xs={12} md={3} lg={3}
  441. sx={{ display: 'flex', alignItems: 'center' }}>
  442. <FormLabel><Typography variant="pnspsFormParagraph">
  443. <FormattedMessage id="currencyPrice" />(HK$):
  444. </Typography></FormLabel>
  445. </Grid>
  446. <Grid item xs={12} md={9} lg={9}>
  447. <FormLabel><Typography variant="pnspsFormParagraph">{FormatUtils.currencyFormat(fee)}</Typography></FormLabel>
  448. </Grid>
  449. </Grid>
  450. </Grid>
  451. :
  452. <></>
  453. }
  454. </Grid>
  455. <Grid item xs={12} sm={12} md={9} lg={6} sx={{ mb: 1, }}>
  456. <Grid container alignItems={"center"}>
  457. <Grid item xs={12} md={3} lg={3}
  458. sx={{ display: 'flex', alignItems: 'center' }}>
  459. <FormLabel><Typography variant="pnspsFormParagraph">
  460. <FormattedMessage id="userFaxNumber" />:
  461. </Typography></FormLabel>
  462. </Grid>
  463. <Grid item xs={12} sm={12} md={9} lg={9}>
  464. <Stack direction="row">
  465. <FormControl variant="outlined" sx={{ width: '25%' }} disabled>
  466. <OutlinedInput
  467. size="small"
  468. {...register("countryCode",
  469. {
  470. value: currentApplicationDetailData.contactFaxNo.countryCode,
  471. })}
  472. id='countryCode'
  473. sx={{
  474. "& .MuiInputBase-input.Mui-disabled": {
  475. WebkitTextFillColor: "#000000",
  476. background: "#f8f8f8",
  477. },
  478. }}
  479. />
  480. </FormControl>
  481. <FormControl variant="outlined" sx={{ width: '100%' }} disabled>
  482. <OutlinedInput
  483. size="small"
  484. {...register("faxNumber",
  485. {
  486. value: currentApplicationDetailData.contactFaxNo.faxNumber,
  487. })}
  488. id='faxNumber'
  489. sx={{
  490. "& .MuiInputBase-input.Mui-disabled": {
  491. WebkitTextFillColor: "#000000",
  492. background: "#f8f8f8",
  493. },
  494. }}
  495. />
  496. </FormControl>
  497. </Stack>
  498. </Grid>
  499. </Grid>
  500. </Grid>
  501. <Grid container direction="row" justifyContent="space-between"
  502. alignItems="center">
  503. <Grid item xs={12} sm={12} md={11} lg={11} mt={1}>
  504. <Grid container alignItems={"center"}>
  505. <Grid item xs={12} sm={12} md={12} lg={12}>
  506. <Grid container direction="row">
  507. <Grid item xs={12} sm={12} md={2.5} lg={1.6}
  508. sx={{ display: 'flex', alignItems: 'center' }}>
  509. <FormLabel><Typography variant="pnspsFormParagraph">
  510. <FormattedMessage id="draftFile" />:
  511. </Typography></FormLabel>
  512. </Grid>
  513. <Grid item xs={12} sm={12} md={9} lg={9} >
  514. <Grid container direction="row" alignItems="center" justifyContent="flex-start">
  515. <Grid item xs={12} sm={12} md={12} lg={12} sx={{ wordBreak: 'break-word', }}>
  516. <Typography
  517. fullWidth
  518. id='fileName'
  519. variant="pnspsFormParagraph"
  520. >
  521. {fileDetail?.filename}
  522. </Typography>
  523. <ThemeProvider theme={PNSPS_BUTTON_THEME}>
  524. <Button
  525. sx={{ ml: 3 }}
  526. variant="contained"
  527. onClick={onDownloadClick()}
  528. aria-label={intl.formatMessage({ id: 'download' })}
  529. title={intl.formatMessage({ id: 'download' })}
  530. color="save"
  531. disabled={!fileDetail?.filename}
  532. startIcon={<DownloadIcon sx={{ alignItems: "center" }} />}
  533. >
  534. <FormattedMessage id="download" />
  535. </Button>
  536. </ThemeProvider>
  537. </Grid>
  538. </Grid>
  539. </Grid>
  540. </Grid>
  541. </Grid>
  542. </Grid>
  543. </Grid>
  544. </Grid>
  545. {isORGLoggedIn() ?
  546. <Grid item xs={12} md={9} lg={6} sx={{ mb: 1, paddingTop: 2 }}>
  547. <Grid container alignItems={"center"}>
  548. <Grid item xs={12} md={3} lg={3}
  549. sx={{ display: 'flex', alignItems: 'center' }}>
  550. <FormLabel><Typography variant="pnspsFormParagraph">Care Of:</Typography></FormLabel>
  551. </Grid>
  552. <Grid item xs={12} md={9} lg={9}>
  553. <Typography variant="pnspsFormParagraph">{currentApplicationDetailData.careOf}</Typography>
  554. </Grid>
  555. </Grid>
  556. </Grid> : null
  557. }
  558. <Grid item xs={12} md={9} lg={6} sx={{ mb: 1, paddingTop: 2 }}>
  559. <Grid container alignItems={"center"}>
  560. <Grid item xs={12} md={3} lg={3}
  561. sx={{ display: 'flex', alignItems: 'center' }}>
  562. <FormLabel><Typography variant="pnspsFormParagraph">
  563. <FormattedMessage id="extraMark" />:
  564. </Typography></FormLabel>
  565. </Grid>
  566. <Grid item xs={12} md={9} lg={9}>
  567. <Typography variant="pnspsFormParagraph">{currentApplicationDetailData.remarks}</Typography>
  568. </Grid>
  569. </Grid>
  570. </Grid>
  571. </Grid>
  572. </Grid>
  573. <div>
  574. <Dialog
  575. open={isPopUp}
  576. onClose={() => setIsPopUp(false)}
  577. PaperProps={{
  578. sx: {
  579. minWidth: '40vw',
  580. maxWidth: { xs: '90vw', s: '90vw', m: '70vw', lg: '30vw' },
  581. maxHeight: { xs: '90vh', s: '70vh', m: '70vh', lg: '50vh' }
  582. }
  583. }}
  584. >
  585. <DialogTitle>
  586. <Typography variant="h3" >
  587. <FormattedMessage id="payConfirm" />
  588. </Typography>
  589. </DialogTitle>
  590. <DialogContent style={{ display: 'flex', }}>
  591. <Stack direction="column" justifyContent="space-between">
  592. <Typography variant="h4">
  593. <FormattedMessage id="totalAmount" /> (HK$): {FormatUtils.currencyFormat(fee)}
  594. </Typography>
  595. </Stack>
  596. </DialogContent>
  597. <DialogActions>
  598. <Button
  599. onClick={() => setIsPopUp(false)}
  600. aria-label={intl.formatMessage({ id: 'close' })}
  601. >
  602. <Typography variant="pnspsFormParagraph">
  603. <FormattedMessage id="close" />
  604. </Typography></Button>
  605. <Button
  606. onClick={() => doPayment()}
  607. aria-label={intl.formatMessage({ id: 'confirm' })}
  608. >
  609. <Typography variant="pnspsFormParagraph">
  610. <FormattedMessage id="confirm" />
  611. </Typography></Button>
  612. </DialogActions>
  613. </Dialog>
  614. </div>
  615. <div>
  616. <Dialog
  617. open={errorPopUp}
  618. onClose={() => setErrorPopUp(false)}
  619. PaperProps={{
  620. sx: {
  621. minWidth: '40vw',
  622. maxWidth: { xs: '90vw', s: '90vw', m: '70vw', lg: '70vw' },
  623. maxHeight: { xs: '90vh', s: '70vh', m: '70vh', lg: '60vh' }
  624. }
  625. }}
  626. >
  627. <DialogTitle></DialogTitle>
  628. <Typography variant="h2" style={{ padding: '16px' }}>行動失敗</Typography>
  629. <DialogContent style={{ display: 'flex', }}>
  630. <Stack direction="column" justifyContent="space-between">
  631. {
  632. errorText
  633. }
  634. </Stack>
  635. </DialogContent>
  636. <DialogActions>
  637. <Button
  638. onClick={() => setErrorPopUp(false)}
  639. aria-label={intl.formatMessage({ id: 'close' })}
  640. >
  641. <Typography variant="pnspsFormParagraph">
  642. <FormattedMessage id="close" />
  643. </Typography></Button>
  644. </DialogActions>
  645. </Dialog>
  646. </div>
  647. </form>
  648. </MainCard >
  649. );
  650. };
  651. export default ApplicationDetailCard;