From 0d363c9871330d1866296c6c312c812526bd0604 Mon Sep 17 00:00:00 2001 From: Sneha Gupta <96808735+Snehagupta1907@users.noreply.github.com> Date: Tue, 28 Jan 2025 18:51:19 +0000 Subject: [PATCH 1/2] Feat: Add Mandatory Domain checkbox to QuestDetailsForm and update CreateQuest and UpdateQuest types --- .../admin/formSteps/QuestDetailsForm.tsx | 22 +++++++++++++++++++ types/backTypes.d.ts | 2 ++ 2 files changed, 24 insertions(+) diff --git a/components/admin/formSteps/QuestDetailsForm.tsx b/components/admin/formSteps/QuestDetailsForm.tsx index eb40d4d5..f22b649f 100644 --- a/components/admin/formSteps/QuestDetailsForm.tsx +++ b/components/admin/formSteps/QuestDetailsForm.tsx @@ -176,6 +176,28 @@ const QuestDetailsForm: FunctionComponent = ({ +
+
+ { + setQuestInput((prev: any) => ({ + ...prev, + mandatory_domain: e.target.checked ? null : "none", + })); + }} + id="mandatory-domain-checkbox" + className={styles.customCheckbox} + /> + +
+ + Check this box if a domain is mandatory for this quest. + +
+