瀏覽代碼

update

CR013B2
Jason Chuang 3 天之前
父節點
當前提交
40b8c0f09d
共有 2 個檔案被更改,包括 4 行新增6 行删除
  1. +4
    -4
      src/layout/MainLayout/Header/index.js
  2. +0
    -2
      src/utils/Utils.js

+ 4
- 4
src/layout/MainLayout/Header/index.js 查看文件

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


const drawerWidth = 300; 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()); 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 isAfterAboutSwitchDate = () => {
const today = startOfDay(new Date()); const today = startOfDay(new Date());
const switchDay = startOfDay(ABOUT_SWITCH_DATE); const switchDay = startOfDay(ABOUT_SWITCH_DATE);
return today.getTime() > switchDay.getTime(); // strictly AFTER
return today.getTime() >= switchDay.getTime(); // strictly AFTER
}; };


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


if (locale === "zh-hk") { if (locale === "zh-hk") {
// TChinese // 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") { if (locale === "zh-cn") {
// Simplified Chinese (你未貼,我用 zh-cn 版) // Simplified Chinese (你未貼,我用 zh-cn 版)
return "https://www.gld.gov.hk/zh-cn/our-services/printing/advertising-gov-gazette/"; return "https://www.gld.gov.hk/zh-cn/our-services/printing/advertising-gov-gazette/";
} }
// English (en-us) / fallback // 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 查看文件

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


export const checkIsOnlyOnlinePayment = () => { 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 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()) const checkDate = DateUtils.convertToDate(new Date())
if (isDummyLoggedIn()){ if (isDummyLoggedIn()){
@@ -226,7 +225,6 @@ export const checkIsOnlyOnlinePayment = () => {
} }


export const checkMarkAsCreditClient = () => { 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 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()) const checkDate = DateUtils.convertToDate(new Date())
// console.log(targetDate) // console.log(targetDate)


Loading…
取消
儲存