Browse Source

update checking

CR013B2
Alex Cheung 2 months ago
parent
commit
1f3099d30b
2 changed files with 5 additions and 7 deletions
  1. +3
    -5
      src/pages/PublicNotice/ApplyForm/index.js
  2. +2
    -2
      src/utils/Utils.js

+ 3
- 5
src/pages/PublicNotice/ApplyForm/index.js View File

@@ -93,11 +93,9 @@ const ApplyForm = () => {
label={getIssueLabel(data)} label={getIssueLabel(data)}
/> />
); );
setGazetteIssueList(issueList);
setSelection(selection);
} }
if (checkIsOnlyOnlinePayment()){ if (checkIsOnlyOnlinePayment()){
if (checkIsOnlyOnlinePaymentByIssueDate(data.issueDate)) {
if (!checkIsOnlyOnlinePaymentByIssueDate(data.issueDate)) {
selection.push( selection.push(
<FormControlLabel <FormControlLabel
key={data.id} key={data.id}
@@ -106,11 +104,11 @@ const ApplyForm = () => {
label={getIssueLabel(data)} label={getIssueLabel(data)}
/> />
); );
setGazetteIssueList(issueList);
setSelection(selection);
} }
} }
} }
setGazetteIssueList(issueList);
setSelection(selection);
} }
} }
setUserData(response); setUserData(response);


+ 2
- 2
src/utils/Utils.js View File

@@ -195,7 +195,7 @@ export const isPasswordExpiry = () =>{


export const checkIsOnlyOnlinePaymentByIssueDate = (date) => { export const checkIsOnlyOnlinePaymentByIssueDate = (date) => {
// const targetDate = new Date(2025, 7, 1, 0, 0, 0) //2026-01-28T08:00:00.000Z hardcode // const targetDate = new Date(2025, 7, 1, 0, 0, 0) //2026-01-28T08:00:00.000Z hardcode
const targetDate = new Date(2025, 9, 17, 8, 0, 0) //2025-10-17T08:00:00.000Z
const targetDate = new Date(2025, 9, 17, 0, 0, 0) //2025-10-17T08:00:00.000Z
const checkDate = DateUtils.convertToDate(date) const checkDate = DateUtils.convertToDate(date)
if (isDummyLoggedIn()){ if (isDummyLoggedIn()){
return false; return false;
@@ -211,7 +211,7 @@ export const checkIsOnlyOnlinePaymentByIssueDate = (date) => {


export const checkIsOnlyOnlinePayment = () => { export const checkIsOnlyOnlinePayment = () => {
// const targetDate = new Date(2025, 28, 0, 0, 0, 0) // hardcode // const targetDate = new Date(2025, 28, 0, 0, 0, 0) // hardcode
const targetDate = new Date(2025, 9, 10, 0, 0, 0) // hardcode
const targetDate = new Date(2025, 9, 8, 0, 0, 0) // hardcode
const checkDate = DateUtils.convertToDate(new Date()) const checkDate = DateUtils.convertToDate(new Date())
if (isDummyLoggedIn()){ if (isDummyLoggedIn()){
return false; return false;


Loading…
Cancel
Save