diff --git a/src/pages/GFMIS/SearchForm.js b/src/pages/GFMIS/SearchForm.js index 7f9bebc..d72d037 100644 --- a/src/pages/GFMIS/SearchForm.js +++ b/src/pages/GFMIS/SearchForm.js @@ -8,7 +8,7 @@ import { import MainCard from "components/MainCard"; import { useForm } from "react-hook-form"; import * as React from "react"; -import * as DateUtils from "utils/DateUtils"; +// import * as DateUtils from "utils/DateUtils"; import {PNSPS_BUTTON_THEME} from "../../themes/buttonConst"; import {ThemeProvider} from "@emotion/react"; // import * as ComboData from "utils/ComboData"; @@ -17,8 +17,8 @@ import {ThemeProvider} from "@emotion/react"; const SearchPublicNoticeForm = ({ applySearch, generateXML, searchCriteria }) => { - const [minDate, setMinDate] = React.useState(searchCriteria.dateFrom); - const [maxDate, setMaxDate] = React.useState(searchCriteria.dateTo); + // const [minDate, setMinDate] = React.useState(searchCriteria.dateFrom); + const [maxDate] = React.useState(searchCriteria.dateFrom); // const [status, setStatus] = React.useState(ComboData.paymentStatus[0]); const { register, handleSubmit, getValues } = useForm() @@ -71,12 +71,12 @@ const SearchPublicNoticeForm = ({ applySearch, generateXML, searchCriteria }) => {...register("dateFrom")} id="dateFrom" type="date" - label="From" + label="Credit Date" defaultValue={searchCriteria.dateFrom} InputProps={{ inputProps: { max: maxDate } }} - onChange={(newValue) => { - setMinDate(DateUtils.dateStr(newValue)); - }} + // onChange={(newValue) => { + // setMinDate(DateUtils.dateStr(newValue)); + // }} InputLabelProps={{ shrink: true }} @@ -84,7 +84,7 @@ const SearchPublicNoticeForm = ({ applySearch, generateXML, searchCriteria }) => - type="date" label="To" defaultValue={searchCriteria.dateTo} - /> + /> */} {/* diff --git a/src/pages/GFMIS/index.js b/src/pages/GFMIS/index.js index 8ca5719..8a59eea 100644 --- a/src/pages/GFMIS/index.js +++ b/src/pages/GFMIS/index.js @@ -32,8 +32,8 @@ const Index = () => { const [record,setRecord] = React.useState([]); const [searchCriteria, setSearchCriteria] = React.useState({ - dateTo: DateUtils.dateStr(new Date()), - dateFrom: DateUtils.dateStr(new Date().setDate(new Date().getDate()-14)), + dateFrom: DateUtils.dateStr(new Date()), + // dateFrom: DateUtils.dateStr(new Date().setDate(new Date().getDate()-14)), }); const [onReady, setOnReady] = React.useState(false); @@ -60,7 +60,8 @@ const Index = () => { // console.log(input) HttpUtils.get({ url: UrlUtils.GEN_GFMIS_XML + "/today", - params:{dateTo: input.dateTo, + params:{ + // dateTo: input.dateTo, dateFrom: input.dateFrom, }, onSuccess: (responseData) => { @@ -122,7 +123,7 @@ const Index = () => { !onReady ? : - +
diff --git a/src/pages/Payment/MultiPaymentWindow.js b/src/pages/Payment/MultiPaymentWindow.js index 8d846e4..a2bd5cd 100644 --- a/src/pages/Payment/MultiPaymentWindow.js +++ b/src/pages/Payment/MultiPaymentWindow.js @@ -3,6 +3,7 @@ import { useState } from "react"; import * as React from "react"; +import {getBowserType} from "auth/utils"; // material-ui import { @@ -111,8 +112,15 @@ const MultiPaymentWindow = (props) => { }, [paymentMethod]); const selectedPaymentMethodHandle = (method) => () =>{ - setPaymentMethod(method) - props.setSelectedPaymentMethod(method); + console.log(getBowserType()) + if (getBowserType() === "PC_Browser"){ + setPaymentMethod(method) + props.setSelectedPaymentMethod(method); + } + if (getBowserType() !== "PC_Browser" && method !== "PPS"){ + setPaymentMethod(method) + props.setSelectedPaymentMethod(method); + } }; const confirmPaymentHandle = () => () =>{ diff --git a/src/pages/Payment/index.js b/src/pages/Payment/index.js index db89bcc..fc14f42 100644 --- a/src/pages/Payment/index.js +++ b/src/pages/Payment/index.js @@ -23,7 +23,10 @@ import { import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png' import {ThemeProvider} from "@emotion/react"; import {PNSPS_BUTTON_THEME} from "../../themes/buttonConst"; -import {FormattedMessage,useIntl} from "react-intl"; +import { + FormattedMessage, + // useIntl +} from "react-intl"; const BackgroundHead = { backgroundImage: `url(${titleBackgroundImg})`, width: '100%', @@ -35,15 +38,15 @@ const BackgroundHead = { } const Index = () => { - const getAvailablePaymentUrl = "/api/payment/availability"; + // const getAvailablePaymentUrl = "/api/payment/availability"; const getTransactionIdUrl = "/api/payment/transaction"; const navigate = useNavigate() const location = useLocation(); - const intl = useIntl(); - const { locale } = intl; + // const intl = useIntl(); + // const { locale } = intl; - const local = {en:"en-us", zh:"zh-hk", cn:"zh-cn"}; - const preferpaymentmethods = ['visa', 'mastercard', 'pps', 'creditcard', 'fps']; + // const local = {en:"en-us", zh:"zh-hk", cn:"zh-cn"}; + // const preferpaymentmethods = ['visa', 'mastercard', 'pps', 'creditcard', 'fps']; const [totalAmount, setTotalAmount] = useState(0); const [appIds, setAppIds] = useState([]); @@ -151,153 +154,153 @@ const Index = () => { }, [afterConfirmPayment]); const getAvailablePayment = () =>{ - HttpUtils.post({ - url: paymentPath + getAvailablePaymentUrl, - params: { - "locale": locale === 'en' ?local.en:locale === 'zh-HK' ?local.zh:local.cn, - "amount": totalAmount, - // "eserviceids": [ - // "", "" - // ], - "preferpaymentmethods": preferpaymentmethods - }, - onSuccess: (responseData) => { - let availableMethods = responseData.availablepaymentmethods; - setAvailableMethods(availableMethods); + // HttpUtils.post({ + // url: paymentPath + getAvailablePaymentUrl, + // params: { + // "locale": locale === 'en' ?local.en:locale === 'zh-HK' ?local.zh:local.cn, + // "amount": totalAmount, + // // "eserviceids": [ + // // "", "" + // // ], + // "preferpaymentmethods": preferpaymentmethods + // }, + // onSuccess: (responseData) => { + // let availableMethods = responseData.availablepaymentmethods; + // setAvailableMethods(availableMethods); - }, - onError: () =>{ - setOnReady(true) - } - }); + // }, + // onError: () =>{ + // setOnReady(true) + // } + // }); - // const responseData = { - // "availablepaymentmethods": [ - // { - // "active": "Y", - // "code": "04,BCFP,FPS", - // "pointstonote": [ - // { - // "content": "Please take note of the transaction reference number or PRINT this page for making enquiry on the payment status when necessary.", - // "order": 10, - // "type": "INFO" - // }, - // { - // "content": "After pressing the 'Pay' button, please DO NOT leave this e-service until you receive the acknowledgement page, otherwise your transaction may not be successful.", - // "order": 11, - // "type": "INFO" - // } - // ], - // "subtype": "FPS" - // }, - // { - // "active": "Y", - // "code": "02,BCMP,CreditCard", - // "pointstonote": [ - // { - // "content": "Please take note of the transaction reference number or PRINT this page for making enquiry on the payment status when necessary.", - // "order": 10, - // "type": "INFO" - // }, - // { - // "content": "After pressing the 'Pay' button, please DO NOT leave this e-service until you receive the acknowledgement page, otherwise your transaction may not be successful.", - // "order": 11, - // "type": "INFO" - // }, - // { - // "content": "Merchant Name is applicable to credit card payment method only.", - // "order": 40, - // "type": "INFO" - // }, - // { - // "content": "Under exceptional conditions, a refund may need to be arranged. If the payment is made by Credit Card, the refund can normally be made to the Credit Card account that is used for the payment.", - // "order": 41, - // "type": "INFO" - // }, - // { - // "content": "Some users may receive an error page or have to wait for several minutes before they get a response from the credit card payment gateway. If you experience such a problem, please wait a moment and retry, or change to use other available payment methods. We apologise for any inconvenience caused.", - // "order": 42, - // "type": "INFO" - // }, - // { - // "content": "Different credit card issuers may have implemented different mechanisms to authenticate the cardholder's identity during online payment. Please contact your card issuer if you want to learn more about the J/Secure, MasterCard SecureCode and Verified by Visa service. ", - // "order": 43, - // "type": "INFO" - // } - // ], - // "subtype": "CreditCard", - // "supportedcard": [ - // "JCB", - // "MasterCard", - // "Visa" - // ] - // }, - // { - // "active": "Y", - // "code": "03,BCMP,CreditCard", - // "pointstonote": [ - // { - // "content": "Please take note of the transaction reference number or PRINT this page for making enquiry on the payment status when necessary.", - // "order": 10, - // "type": "INFO" - // }, - // { - // "content": "After pressing the 'Pay' button, please DO NOT leave this e-service until you receive the acknowledgement page, otherwise your transaction may not be successful.", - // "order": 11, - // "type": "INFO" - // }, - // { - // "content": "Merchant Name is applicable to credit card payment method only.", - // "order": 40, - // "type": "INFO" - // }, - // { - // "content": "Under exceptional conditions, a refund may need to be arranged. If the payment is made by Credit Card, the refund can normally be made to the Credit Card account that is used for the payment.", - // "order": 41, - // "type": "INFO" - // }, - // { - // "content": "Some users may receive an error page or have to wait for several minutes before they get a response from the credit card payment gateway. If you experience such a problem, please wait a moment and retry, or change to use other available payment methods. We apologise for any inconvenience caused.", - // "order": 42, - // "type": "INFO" - // }, - // { - // "content": "Different credit card issuers may have implemented different mechanisms to authenticate the cardholder's identity during online payment. Please contact your card issuer if you want to learn more about the J/Secure, MasterCard SecureCode and Verified by Visa service. ", - // "order": 43, - // "type": "INFO" - // } - // ], - // "subtype": "CreditCard", - // "supportedcard": [ - // "UnionPay" - // ] - // }, - // { - // "active": "Y", - // "code": "01,PPSB,PPS", - // "pointstonote": [ - // { - // "content": "Please take note of the transaction reference number or PRINT this page for making enquiry on the payment status when necessary.", - // "order": 10, - // "type": "INFO" - // }, - // { - // "content": "After pressing the 'Pay' button, please DO NOT leave this e-service until you receive the acknowledgement page, otherwise your transaction may not be successful.", - // "order": 11, - // "type": "INFO" - // }, - // { - // "content": "PPS Shop&Buy (PPS) does not support payment via browsers of mobile devices (including mobile phones and tablets) at the moment. If you wish to pay by PPS, please change to use desktop computer. ", - // "order": 21, - // "type": "INFO" - // } - // ], - // "subtype": "PPS" - // } - // ] - // }; - // let availableMethods = responseData.availablepaymentmethods; - // setAvailableMethods(availableMethods); + const responseData = { + "availablepaymentmethods": [ + { + "active": "Y", + "code": "04,BCFP,FPS", + "pointstonote": [ + { + "content": "Please take note of the transaction reference number or PRINT this page for making enquiry on the payment status when necessary.", + "order": 10, + "type": "INFO" + }, + { + "content": "After pressing the 'Pay' button, please DO NOT leave this e-service until you receive the acknowledgement page, otherwise your transaction may not be successful.", + "order": 11, + "type": "INFO" + } + ], + "subtype": "FPS" + }, + { + "active": "Y", + "code": "02,BCMP,CreditCard", + "pointstonote": [ + { + "content": "Please take note of the transaction reference number or PRINT this page for making enquiry on the payment status when necessary.", + "order": 10, + "type": "INFO" + }, + { + "content": "After pressing the 'Pay' button, please DO NOT leave this e-service until you receive the acknowledgement page, otherwise your transaction may not be successful.", + "order": 11, + "type": "INFO" + }, + { + "content": "Merchant Name is applicable to credit card payment method only.", + "order": 40, + "type": "INFO" + }, + { + "content": "Under exceptional conditions, a refund may need to be arranged. If the payment is made by Credit Card, the refund can normally be made to the Credit Card account that is used for the payment.", + "order": 41, + "type": "INFO" + }, + { + "content": "Some users may receive an error page or have to wait for several minutes before they get a response from the credit card payment gateway. If you experience such a problem, please wait a moment and retry, or change to use other available payment methods. We apologise for any inconvenience caused.", + "order": 42, + "type": "INFO" + }, + { + "content": "Different credit card issuers may have implemented different mechanisms to authenticate the cardholder's identity during online payment. Please contact your card issuer if you want to learn more about the J/Secure, MasterCard SecureCode and Verified by Visa service. ", + "order": 43, + "type": "INFO" + } + ], + "subtype": "CreditCard", + "supportedcard": [ + "JCB", + "MasterCard", + "Visa" + ] + }, + { + "active": "Y", + "code": "03,BCMP,CreditCard", + "pointstonote": [ + { + "content": "Please take note of the transaction reference number or PRINT this page for making enquiry on the payment status when necessary.", + "order": 10, + "type": "INFO" + }, + { + "content": "After pressing the 'Pay' button, please DO NOT leave this e-service until you receive the acknowledgement page, otherwise your transaction may not be successful.", + "order": 11, + "type": "INFO" + }, + { + "content": "Merchant Name is applicable to credit card payment method only.", + "order": 40, + "type": "INFO" + }, + { + "content": "Under exceptional conditions, a refund may need to be arranged. If the payment is made by Credit Card, the refund can normally be made to the Credit Card account that is used for the payment.", + "order": 41, + "type": "INFO" + }, + { + "content": "Some users may receive an error page or have to wait for several minutes before they get a response from the credit card payment gateway. If you experience such a problem, please wait a moment and retry, or change to use other available payment methods. We apologise for any inconvenience caused.", + "order": 42, + "type": "INFO" + }, + { + "content": "Different credit card issuers may have implemented different mechanisms to authenticate the cardholder's identity during online payment. Please contact your card issuer if you want to learn more about the J/Secure, MasterCard SecureCode and Verified by Visa service. ", + "order": 43, + "type": "INFO" + } + ], + "subtype": "CreditCard", + "supportedcard": [ + "UnionPay" + ] + }, + { + "active": "Y", + "code": "01,PPSB,PPS", + "pointstonote": [ + { + "content": "Please take note of the transaction reference number or PRINT this page for making enquiry on the payment status when necessary.", + "order": 10, + "type": "INFO" + }, + { + "content": "After pressing the 'Pay' button, please DO NOT leave this e-service until you receive the acknowledgement page, otherwise your transaction may not be successful.", + "order": 11, + "type": "INFO" + }, + { + "content": "PPS Shop&Buy (PPS) does not support payment via browsers of mobile devices (including mobile phones and tablets) at the moment. If you wish to pay by PPS, please change to use desktop computer. ", + "order": 21, + "type": "INFO" + } + ], + "subtype": "PPS" + } + ] + }; + let availableMethods = responseData.availablepaymentmethods; + setAvailableMethods(availableMethods); } useEffect(() => { diff --git a/src/pages/authentication/ForgotUsername/ForgotUsernameApplyForm.js b/src/pages/authentication/ForgotUsername/ForgotUsernameApplyForm.js index 281a3e2..e768894 100644 --- a/src/pages/authentication/ForgotUsername/ForgotUsernameApplyForm.js +++ b/src/pages/authentication/ForgotUsername/ForgotUsernameApplyForm.js @@ -86,7 +86,7 @@ const ForgotUsernameApplyForm = () => {
- +
diff --git a/src/pages/authentication/auth-forms/AuthLoginCustom.js b/src/pages/authentication/auth-forms/AuthLoginCustom.js index 20964b7..016cd96 100644 --- a/src/pages/authentication/auth-forms/AuthLoginCustom.js +++ b/src/pages/authentication/auth-forms/AuthLoginCustom.js @@ -319,52 +319,65 @@ const AuthLoginCustom = () => { - - - - - - - - - ? - - - - - ? - - - + + + + + + + + + + + ? + + + + | + + + + ? + + + + + - - - - - - - - { intl.formatMessage({id: 'learnMore'})+" >"} - - + + + + + + + + + + + { intl.formatMessage({id: 'learnMore'})+" >"} + + + + +