diff --git a/locales/en/surveyCreate.json b/locales/en/surveyCreate.json
index a2c7c7a..6c662d4 100644
--- a/locales/en/surveyCreate.json
+++ b/locales/en/surveyCreate.json
@@ -20,8 +20,8 @@
"surveyCreationSucessCopiedCorrectly": "and link copied to clipboard",
"signInToCreateSurvey": "Sign in to create survey",
"options": "Display options",
- "GREATER_THAN": "Greater than",
- "LESS_THAN": "Less than",
+ "GREATER_THAN": "greater than",
+ "LESS_THAN": "less than",
"EQUAL": "equals",
"SUBMITTED": "is submitted"
}
diff --git a/src/features/surveys/features/SurveyCreator/components/ActionButtons/ActionButtons.tsx b/src/features/surveys/features/SurveyCreator/components/ActionButtons/ActionButtons.tsx
index 0cafd66..097db80 100644
--- a/src/features/surveys/features/SurveyCreator/components/ActionButtons/ActionButtons.tsx
+++ b/src/features/surveys/features/SurveyCreator/components/ActionButtons/ActionButtons.tsx
@@ -28,12 +28,13 @@ export default function ActionButtons() {
)}
+
{user ? (
{isEditMode && (
diff --git a/src/features/surveys/features/SurveyCreator/components/QuestionBlocks/AdvancedSettings/RateAdvancedSettings.tsx b/src/features/surveys/features/SurveyCreator/components/QuestionBlocks/AdvancedSettings/RateAdvancedSettings.tsx
index ea002ef..0491130 100644
--- a/src/features/surveys/features/SurveyCreator/components/QuestionBlocks/AdvancedSettings/RateAdvancedSettings.tsx
+++ b/src/features/surveys/features/SurveyCreator/components/QuestionBlocks/AdvancedSettings/RateAdvancedSettings.tsx
@@ -30,9 +30,9 @@ export default function RateAdvancedSettings({
questionData.logicPaths?.map(() => ({
comparisons: getAvailableComparisons(
[
- // ComparisonType.LESS_THAN,
+ ComparisonType.LESS_THAN,
+ ComparisonType.GREATER_THAN,
ComparisonType.EQUAL,
- // ComparisonType.GREATER_THAN,
],
t
),
diff --git a/src/features/surveys/features/SurveyCreator/components/QuestionBlocks/QuestionBlockWrapper/QuestionBlockWrapper.tsx b/src/features/surveys/features/SurveyCreator/components/QuestionBlocks/QuestionBlockWrapper/QuestionBlockWrapper.tsx
index b67e8cd..aafc606 100644
--- a/src/features/surveys/features/SurveyCreator/components/QuestionBlocks/QuestionBlockWrapper/QuestionBlockWrapper.tsx
+++ b/src/features/surveys/features/SurveyCreator/components/QuestionBlocks/QuestionBlockWrapper/QuestionBlockWrapper.tsx
@@ -70,7 +70,7 @@ export default function QuestionBlockWrapper({
return (
-
+
{
}
return () => {
- console.log('clean');
setActivePage(undefined);
};
// eslint-disable-next-line react-hooks/exhaustive-deps
diff --git a/src/features/surveys/features/SurveyDisplay/managers/surveyAnswerManager.ts b/src/features/surveys/features/SurveyDisplay/managers/surveyAnswerManager.ts
index c335c9f..1ba573f 100644
--- a/src/features/surveys/features/SurveyDisplay/managers/surveyAnswerManager.ts
+++ b/src/features/surveys/features/SurveyDisplay/managers/surveyAnswerManager.ts
@@ -98,7 +98,24 @@ export const useSurveyAnswerManager = (
const submitCondition =
path.comparisonType === ComparisonType.SUBMITTED;
- if (equalCondition || submitCondition) {
+ const greatThanCondition =
+ path.comparisonType === ComparisonType.GREATER_THAN &&
+ activeQuestion.answer &&
+ path.selectedOption &&
+ Number(activeQuestion.answer) > Number(path.selectedOption);
+
+ const lessThanCondition =
+ path.comparisonType === ComparisonType.LESS_THAN &&
+ activeQuestion.answer &&
+ path.selectedOption &&
+ Number(activeQuestion.answer) < Number(path.selectedOption);
+
+ if (
+ equalCondition ||
+ submitCondition ||
+ greatThanCondition ||
+ lessThanCondition
+ ) {
if (path.endSurvey) {
handleSave(false);
return;