mirror of
https://github.com/formbricks/formbricks.git
synced 2026-05-03 20:31:23 -05:00
fix: survey editor validation (#2749)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com> Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com> Co-authored-by: Johannes <johannes@formbricks.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { RefObject } from "react";
|
||||
import { toast } from "react-hot-toast";
|
||||
import { TSurveyRecallItem } from "@formbricks/types/surveys";
|
||||
import { TSurveyRecallItem } from "@formbricks/types/surveys/types";
|
||||
import { Button } from "../../Button";
|
||||
import { Input } from "../../Input";
|
||||
|
||||
|
||||
@@ -14,7 +14,12 @@ import {
|
||||
import { useMemo, useState } from "react";
|
||||
import { replaceRecallInfoWithUnderline } from "@formbricks/lib/utils/recall";
|
||||
import { TAttributeClass } from "@formbricks/types/attributeClasses";
|
||||
import { TSurvey, TSurveyHiddenFields, TSurveyQuestion, TSurveyRecallItem } from "@formbricks/types/surveys";
|
||||
import {
|
||||
TSurvey,
|
||||
TSurveyHiddenFields,
|
||||
TSurveyQuestion,
|
||||
TSurveyRecallItem,
|
||||
} from "@formbricks/types/surveys/types";
|
||||
import { DropdownMenu, DropdownMenuContent, DropdownMenuTrigger } from "../../DropdownMenu";
|
||||
import { Input } from "../../Input";
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
"use client";
|
||||
|
||||
import { PencilIcon, TrashIcon } from "lucide-react";
|
||||
import { ImagePlusIcon } from "lucide-react";
|
||||
import { ImagePlusIcon, PencilIcon, TrashIcon } from "lucide-react";
|
||||
import { RefObject, useEffect, useMemo, useRef, useState } from "react";
|
||||
import { toast } from "react-hot-toast";
|
||||
import { extractLanguageCodes, getEnabledLanguages, getLocalizedValue } from "@formbricks/lib/i18n/utils";
|
||||
@@ -24,7 +23,7 @@ import {
|
||||
TSurveyChoice,
|
||||
TSurveyQuestion,
|
||||
TSurveyRecallItem,
|
||||
} from "@formbricks/types/surveys";
|
||||
} from "@formbricks/types/surveys/types";
|
||||
import { LanguageIndicator } from "../../ee/multi-language/components/language-indicator";
|
||||
import { createI18nString } from "../../lib/i18n/utils";
|
||||
import { FileInput } from "../FileInput";
|
||||
@@ -546,7 +545,7 @@ export const QuestionFormInput = ({
|
||||
</div>
|
||||
)}
|
||||
{usedLanguageCode === "default" && localSurvey.languages?.length > 1 && isTranslationIncomplete && (
|
||||
<div className="mt-1 text-xs text-red-400">Contains Incomplete translations</div>
|
||||
<div className="mt-1 text-xs text-red-400">Incomplete translations</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
TSurveyMatrixQuestion,
|
||||
TSurveyMultipleChoiceQuestion,
|
||||
TSurveyQuestion,
|
||||
} from "@formbricks/types/surveys";
|
||||
} from "@formbricks/types/surveys/types";
|
||||
|
||||
// Function to get index for choice /rowLabel /columnLabel
|
||||
export const getIndex = (id: string, isChoice: boolean) => {
|
||||
|
||||
Reference in New Issue
Block a user