From 851b3995d5f08c61390742617cbc403a2feeac78 Mon Sep 17 00:00:00 2001 From: Kechicode <186776112+Kechicode@users.noreply.github.com> Date: Tue, 17 Dec 2024 11:04:32 +0800 Subject: [PATCH 1/3] HOTFIX(CampaignDetail): update dialog copy --- lang/default.json | 3 +++ lang/en.json | 3 +++ lang/zh-Hans.json | 3 +++ lang/zh-Hant.json | 3 +++ src/views/CampaignDetail/Apply/Dialog/index.tsx | 9 ++++++++- 5 files changed, 20 insertions(+), 1 deletion(-) diff --git a/lang/default.json b/lang/default.json index ec07a834b3..b476d00a48 100644 --- a/lang/default.json +++ b/lang/default.json @@ -1253,6 +1253,9 @@ "JBWS0c": { "defaultMessage": "Link" }, + "JCZFqh": { + "defaultMessage": "Sign up now and start writing the annual questionnaire. Please check the announcement for event details." + }, "JFv0yt": { "defaultMessage": "Unknown error. Please check wallet and retry." }, diff --git a/lang/en.json b/lang/en.json index 828e86a159..7fd09a1b81 100644 --- a/lang/en.json +++ b/lang/en.json @@ -1253,6 +1253,9 @@ "JBWS0c": { "defaultMessage": "Link" }, + "JCZFqh": { + "defaultMessage": "Sign up now and start writing the annual questionnaire. Please check the announcement for event details." + }, "JFv0yt": { "defaultMessage": "Unknown error. Please check wallet and retry." }, diff --git a/lang/zh-Hans.json b/lang/zh-Hans.json index 011fb4c6cf..e83497261c 100644 --- a/lang/zh-Hans.json +++ b/lang/zh-Hans.json @@ -1253,6 +1253,9 @@ "JBWS0c": { "defaultMessage": "链接" }, + "JCZFqh": { + "defaultMessage": "现在报名,即可开始书写年度问卷,活动细则请查看公告" + }, "JFv0yt": { "defaultMessage": "未知错误,请确认你的钱包并重新尝试" }, diff --git a/lang/zh-Hant.json b/lang/zh-Hant.json index 3fc2c247c0..b851816a33 100644 --- a/lang/zh-Hant.json +++ b/lang/zh-Hant.json @@ -1253,6 +1253,9 @@ "JBWS0c": { "defaultMessage": "連結" }, + "JCZFqh": { + "defaultMessage": "現在報名,即可開始書寫年度問卷,活動細則可查看公告" + }, "JFv0yt": { "defaultMessage": "未知錯誤,請確認你的錢包並重新嘗試" }, diff --git a/src/views/CampaignDetail/Apply/Dialog/index.tsx b/src/views/CampaignDetail/Apply/Dialog/index.tsx index 9c913a4d5e..3161773b4b 100644 --- a/src/views/CampaignDetail/Apply/Dialog/index.tsx +++ b/src/views/CampaignDetail/Apply/Dialog/index.tsx @@ -33,6 +33,8 @@ const ApplyCampaignDialog = ({ children, }: ApplyCampaignDialogProps) => { const { show, openDialog, closeDialog } = useDialogSwitch(true) + // TODO: remove this after annual questionnaire is over + const isAnnualQuestionnaire = campaign.id === 'QXJ0aWNsZTo4MjA3Mjc' const now = new Date() const { end: appEnd } = campaign.applicationPeriod || {} @@ -80,7 +82,12 @@ const ApplyCampaignDialog = ({

- {isInApplicationPeriod ? ( + {isAnnualQuestionnaire && isInApplicationPeriod ? ( + + ) : isInApplicationPeriod ? ( Date: Tue, 17 Dec 2024 11:52:14 +0800 Subject: [PATCH 2/3] hotfix(CampaignDetail): update campaign id --- src/views/CampaignDetail/Apply/Dialog/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/CampaignDetail/Apply/Dialog/index.tsx b/src/views/CampaignDetail/Apply/Dialog/index.tsx index 3161773b4b..fc3699ba4f 100644 --- a/src/views/CampaignDetail/Apply/Dialog/index.tsx +++ b/src/views/CampaignDetail/Apply/Dialog/index.tsx @@ -34,7 +34,7 @@ const ApplyCampaignDialog = ({ }: ApplyCampaignDialogProps) => { const { show, openDialog, closeDialog } = useDialogSwitch(true) // TODO: remove this after annual questionnaire is over - const isAnnualQuestionnaire = campaign.id === 'QXJ0aWNsZTo4MjA3Mjc' + const isAnnualQuestionnaire = campaign.id === 'Q2FtcGFpZ246OQ' const now = new Date() const { end: appEnd } = campaign.applicationPeriod || {} From 27a3e9283c19ae6b2bbfb036b9b26d6ca3712329 Mon Sep 17 00:00:00 2001 From: Kechicode <186776112+Kechicode@users.noreply.github.com> Date: Tue, 17 Dec 2024 16:41:14 +0800 Subject: [PATCH 3/3] fix(ArticleDetail): simplify campaign reset condition --- src/views/ArticleDetail/Edit/Header/index.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/views/ArticleDetail/Edit/Header/index.tsx b/src/views/ArticleDetail/Edit/Header/index.tsx index 105271b6e0..a758504b49 100644 --- a/src/views/ArticleDetail/Edit/Header/index.tsx +++ b/src/views/ArticleDetail/Edit/Header/index.tsx @@ -99,9 +99,7 @@ const EditModeHeader = ({ const isCampaignRevised = restProps.selectedCampaign?.id !== article.campaigns[0]?.campaign.id || restProps.selectedStage !== article.campaigns[0]?.stage?.id - const isResetCampaign = - isCampaignRevised && - (!restProps.selectedCampaign?.id || !restProps.selectedStage) + const isResetCampaign = isCampaignRevised && !restProps.selectedCampaign?.id const needRepublish = isTitleRevised ||