From 8d2c079ac05b89c56f4dd2cc4ee490544a01ed1e Mon Sep 17 00:00:00 2001 From: Alex Cheung Date: Mon, 8 Jan 2024 12:34:59 +0800 Subject: [PATCH] fix proof A2 --- src/pages/Payment/FPS/FPS.js | 22 +++++++++++++++++-- src/pages/Payment/MultiPaymentWindow.js | 17 ++++++++------ .../Proof/Reply_GLD/ApplicationDetails.js | 2 +- src/pages/Proof/Reply_GLD/index.js | 2 +- .../Proof/Reply_Public/ApplicationDetails.js | 2 +- src/pages/Proof/Reply_Public/ProofForm.js | 4 ++-- src/pages/Proof/Reply_Public/index.js | 2 +- 7 files changed, 36 insertions(+), 15 deletions(-) diff --git a/src/pages/Payment/FPS/FPS.js b/src/pages/Payment/FPS/FPS.js index df5b2a6..a33ec73 100644 --- a/src/pages/Payment/FPS/FPS.js +++ b/src/pages/Payment/FPS/FPS.js @@ -44,11 +44,12 @@ const Index = () => { const [timeDownCount, setTimeDownCount] = React.useState(0); const [paymentId, setPaymentId] = React.useState(""); const [fpsqrcodeurl, setFpsqrcodeurl] = React.useState(""); + const [fpsqrcodeurlPrd, setFpsqrcodeurlPrd] = React.useState(""); const [browserType, setBrowserType] = React.useState(""); const mobileBrowser = "Mobile"; const desktopBrowser = "Desktop"; - // const pasgPath = 'https://fps.payapps.hkicl.com.hk'; //PRD + const pasgPathPrd = 'https://fps.payapps.hkicl.com.hk'; //PRD const pasgPath = 'https://sim.fps.payapps.hkicl.com.hk'; //Testing const loadPaymentUrl = "/api/payment/wallet/fps"; const cancelPaymentUrl = "/api/payment/cancelpayment"; @@ -162,7 +163,10 @@ const Index = () => { // const fpsqrcodeurl = parsedUrl.pathname; const openPASGUrl = pasgPath + '?pay_req_obj=' + encodeURIComponent(responseData.fpsqrcodeurl) + '&callback=' + encodeURIComponent("https://"+window.location.hostname+ '/paymentPage/fps/fpscallback?TRANSACTION_ID='+paymentData.transactionid+"&WEB_TOKEN="+paymentData.webtoken+"&PAYMENT_ID="+localStorage.getItem("paymentId")); + const openPASGUrlPrd = pasgPathPrd + '?pay_req_obj=' + encodeURIComponent(responseData.fpsqrcodeurl) + '&callback=' + + encodeURIComponent("https://"+window.location.hostname+ '/paymentPage/fps/fpscallback?TRANSACTION_ID='+paymentData.transactionid+"&WEB_TOKEN="+paymentData.webtoken+"&PAYMENT_ID="+localStorage.getItem("paymentId")); setFpsqrcodeurl(openPASGUrl) + setFpsqrcodeurlPrd(openPASGUrlPrd) } }); @@ -236,6 +240,10 @@ const Index = () => { window.location.assign(fpsqrcodeurl); } + const mobliePaymentPrd = ()=>{ + window.location.assign(fpsqrcodeurlPrd); + } + return ( !onReady ? @@ -273,7 +281,17 @@ const Index = () => { mobliePayment(); }} sx={{ m: 4 }} - >請選擇支付程式付款 + >請選擇支付程式付款-Testing + : diff --git a/src/pages/Payment/MultiPaymentWindow.js b/src/pages/Payment/MultiPaymentWindow.js index 0ab344d..bcac377 100644 --- a/src/pages/Payment/MultiPaymentWindow.js +++ b/src/pages/Payment/MultiPaymentWindow.js @@ -90,9 +90,12 @@ const MultiPaymentWindow = (props) => { }; const confirmPaymentHandle = () => () =>{ - props.setConfirmPayment(true); + props.setConfirmPayment(true); }; + const getMethodImgClass = (method) => { + return paymentMethod == method || paymentMethod == "" ? "" : "grayscale"; + } useEffect(() => { if(props.selectedPaymentMethod === ""){ @@ -138,32 +141,32 @@ const MultiPaymentWindow = (props) => { diff --git a/src/pages/Proof/Reply_GLD/ApplicationDetails.js b/src/pages/Proof/Reply_GLD/ApplicationDetails.js index 1fd74dc..1b7de39 100644 --- a/src/pages/Proof/Reply_GLD/ApplicationDetails.js +++ b/src/pages/Proof/Reply_GLD/ApplicationDetails.js @@ -280,7 +280,7 @@ const ApplicationDetailCard = ({ { - formik.values.groupType == "A" + formik.values.groupType == "Private Bill" ? ( {data.noOfPages} page x $6,552 ) : diff --git a/src/pages/Proof/Reply_GLD/index.js b/src/pages/Proof/Reply_GLD/index.js index d81d43e..3aac47b 100644 --- a/src/pages/Proof/Reply_GLD/index.js +++ b/src/pages/Proof/Reply_GLD/index.js @@ -73,7 +73,7 @@ const Index = () => { responseData.data["issueDateStr"] = DateUtils.dateFormat(responseData.data.issueDate, "D MMM YYYY (ddd)"); - responseData.data["groupType"] = responseData.data.groupNo.charAt(0); + responseData.data["groupType"] = responseData.data.groupTitle; responseData.data["action"] = responseData.data.replyDate ? responseData.data.action : true; let returnBeforeDate = DateUtils.convertToDate(responseData.data.returnBeforeDate); diff --git a/src/pages/Proof/Reply_Public/ApplicationDetails.js b/src/pages/Proof/Reply_Public/ApplicationDetails.js index 995c416..5ddffdc 100644 --- a/src/pages/Proof/Reply_Public/ApplicationDetails.js +++ b/src/pages/Proof/Reply_Public/ApplicationDetails.js @@ -219,7 +219,7 @@ const ApplicationDetailCard = ({ formData, }) => { { - formik.values.groupType == "A" + formik.values.groupType == "Private Bill" ? ( {data.noOfPages} 頁 x $6,552 ) : diff --git a/src/pages/Proof/Reply_Public/ProofForm.js b/src/pages/Proof/Reply_Public/ProofForm.js index 530d700..4d6c510 100644 --- a/src/pages/Proof/Reply_Public/ProofForm.js +++ b/src/pages/Proof/Reply_Public/ProofForm.js @@ -214,7 +214,7 @@ const FormPanel = ({ formData }) => { type="file" accept=".pdf" style={{ display: 'none' }} - disabled={attachments.length >= (formik.values.groupType == "A" ? 2 : 1)} + disabled={attachments.length >= (formik.values.groupType == "Private Bill" ? 2 : 1)} onChange={(event) => { readFile(event) }} @@ -224,7 +224,7 @@ const FormPanel = ({ formData }) => { component="span" variant="contained" size="large" - disabled={attachments.length >= (formik.values.groupType == "A" ? 2 : 1)} + disabled={attachments.length >= (formik.values.groupType == "Private Bill" ? 2 : 1)} > 上載 diff --git a/src/pages/Proof/Reply_Public/index.js b/src/pages/Proof/Reply_Public/index.js index 200f471..c7474a9 100644 --- a/src/pages/Proof/Reply_Public/index.js +++ b/src/pages/Proof/Reply_Public/index.js @@ -85,7 +85,7 @@ const Index = () => { responseData.data["issueDateStr"] = DateUtils.dateFormat(responseData.data.issueDate, "D MMM YYYY (ddd)"); - responseData.data["groupType"] = responseData.data.groupNo.charAt(0); + responseData.data["groupType"] = responseData.data.groupTitle; responseData.data["action"] = responseData.data.replyDate ? responseData.data.action : true; setRecord(responseData.data); }