diff --git a/apps/web/app/environments/[environmentId]/surveys/[surveyId]/SummaryHeader.tsx b/apps/web/app/environments/[environmentId]/surveys/[surveyId]/SummaryHeader.tsx
index 174050afa1..bad9fbf51a 100644
--- a/apps/web/app/environments/[environmentId]/surveys/[surveyId]/SummaryHeader.tsx
+++ b/apps/web/app/environments/[environmentId]/surveys/[surveyId]/SummaryHeader.tsx
@@ -21,6 +21,10 @@ import {
DropdownMenuSubTrigger,
DropdownMenuTrigger,
ErrorComponent,
+ Tooltip,
+ TooltipProvider,
+ TooltipTrigger,
+ TooltipContent,
} from "@formbricks/ui";
import {
CheckCircleIcon,
@@ -48,6 +52,10 @@ const SummaryHeader = ({ surveyId, environmentId, survey }: SummaryHeaderProps)
const { environment, isLoadingEnvironment, isErrorEnvironment } = useEnvironment(environmentId);
const { triggerSurveyMutate } = useSurveyMutation(environmentId, surveyId);
+ const isCloseOnDateEnabled = survey.closeOnDate !== null;
+ const closeOnDate = survey.closeOnDate ? new Date(survey.closeOnDate) : null;
+ const isStatusChangeDisabled = (isCloseOnDateEnabled && closeOnDate && closeOnDate < new Date()) ?? false;
+
if (isLoadingProduct || isLoadingEnvironment) {
return ;
}
@@ -64,53 +72,64 @@ const SummaryHeader = ({ surveyId, environmentId, survey }: SummaryHeaderProps)
{survey.type === "link" &&
}
{(environment?.widgetSetupCompleted || survey.type === "link") && survey?.status !== "draft" ? (
-
+
+
+
+
+
+
+ To update the survey status, update the “Close
+
survey on date” setting in the Response Options.
+
+
+
) : null}