diff --git a/src/pages/Payment/MultiPaymentWindow.js b/src/pages/Payment/MultiPaymentWindow.js index 31ac841..4d1aa85 100644 --- a/src/pages/Payment/MultiPaymentWindow.js +++ b/src/pages/Payment/MultiPaymentWindow.js @@ -58,10 +58,13 @@ const MultiPaymentWindow = (props) => { const [paymentHoldedErrText, setPaymentHoldedErrText] = React.useState(""); const [paymentHoldedErr, setPaymentHoldedErr] = React.useState(false); + const mobileBrowser = "Mobile"; + useEffect(() => { // console.log(props.transactionData) if(Object.keys(props.transactionData).length > 0){ setLoadtTransactionData(props.transactionData) + console.log(props.browserType) } }, [props.transactionData]); @@ -336,9 +339,13 @@ const MultiPaymentWindow = (props) => { + {props.browserType==mobileBrowser? + null + : + } @@ -384,26 +391,28 @@ const MultiPaymentWindow = (props) => { : !isLimit? !onReady? : - !isLimit? - filteredPaymentMethod.map((availableMethod) => { - return ( - - { - availableMethod.pointstonote.map((pointstonote) => { - return ( - - - - {pointstonote.content} - + !isLimit? + filteredPaymentMethod.length>0? + filteredPaymentMethod.map((availableMethod) => { + return ( + + { + availableMethod.pointstonote.map((pointstonote) => { + return ( + + + + {pointstonote.content} + + - - ); - }) - } - - ); - }) + ); + }) + } + + ); + }) + : null : null : !onReady? : @@ -433,9 +442,14 @@ const MultiPaymentWindow = (props) => { - + { + props.onPayment? + + : + + }
diff --git a/src/pages/Payment/Search_GLD/index.js b/src/pages/Payment/Search_GLD/index.js index 5fb32ce..dd707e7 100644 --- a/src/pages/Payment/Search_GLD/index.js +++ b/src/pages/Payment/Search_GLD/index.js @@ -62,7 +62,11 @@ const Index = () => { return ( !onReady ? - + + + + + : diff --git a/src/pages/Payment/Search_Public/index.js b/src/pages/Payment/Search_Public/index.js index 0871149..0762a29 100644 --- a/src/pages/Payment/Search_Public/index.js +++ b/src/pages/Payment/Search_Public/index.js @@ -63,7 +63,11 @@ const Index = () => { return ( !onReady ? - + + + + + : diff --git a/src/pages/Payment/index.js b/src/pages/Payment/index.js index eefedba..2aa091d 100644 --- a/src/pages/Payment/index.js +++ b/src/pages/Payment/index.js @@ -64,10 +64,15 @@ const Index = () => { const [itemList, setItemList] = useState([]); const [onReady, setOnReady] = useState(false); + const [onPayment, setOnPayment] = useState(false); const [isFullScreen, setIsFullScreen] = useState(false); - + const [expiryDateErrText, setExpiryDateErrText] = React.useState(""); const [expiryDateErr, setExpiryDateErr] = React.useState(false); + + const [browserType, setBrowserType] = React.useState(""); + const mobileBrowser = "Mobile"; + const desktopBrowser = "Desktop"; useEffect(() => { setAppIds(location.state?.appIdList ?? []) @@ -77,8 +82,10 @@ const Index = () => { localStorage.removeItem("paymentId"); if (Utils.getBowserType() === "PC_Browser"){ setIsFullScreen(false) + setBrowserType(desktopBrowser) } else { setIsFullScreen(true) + setBrowserType(mobileBrowser) } }, []); @@ -107,6 +114,7 @@ const Index = () => { useEffect(() => { if (afterConfirmPayment) { + setOnPayment(true) // setOpen(false); // let transactionid = ""; // let webtoken = ""; @@ -152,6 +160,7 @@ const Index = () => { onSuccess: function (responData) { localStorage.removeItem("paymentId"); localStorage.setItem("paymentId", responData.id) + setOnPayment(false) navigate(page, stateParams); } }); @@ -542,6 +551,8 @@ const Index = () => { isFullScreen={isFullScreen} appIds={appIds} // appNo={itemList.appNo} + browserType={browserType} + onPayment={onPayment} /> ); diff --git a/src/pages/Proof/Search_GLD/index.js b/src/pages/Proof/Search_GLD/index.js index 6d16d41..1e645d0 100644 --- a/src/pages/Proof/Search_GLD/index.js +++ b/src/pages/Proof/Search_GLD/index.js @@ -96,8 +96,7 @@ const UserSearchPage_Individual = () => { : - +
diff --git a/src/pages/Proof/Search_Public/index.js b/src/pages/Proof/Search_Public/index.js index b141da9..6a6989f 100644 --- a/src/pages/Proof/Search_Public/index.js +++ b/src/pages/Proof/Search_Public/index.js @@ -78,7 +78,11 @@ const UserSearchPage_Individual = () => { return ( !onReady ? - + + + + + : diff --git a/src/pages/PublicNotice/ApplyForm/PublicNoticeApplyForm.js b/src/pages/PublicNotice/ApplyForm/PublicNoticeApplyForm.js index c961093..e05f775 100644 --- a/src/pages/PublicNotice/ApplyForm/PublicNoticeApplyForm.js +++ b/src/pages/PublicNotice/ApplyForm/PublicNoticeApplyForm.js @@ -24,6 +24,9 @@ import { notifyActionSuccess } from 'utils/CommonFunction'; import {PNSPS_LONG_BUTTON_THEME} from "../../../themes/buttonConst"; import {ThemeProvider} from "@emotion/react"; import {FormattedMessage, useIntl} from "react-intl"; +import Loadable from 'components/Loadable'; +import { lazy } from 'react'; +const LoadingComponent = Loadable(lazy(() => import('../../extra-pages/LoadingComponent'))); // ==============================|| DASHBOARD - DEFAULT ||============================== // @@ -36,6 +39,7 @@ const PublicNoticeApplyForm = ({ loadedData, _selections }) => { const [val, setVal] = React.useState({}); const [reloadPage, setReloadPage] = React.useState(false); + const [isSubmitting, setSubmitting] = React.useState(false); const [issueId, setIssueId] = React.useState(loadedData.issueId); const navigate = useNavigate(); @@ -114,6 +118,7 @@ const PublicNoticeApplyForm = ({ loadedData, _selections }) => { }); const apply = (values)=>{ + setSubmitting(true) HttpUtils.postWithFiles({ url: UrlUtils.POST_PUBLIC_NOTICE_APPLY, params: { @@ -140,6 +145,7 @@ const PublicNoticeApplyForm = ({ loadedData, _selections }) => { setIsWarningPopUp(true); return; } + setSubmitting(false) notifyActionSuccess(intl.formatMessage({id: 'submissionSuccess'}) + '!') navigate("/publicNotice"); // location.reload(); @@ -190,152 +196,159 @@ const PublicNoticeApplyForm = ({ loadedData, _selections }) => { {/* 申請公共啟事 */} - - -
- - - {FieldUtils.getTextField({ - label: intl.formatMessage({id: 'contactPerson'}) + ":", - valueName: "contactPerson", - form: formik, - disabled: true - })} - - - {FieldUtils.getPhoneField({ - label: intl.formatMessage({id: 'userContactNumber'}) + ":", - disabled: true, - valueName: { - code: "tel_countryCode", - num: "phoneNumber", - }, - form: formik - })} - - - {FieldUtils.getPhoneField({ - label: intl.formatMessage({id: 'contactFaxNumber'}) + ":", - disabled: true, - valueName: { - code: "fax_countryCode", - num: "faxNumber", - }, - form: formik - })} - - - - - - : - + { + isSubmitting ? + + + + : + + + + + + {FieldUtils.getTextField({ + label: intl.formatMessage({id: 'contactPerson'}) + ":", + valueName: "contactPerson", + form: formik, + disabled: true + })} - - { - setIssueId(event.target.value); - }} - > - { - selections - } - + + {FieldUtils.getPhoneField({ + label: intl.formatMessage({id: 'userContactNumber'}) + ":", + disabled: true, + valueName: { + code: "tel_countryCode", + num: "phoneNumber", + }, + form: formik + })} - - - - - - - ({intl.formatMessage({id: 'fileSizeWarning'})}): - + + {FieldUtils.getPhoneField({ + label: intl.formatMessage({id: 'contactFaxNumber'}) + ":", + disabled: true, + valueName: { + code: "fax_countryCode", + num: "faxNumber", + }, + form: formik + })} - - { - readFile(event) - }} - /> - {attachment.name} + + + + + : + + + + { + setIssueId(event.target.value); + }} + > + { + selections + } + + + - {/* - - */} - - - - - + + + + + ({intl.formatMessage({id: 'fileSizeWarning'})}): + + + + { + readFile(event) + }} + /> + {attachment.name} + + {/* + + */} + - - + + + + + + + + + + - + {isORGLoggedIn()? + + {FieldUtils.getTextField({ + label: intl.formatMessage({id: 'careOf'}) + ":", + valueName: "careOf", + form: formik, + // disabled: true + })} + :null + } + + {FieldUtils.getTextArea({ + label: intl.formatMessage({id: 'extraMark'}) + ":", + valueName: "remarks", + form: formik, + inputProps: { maxLength: 255 } + })} + + +
+ + + +
-
- {isORGLoggedIn()? - - {FieldUtils.getTextField({ - label: intl.formatMessage({id: 'careOf'}) + ":", - valueName: "careOf", - form: formik, - // disabled: true - })} - :null - } - - {FieldUtils.getTextArea({ - label: intl.formatMessage({id: 'extraMark'}) + ":", - valueName: "remarks", - form: formik, - inputProps: { maxLength: 255 } - })} - - -
- - - -
-
-
- -
-
+ +
+
+ }
{ fee > 0 ? - + diff --git a/src/pages/PublicNotice/Details_Public/index.js b/src/pages/PublicNotice/Details_Public/index.js index 60b4b68..289e471 100644 --- a/src/pages/PublicNotice/Details_Public/index.js +++ b/src/pages/PublicNotice/Details_Public/index.js @@ -162,7 +162,7 @@ const DashboardDefault = () => { - +