From c2e1d3a30529fe572b1f2e9d4065402759eda175 Mon Sep 17 00:00:00 2001 From: anna Date: Wed, 5 Jun 2024 18:37:08 +0800 Subject: [PATCH 1/3] dn revoke paid --- src/pages/DemandNote/Search/DataGrid.js | 70 +++++++++++++++++++++++-- src/pages/Proof/Payment/Pay_Office.js | 20 ++++++- src/utils/ApiPathConst.js | 1 + 3 files changed, 85 insertions(+), 6 deletions(-) diff --git a/src/pages/DemandNote/Search/DataGrid.js b/src/pages/DemandNote/Search/DataGrid.js index 83ed936..cda2c44 100644 --- a/src/pages/DemandNote/Search/DataGrid.js +++ b/src/pages/DemandNote/Search/DataGrid.js @@ -19,7 +19,8 @@ import { DEMAND_NOTE_SEND, DEMAND_NOTE_ATTACH, DEMAND_NOTE_MARK_PAID, - DEMAND_NOTE_LIST_ALL + DEMAND_NOTE_LIST_ALL, + DEMAND_NOTE_REVOKE_PAID } from "utils/ApiPathConst"; import * as HttpUtils from "utils/HttpUtils"; import { PNSPS_BUTTON_THEME } from "themes/buttonConst"; @@ -30,6 +31,7 @@ import { isGrantedAny } from "auth/utils"; export default function SearchDemandNote({ searchCriteria, applySearch }) { const [isConfirmPopUp, setConfirmPopUp] = useState(false); + const [isRevokePopUp, setRevokePopUp] = useState(false); const [isSendPopUp, setSendPopUp] = useState(false); const [isErrorPopUp, setIsErrorPopUp] = useState(false); const [selectonWarning, setSelectonWarning] = useState(false); @@ -109,7 +111,8 @@ export default function SearchDemandNote({ searchCriteria, applySearch }) { dnIdList: idList }, onSuccess: () => { - if (reloadFun) reloadFun(); + searchCriteria.reload = new Date(); + set_searchCriteria(searchCriteria); } }); @@ -134,12 +137,38 @@ export default function SearchDemandNote({ searchCriteria, applySearch }) { files: [file], onSuccess() { setWait(false); - if (reloadFun) reloadFun(); + searchCriteria.reload = new Date(); + set_searchCriteria(searchCriteria); }, }); document.getElementById("uploadFileBtn").value = ""; } + const revokePaid = () => { + setRevokePopUp(false); + let idList = []; + const datas = rows?.filter((row) => + selectedRowItems.includes(row.id) + ); + if (datas?.length < 1) { + setSelectonWarning(true); + return; + } + for (var i = 0; i < datas?.length; i++) { + idList.push(datas[i].id); + } + HttpUtils.post({ + url: DEMAND_NOTE_REVOKE_PAID, + params: { + dnIdList: idList + }, + onSuccess: () => { + searchCriteria.reload = new Date(); + set_searchCriteria(searchCriteria); + } + }); + } + const markPaid = () => { setConfirmPopUp(false); let idList = []; @@ -159,7 +188,8 @@ export default function SearchDemandNote({ searchCriteria, applySearch }) { dnIdList: idList }, onSuccess: () => { - if (reloadFun) reloadFun(); + searchCriteria.reload = new Date(); + set_searchCriteria(searchCriteria); } }); } @@ -334,6 +364,16 @@ export default function SearchDemandNote({ searchCriteria, applySearch }) { Mark as Paid + + + + + : <> @@ -422,6 +462,28 @@ export default function SearchDemandNote({ searchCriteria, applySearch }) { +
+ setRevokePopUp(false)} + PaperProps={{ + sx: { + minWidth: '40vw', + maxWidth: { xs: '90vw', s: '90vw', m: '70vw', lg: '70vw' }, + maxHeight: { xs: '90vh', s: '70vh', m: '70vh', lg: '60vh' } + } + }} + > + Confirm + + Are you sure to revoke DN as To Be Paid? + + + + + + +
{ }, ) }} /> -
+
+
+
+
+
{
diff --git a/src/utils/ApiPathConst.js b/src/utils/ApiPathConst.js index 20fa5a5..6772862 100644 --- a/src/utils/ApiPathConst.js +++ b/src/utils/ApiPathConst.js @@ -185,6 +185,7 @@ export const DEMAND_NOTE_LIST_ALL = apiPath+'/demandNote/listAll';//GET gld export const DEMAND_NOTE_LOAD = apiPath+'/demandNote/load';//GET export const DEMAND_NOTE_SEND = apiPath+'/demandNote/send-dn';//POST export const DEMAND_NOTE_MARK_PAID = apiPath+'/demandNote/mark-as-paid';//POST +export const DEMAND_NOTE_REVOKE_PAID = apiPath+'/demandNote/revoke-paid';//POST export const DEMAND_NOTE_ATTACH = apiPath+'/demandNote/attach';//POST export const DEMAND_NOTE_EXPORT = apiPath+'/demandNote/export';//POST From f73e0f8956d275bee71a3b653bab8b06a0091367 Mon Sep 17 00:00:00 2001 From: anna Date: Wed, 5 Jun 2024 18:42:58 +0800 Subject: [PATCH 2/3] update pay office UI --- src/pages/Proof/Payment/Pay_Office.js | 20 ++++++++++++++++++-- src/translations/en.json | 7 +++++-- src/translations/zh-CN.json | 7 +++++-- src/translations/zh-HK.json | 7 +++++-- 4 files changed, 33 insertions(+), 8 deletions(-) diff --git a/src/pages/Proof/Payment/Pay_Office.js b/src/pages/Proof/Payment/Pay_Office.js index 7ef8e5b..b8c8bb3 100644 --- a/src/pages/Proof/Payment/Pay_Office.js +++ b/src/pages/Proof/Payment/Pay_Office.js @@ -68,11 +68,27 @@ const Index = ({ record }) => { }, ) }} /> -
+
+
+
+
+
{
diff --git a/src/translations/en.json b/src/translations/en.json index c5e920e..8d00780 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -119,8 +119,10 @@ "proofPaymentHeader_office": "Public Notice: Proofreading Completed and Payment Means Selected", "proofPaymentBody_office": "We have received the manuscript proofreading confirmation and printing instructions for application number: {appNo}", "proofPaymentBody_office2": "You have selected to make payment at North Point Government Offices Collection Office:

Collection Office at Accounts Section
10/F North Point Government Offices
333 Java Road North Point
", - "proofPaymentBody_office3": "Please print out this page or present your application details on screen at our Collection Office, and complete the payment by {paymentDeadline}.", - "proofPaymentBody_office4": "We will process the publication after receiving payment confirmation.", + "proofPaymentBody_office3": "The office hours of the Collection Office is from Monday to Friday: 8:30 a.m. to 1 p.m., 2 p.m. to 5 p.m.", + "proofPaymentBody_office4": "Cheques, drafts or cashier’s orders should be made payable to “The Government of the Hong Kong Special Administrative Region” or “The Government of the HKSAR” and crossed. They must not be made payable to any individual officer. Payment is valid only after the cheque, draft or cashier’s order is cleared.", + "proofPaymentBody_office5": "Please print out this page or present your application details on screen at our Collection Office, and complete the payment by {paymentDeadline}.", + "proofPaymentBody_office6": "We will process the publication after receiving payment confirmation.", "proofPaymentHeader_online": "Public Notice: Proofreading Completed and Payment Means Selected", "proofPaymentBody_online": "We have received the manuscript proofreading confirmation and printing instructions for application number: {appNo}", @@ -312,6 +314,7 @@ "pwRemark2": "A mix of letters and numbers", "pwRemark3": "A mix of uppercase and lowercase English letters", "pwRemark4": "Contains at least one special symbol, for example, @ # ?", + "pwRemark5": "Please be informed that using dictionary words, usernames, or obvious phrases as password contents is strictly forbidden.", "pwWeak": "Weak", "pwNormal": "Normal", "pwGood": "Good", diff --git a/src/translations/zh-CN.json b/src/translations/zh-CN.json index 832bce1..d909439 100644 --- a/src/translations/zh-CN.json +++ b/src/translations/zh-CN.json @@ -148,8 +148,10 @@ "proofPaymentHeader_office": "公共启事: 已完成校对并已选择付款方式", "proofPaymentBody_office": "我们已收到以下申请编号的稿件校对确认和印刷指示。
{appNo}", "proofPaymentBody_office2": "您已选择在北角政府合署收款处付款:

香港北角渣华道333号
北角政府合署10楼
会计部收款处
", - "proofPaymentBody_office3": "请打印此页面或使用电子屏幕设备向收款处职员展示申请详情,并在{paymentDeadline}前完成付款。", - "proofPaymentBody_office4": "我们将在收到付款确认通知后处理刊登事宜。", + "proofPaymentBody_office3": "收款处的办公时间为星期一至五上午八时三十分至下午一时及下午二时至五时。", + "proofPaymentBody_office4": "凡支票、汇票或本票均须书明支付「香港特别行政区政府」并加划线,抬头人不应为个别职员。客户以支票、汇票或本票方式付款,须待其兑现后方为有效。", + "proofPaymentBody_office5": "请打印此页面或使用电子屏幕设备向收款处职员展示申请详情,并在{paymentDeadline}前完成付款。", + "proofPaymentBody_office6": "我们将在收到付款确认通知后处理刊登事宜。", "proofPaymentHeader_online": "公共启事: 已完成校对并已选择付款方式", "proofPaymentBody_online": "我们已收到以下申请编号的稿件校对确认和印刷指示。
{appNo}", @@ -334,6 +336,7 @@ "pwRemark2": "字母和数字的混合", "pwRemark3": "英文字母大写与小写的混合", "pwRemark4": "至少包含一个特殊符号,例如,@ # ?", + "pwRemark5": "請注意,嚴禁使用字典單字、使用者名稱或明顯短語作為密碼內容。", "pwWeak": "弱", "pwNormal": "普通", "pwGood": "良好", diff --git a/src/translations/zh-HK.json b/src/translations/zh-HK.json index ef29338..7add92d 100644 --- a/src/translations/zh-HK.json +++ b/src/translations/zh-HK.json @@ -146,8 +146,10 @@ "proofPaymentHeader_office": "公共啟事: 已完成校對並已選擇付款方式", "proofPaymentBody_office": "我們已收到以下申請編號的稿件校對確認和印刷指示。
{appNo}", "proofPaymentBody_office2": "您已選擇在北角政府合署收款處付款:

香港北角渣華道333號
北角政府合署10樓
會計部收款處
", - "proofPaymentBody_office3": "請列印此頁面或使用電子屏幕設備向收款處職員展示申請詳情,並在{paymentDeadline}之前完成付款。", - "proofPaymentBody_office4": "我們將在收到付款確認通知後處理刊登事宜。", + "proofPaymentBody_office3": "收款處的辦公時間為星期一至五上午八時三十分至下午一時及下午二時至五時。", + "proofPaymentBody_office4": "凡支票、匯票或本票均須書明支付「香港特別行政區政府」並加劃線,抬頭人不應為個別職員。客戶以支票、匯票或本票方式付款,須待其兌現後方為有效。", + "proofPaymentBody_office5": "請列印此頁面或使用電子屏幕設備向收款處職員展示申請詳情,並在{paymentDeadline}之前完成付款。", + "proofPaymentBody_office6": "我們將在收到付款確認通知後處理刊登事宜。", "proofPaymentHeader_online": "公共啟事: 已完成校對並已選擇付款方式", "proofPaymentBody_online": "我們已收到以下申請編號的稿件校對確認和印刷指示。
{appNo}", @@ -337,6 +339,7 @@ "pwRemark2": "字母和數字的混合", "pwRemark3": "英文字母大寫與小寫的混合", "pwRemark4": "至少包含一個特殊符號,例如,@ # ?", + "pwRemark5": "请注意,严禁使用字典单词、用户名或明显的短语作为密码内容。", "pwWeak": "弱", "pwNormal": "普通", "pwGood": "良好", From da6bcd39fb9ea13aae847e444a69eaa2401d7552 Mon Sep 17 00:00:00 2001 From: anna Date: Thu, 6 Jun 2024 12:20:14 +0800 Subject: [PATCH 3/3] fix bug --- src/components/FiDataGrid.js | 1 + src/pages/DemandNote/Search/DataGrid.js | 35 ++- src/pages/DemandNote/Search/index.js | 1 - src/pages/Proof/Reply_Public/ProofForm.js | 255 +++++++++--------- .../ApplyForm/PublicNoticeApplyForm.js | 138 +++++----- 5 files changed, 217 insertions(+), 213 deletions(-) diff --git a/src/components/FiDataGrid.js b/src/components/FiDataGrid.js index 17150dd..e62f4d9 100644 --- a/src/components/FiDataGrid.js +++ b/src/components/FiDataGrid.js @@ -127,6 +127,7 @@ export function FiDataGrid({ rows, columns, sx, autoHeight, () => { navigate('/paymentPage/demandNote/details/' + params.id); }; @@ -111,8 +112,7 @@ export default function SearchDemandNote({ searchCriteria, applySearch }) { dnIdList: idList }, onSuccess: () => { - searchCriteria.reload = new Date(); - set_searchCriteria(searchCriteria); + setReload(new Date()); } }); @@ -136,9 +136,7 @@ export default function SearchDemandNote({ searchCriteria, applySearch }) { }, files: [file], onSuccess() { - setWait(false); - searchCriteria.reload = new Date(); - set_searchCriteria(searchCriteria); + setReload(new Date()); }, }); document.getElementById("uploadFileBtn").value = ""; @@ -163,8 +161,7 @@ export default function SearchDemandNote({ searchCriteria, applySearch }) { dnIdList: idList }, onSuccess: () => { - searchCriteria.reload = new Date(); - set_searchCriteria(searchCriteria); + setReload(new Date()); } }); } @@ -188,8 +185,7 @@ export default function SearchDemandNote({ searchCriteria, applySearch }) { dnIdList: idList }, onSuccess: () => { - searchCriteria.reload = new Date(); - set_searchCriteria(searchCriteria); + setReload(new Date()); } }); } @@ -270,9 +266,11 @@ export default function SearchDemandNote({ searchCriteria, applySearch }) { width: 300, renderCell: (params) => { return ( - - - + + + + +
Issue:{DateUtils.dateStr(params?.row.issueDate)}
Due:{params?.value ? DateUtils.dateStr(params?.value) : "--"}
Sent:{params.row.sentDate ? <> {DateUtils.datetimeStr(params.row.sentDate)} - {params.row.sentBy} : <> To be sent}
Issue:{DateUtils.dateStr(params?.row.issueDate)}
Due:{params?.value ? DateUtils.dateStr(params?.value) : "--"}
Sent:{params.row.sentDate ? DateUtils.datetimeStr(params.row.sentDate) - params.row.sentBy : "To be sent"}
); } }, @@ -292,7 +290,7 @@ export default function SearchDemandNote({ searchCriteria, applySearch }) { headerName: 'Status', width: 175, renderCell: (params) => { - return [StatusUtils.getStatus_Eng(params)] + return StatusUtils.getStatus_Eng(params) }, }, ]; @@ -330,6 +328,7 @@ export default function SearchDemandNote({ searchCriteria, applySearch }) { +