Jason Chuang před 1 dnem
rodič
revize
40b8c0f09d
2 změnil soubory, kde provedl 4 přidání a 6 odebrání
  1. +4
    -4
      src/layout/MainLayout/Header/index.js
  2. +0
    -2
      src/utils/Utils.js

+ 4
- 4
src/layout/MainLayout/Header/index.js Zobrazit soubor

@@ -67,7 +67,7 @@ import { FormattedMessage } from "react-intl";

const drawerWidth = 300;

const ABOUT_SWITCH_DATE = new Date(2026, 0, 27); // 2026-01-28
const ABOUT_SWITCH_DATE = new Date(2025, 11, 17); // 2026-01-28 hardcode

const startOfDay = (d) => new Date(d.getFullYear(), d.getMonth(), d.getDate());

@@ -75,7 +75,7 @@ const startOfDay = (d) => new Date(d.getFullYear(), d.getMonth(), d.getDate());
const isAfterAboutSwitchDate = () => {
const today = startOfDay(new Date());
const switchDay = startOfDay(ABOUT_SWITCH_DATE);
return today.getTime() > switchDay.getTime(); // strictly AFTER
return today.getTime() >= switchDay.getTime(); // strictly AFTER
};

const getAboutExternalUrlByLocale = () => {
@@ -83,14 +83,14 @@ const getAboutExternalUrlByLocale = () => {

if (locale === "zh-hk") {
// TChinese
return "https://www.gld.gov.hk/en/our-services/printing/advertising-gov-gazette/";
return "https://www.gld.gov.hk/zh-hk/our-services/printing/advertising-gov-gazette/";
}
if (locale === "zh-cn") {
// Simplified Chinese (你未貼,我用 zh-cn 版)
return "https://www.gld.gov.hk/zh-cn/our-services/printing/advertising-gov-gazette/";
}
// English (en-us) / fallback
return "https://www.gld.gov.hk/zh-hk/our-services/printing/advertising-gov-gazette/";
return "https://www.gld.gov.hk/en/our-services/printing/advertising-gov-gazette/";
};




+ 0
- 2
src/utils/Utils.js Zobrazit soubor

@@ -210,7 +210,6 @@ export const checkIsOnlyOnlinePaymentByIssueDate = (date) => {
}

export const checkIsOnlyOnlinePayment = () => {
// const targetDate = new Date(2025, 10, 17, 0, 0, 0) // hardcode
const targetDate = new Date(2025, 11, 17, 0, 0, 0) // hardcode new Date(2026, 0, 28, 0, 0, 0) 28 Jan 2026
const checkDate = DateUtils.convertToDate(new Date())
if (isDummyLoggedIn()){
@@ -226,7 +225,6 @@ export const checkIsOnlyOnlinePayment = () => {
}

export const checkMarkAsCreditClient = () => {
// const targetDate = new Date(2025, 10, 17, 0, 0, 0) // hardcode
const targetDate = new Date(2025, 11, 17, 0, 0, 0) // hardcode new Date(2026, 0, 28, 0, 0, 0) 28 Jan 2026
const checkDate = DateUtils.convertToDate(new Date())
// console.log(targetDate)


Načítá se…
Zrušit
Uložit