diff --git a/src/pages/Proof/Reply_Public/ProofForm.js b/src/pages/Proof/Reply_Public/ProofForm.js
index b0ee8e0..9b22a44 100644
--- a/src/pages/Proof/Reply_Public/ProofForm.js
+++ b/src/pages/Proof/Reply_Public/ProofForm.js
@@ -26,7 +26,10 @@ import { notifyActionSuccess } from 'utils/CommonFunction';
import { PNSPS_BUTTON_THEME } from "themes/buttonConst";
import { ThemeProvider } from "@emotion/react";
import { FormattedMessage, useIntl } from "react-intl";
-import { isDummyLoggedIn } from "utils/Utils"
+import {
+ isDummyLoggedIn,
+ checkIsOnlyOnlinePayment
+ } from "utils/Utils"
const UploadFileTable = Loadable(React.lazy(() => import('./UploadFileTable')));
//import * as ProofStatus from "utils/statusUtils/ProofStatus";
@@ -46,6 +49,7 @@ const FormPanel = ({ formData }) => {
const [warningTitle, setWarningTitle] = React.useState("");
const [isWarningPopUp, setIsWarningPopUp] = React.useState(false);
const [warningText, setWarningText] = React.useState("");
+ const [isOnlyOnlinePayment, setOnlyOnlinePayment] = React.useState();
const navigate = useNavigate()
const params = useParams();
@@ -61,6 +65,7 @@ const FormPanel = ({ formData }) => {
React.useEffect(() => {
if (formData) {
setData(formData);
+ setOnlyOnlinePayment(checkIsOnlyOnlinePayment(formData.issueDate))
if (isDummyLoggedIn()) {
set_paymentMethod("demandNote")
}
@@ -461,90 +466,94 @@ const FormPanel = ({ formData }) => {
}} />
-
-
- {isOverDnReviseDeadline() ?
- <>> :
- {
- set_paymentMethod("demandNote")
- }}
- />
- }
- |
-
-
- {
- setWarningTitle(intl.formatMessage({ id: "paymentMeans" }) + ": " + intl.formatMessage({ id: "payDn" }))
- setWarningText(
- <>:
-
-
-
-
- >
- );
- setIsWarningPopUp(true);
- }}>
- |
- {DateUtils.dateFormat(formData.closingDateOff, intl.formatMessage({ id: "dateStrFormat" }))} {locale ==='en'?"5:00 p.m.":"下午5時"} |
- {DateUtils.dateFormat(formData.closingDateOff, intl.formatMessage({ id: "dateStrFormat" }))} {locale ==='en'?"5:00 p.m.":"下午5時"} |
-
-
- |
-
-
-
-
- {
- isOverNpgoReviseDeadline() ?
- <>> :
- {
- set_paymentMethod("office")
- }}
- />
- }
- |
-
-
- {
- setWarningTitle(intl.formatMessage({ id: "paymentMeans" }) + ": " + intl.formatMessage({ id: "payNPGOPopUpTitle" }))
- setWarningText(
- <>:
-
- >
- );
- setIsWarningPopUp(true);
- }}>
- |
- {DateUtils.dateFormat(formData.closingDate, intl.formatMessage({ id: "dateStrFormat" }))} {locale ==='en'?"11:30 a.m.":"上午11時30分"} |
- {DateUtils.dateFormat(formData.closingDate, intl.formatMessage({ id: "dateStrFormat" }))} {locale ==='en'?"12:00 p.m.":"下午12時"} |
-
-
- |
-
+ {!isOnlyOnlinePayment?
+ <>
+
+
+ {isOverDnReviseDeadline() ?
+ <>> :
+ {
+ set_paymentMethod("demandNote")
+ }}
+ />
+ }
+ |
+
+
+ {
+ setWarningTitle(intl.formatMessage({ id: "paymentMeans" }) + ": " + intl.formatMessage({ id: "payDn" }))
+ setWarningText(
+ <>:
+
+
+
+
+ >
+ );
+ setIsWarningPopUp(true);
+ }}>
+ |
+ {DateUtils.dateFormat(formData.closingDateOff, intl.formatMessage({ id: "dateStrFormat" }))} {locale ==='en'?"5:00 p.m.":"下午5時"} |
+ {DateUtils.dateFormat(formData.closingDateOff, intl.formatMessage({ id: "dateStrFormat" }))} {locale ==='en'?"5:00 p.m.":"下午5時"} |
+
+
+ |
+
+
+
+
+ {
+ isOverNpgoReviseDeadline() ?
+ <>> :
+ {
+ set_paymentMethod("office")
+ }}
+ />
+ }
+ |
+
+
+ {
+ setWarningTitle(intl.formatMessage({ id: "paymentMeans" }) + ": " + intl.formatMessage({ id: "payNPGOPopUpTitle" }))
+ setWarningText(
+ <>:
+
+ >
+ );
+ setIsWarningPopUp(true);
+ }}>
+ |
+ {DateUtils.dateFormat(formData.closingDate, intl.formatMessage({ id: "dateStrFormat" }))} {locale ==='en'?"11:30 a.m.":"上午11時30分"} |
+ {DateUtils.dateFormat(formData.closingDate, intl.formatMessage({ id: "dateStrFormat" }))} {locale ==='en'?"12:00 p.m.":"下午12時"} |
+
+
+ |
+
+ >:null
+ }
diff --git a/src/pages/PublicNotice/ApplyForm/PublicNoticeApplyForm.js b/src/pages/PublicNotice/ApplyForm/PublicNoticeApplyForm.js
index 11e6021..bffd396 100644
--- a/src/pages/PublicNotice/ApplyForm/PublicNoticeApplyForm.js
+++ b/src/pages/PublicNotice/ApplyForm/PublicNoticeApplyForm.js
@@ -33,7 +33,7 @@ const LoadingComponent = Loadable(lazy(() => import('../../extra-pages/LoadingCo
// ==============================|| DASHBOARD - DEFAULT ||============================== //
-const PublicNoticeApplyForm = ({ loadedData, _selections, gazetteIssueList }) => {
+const PublicNoticeApplyForm = ({ loadedData, _selections, gazetteIssueList, isOnlyOnlinePayment }) => {
const [isWarningPopUp, setIsWarningPopUp] = useState(false);
const [warningTitle, setWarningTitle] = useState("");
const [warningText, setWarningText] = useState("");
@@ -383,62 +383,66 @@ const PublicNoticeApplyForm = ({ loadedData, _selections, gazetteIssueList }) =>
}} />
-
-
- {
- setWarningTitle(intl.formatMessage({ id: "paymentMeans" }) + ": " + intl.formatMessage({ id: "payDn" }))
- setWarningText(
- <>:
-
-
-
-
- >
- );
- setIsWarningPopUp(true);
- }}>
- |
- {DateUtils.dateFormat(closingDateOff, dft)} {locale==='en'?"5:00 p.m.":"下午5時"} |
-
-
- |
-
-
-
- {
- setWarningTitle(intl.formatMessage({ id: "paymentMeans" }) + ": " + intl.formatMessage({ id: "payNPGOPopUpTitle" }))
- setWarningText(
- <>:
-
- >
- );
- setIsWarningPopUp(true);
- }}>
- |
- {DateUtils.dateFormat(closeDate, dft)} {locale==='en'?"12:00 p.m.":"下午12時"} |
-
-
- |
-
+ {!isOnlyOnlinePayment?
+ <>
+
+
+ {
+ setWarningTitle(intl.formatMessage({ id: "paymentMeans" }) + ": " + intl.formatMessage({ id: "payDn" }))
+ setWarningText(
+ <>:
+
+
+
+
+ >
+ );
+ setIsWarningPopUp(true);
+ }}>
+ |
+ {DateUtils.dateFormat(closingDateOff, dft)} {locale==='en'?"5:00 p.m.":"下午5時"} |
+
+
+ |
+
+
+
+ {
+ setWarningTitle(intl.formatMessage({ id: "paymentMeans" }) + ": " + intl.formatMessage({ id: "payNPGOPopUpTitle" }))
+ setWarningText(
+ <>:
+
+ >
+ );
+ setIsWarningPopUp(true);
+ }}>
+ |
+ {DateUtils.dateFormat(closeDate, dft)} {locale==='en'?"12:00 p.m.":"下午12時"} |
+
+
+ |
+
+ >:null
+ }
diff --git a/src/pages/PublicNotice/ApplyForm/index.js b/src/pages/PublicNotice/ApplyForm/index.js
index 74c581b..ba36ace 100644
--- a/src/pages/PublicNotice/ApplyForm/index.js
+++ b/src/pages/PublicNotice/ApplyForm/index.js
@@ -20,6 +20,7 @@ const PublicNoticeApplyForm = Loadable(lazy(() => import('./PublicNoticeApplyFor
import {
// isORGLoggedIn,
isDummyLoggedIn,
+ checkIsOnlyOnlinePayment
// isCreditorLoggedIn
} from "utils/Utils";
// ==============================|| DASHBOARD - DEFAULT ||============================== //
@@ -29,6 +30,7 @@ const ApplyForm = () => {
const [gazetteIssueList, setGazetteIssueList] = React.useState([]);
const [selections, setSelection] = React.useState([]);
+ const [isOnlyOnlinePayment, setOnlyOnlinePayment] = React.useState();
const [isLoading, setLoding] = React.useState(true);
const intl = useIntl();
@@ -64,6 +66,7 @@ const ApplyForm = () => {
setGazetteIssueList(response?.gazetteIssueList);
setSelection(selection);
setUserData(response);
+ setOnlyOnlinePayment(checkIsOnlyOnlinePayment(response?.gazetteIssueList[0].issueDate))
}
});
};
@@ -106,8 +109,11 @@ const ApplyForm = () => {
React.useEffect(() => {
- if (userData !== null) setLoding(false);
- }, [userData]);
+ if (userData !== null&& isOnlyOnlinePayment !== null){
+ setLoding(false);
+ // console.log(isOnlyOnlinePayment)
+ }
+ }, [userData,isOnlyOnlinePayment]);
return (
isLoading ?
@@ -121,6 +127,7 @@ const ApplyForm = () => {
loadedData={userData}
_selections={selections}
gazetteIssueList = {gazetteIssueList}
+ isOnlyOnlinePayment = {isOnlyOnlinePayment}
/>
);
};
diff --git a/src/utils/Utils.js b/src/utils/Utils.js
index 4923a10..b14ee03 100644
--- a/src/utils/Utils.js
+++ b/src/utils/Utils.js
@@ -181,4 +181,19 @@ export const isPasswordExpiry = () =>{
return false;
}
+}
+
+export const checkIsOnlyOnlinePayment = (date) => {
+ const targetDate = new Date("2026-01-28")
+ const checkDate = DateUtils.convertToDate(date)
+ if (isDummyLoggedIn()){
+ return false;
+ }
+ // console.log(checkDate)
+ // console.log(targetDate)
+ if (checkDate >= targetDate) {
+ return true
+ } else {
+ return false;
+ }
}
\ No newline at end of file