mirror of
https://github.com/formbricks/formbricks.git
synced 2026-01-07 08:50:25 -06:00
fix: fixes follow up UI when email is hidden in the contact info question (#6388)
This commit is contained in:
@@ -214,7 +214,6 @@
|
||||
"hidden": "Versteckt",
|
||||
"hidden_field": "Verstecktes Feld",
|
||||
"hidden_fields": "Versteckte Felder",
|
||||
"hide": "Verstecken",
|
||||
"hide_column": "Spalte ausblenden",
|
||||
"image": "Bild",
|
||||
"images": "Bilder",
|
||||
@@ -273,7 +272,6 @@
|
||||
"not_authorized": "Nicht berechtigt",
|
||||
"not_connected": "Nicht verbunden",
|
||||
"note": "Notiz",
|
||||
"notes": "Notizen",
|
||||
"notifications": "Benachrichtigungen",
|
||||
"number": "Nummer",
|
||||
"off": "Aus",
|
||||
@@ -350,7 +348,6 @@
|
||||
"selected_questions": "Ausgewählte Fragen",
|
||||
"selection": "Auswahl",
|
||||
"selections": "Auswahlen",
|
||||
"send": "Senden",
|
||||
"send_test_email": "Test-E-Mail senden",
|
||||
"session_not_found": "Sitzung nicht gefunden",
|
||||
"settings": "Einstellungen",
|
||||
@@ -1637,10 +1634,7 @@
|
||||
"responses": {
|
||||
"address_line_1": "Adresszeile 1",
|
||||
"address_line_2": "Adresszeile 2",
|
||||
"an_error_occurred_creating_a_new_note": "Beim Erstellen einer neuen Notiz ist ein Fehler aufgetreten",
|
||||
"an_error_occurred_deleting_the_tag": "Beim Löschen des Tags ist ein Fehler aufgetreten",
|
||||
"an_error_occurred_resolving_a_note": "Beim Auflösen einer Notiz ist ein Fehler aufgetreten",
|
||||
"an_error_occurred_updating_a_note": "Beim Aktualisieren einer Notiz ist ein Fehler aufgetreten",
|
||||
"browser": "Browser",
|
||||
"city": "Stadt",
|
||||
"company": "Firma",
|
||||
@@ -1658,7 +1652,6 @@
|
||||
"os": "Betriebssystem",
|
||||
"person_attributes": "Personenattribute",
|
||||
"phone": "Telefon",
|
||||
"resolve": "Lösen",
|
||||
"respondent_skipped_questions": "Der Befragte hat diese Fragen übersprungen.",
|
||||
"response_deleted_successfully": "Antwort erfolgreich gelöscht.",
|
||||
"single_use_id": "Einmalige ID",
|
||||
|
||||
@@ -214,7 +214,6 @@
|
||||
"hidden": "Hidden",
|
||||
"hidden_field": "Hidden field",
|
||||
"hidden_fields": "Hidden fields",
|
||||
"hide": "Hide",
|
||||
"hide_column": "Hide column",
|
||||
"image": "Image",
|
||||
"images": "Images",
|
||||
@@ -273,7 +272,6 @@
|
||||
"not_authorized": "Not authorized",
|
||||
"not_connected": "Not Connected",
|
||||
"note": "Note",
|
||||
"notes": "Notes",
|
||||
"notifications": "Notifications",
|
||||
"number": "Number",
|
||||
"off": "Off",
|
||||
@@ -350,7 +348,6 @@
|
||||
"selected_questions": "Selected questions",
|
||||
"selection": "Selection",
|
||||
"selections": "Selections",
|
||||
"send": "Send",
|
||||
"send_test_email": "Send test email",
|
||||
"session_not_found": "Session not found",
|
||||
"settings": "Settings",
|
||||
@@ -1637,10 +1634,7 @@
|
||||
"responses": {
|
||||
"address_line_1": "Address Line 1",
|
||||
"address_line_2": "Address Line 2",
|
||||
"an_error_occurred_creating_a_new_note": "An error occurred creating a new note",
|
||||
"an_error_occurred_deleting_the_tag": "An error occurred deleting the tag",
|
||||
"an_error_occurred_resolving_a_note": "An error occurred resolving a note",
|
||||
"an_error_occurred_updating_a_note": "An error occurred updating a note",
|
||||
"browser": "Browser",
|
||||
"city": "City",
|
||||
"company": "Company",
|
||||
@@ -1658,7 +1652,6 @@
|
||||
"os": "OS",
|
||||
"person_attributes": "Person attributes",
|
||||
"phone": "Phone",
|
||||
"resolve": "Resolve",
|
||||
"respondent_skipped_questions": "Respondent skipped these questions.",
|
||||
"response_deleted_successfully": "Response deleted successfully.",
|
||||
"single_use_id": "SingleUse ID",
|
||||
|
||||
@@ -214,7 +214,6 @@
|
||||
"hidden": "Caché",
|
||||
"hidden_field": "Champ caché",
|
||||
"hidden_fields": "Champs cachés",
|
||||
"hide": "Cacher",
|
||||
"hide_column": "Cacher la colonne",
|
||||
"image": "Image",
|
||||
"images": "Images",
|
||||
@@ -273,7 +272,6 @@
|
||||
"not_authorized": "Non autorisé",
|
||||
"not_connected": "Non connecté",
|
||||
"note": "Remarque",
|
||||
"notes": "Notes",
|
||||
"notifications": "Notifications",
|
||||
"number": "Numéro",
|
||||
"off": "Éteint",
|
||||
@@ -350,7 +348,6 @@
|
||||
"selected_questions": "Questions sélectionnées",
|
||||
"selection": "Sélection",
|
||||
"selections": "Sélections",
|
||||
"send": "Envoyer",
|
||||
"send_test_email": "Envoyer un e-mail de test",
|
||||
"session_not_found": "Session non trouvée",
|
||||
"settings": "Paramètres",
|
||||
@@ -1637,10 +1634,7 @@
|
||||
"responses": {
|
||||
"address_line_1": "Ligne d'adresse 1",
|
||||
"address_line_2": "Ligne d'adresse 2",
|
||||
"an_error_occurred_creating_a_new_note": "Une erreur est survenue lors de la création d'une nouvelle note.",
|
||||
"an_error_occurred_deleting_the_tag": "Une erreur est survenue lors de la suppression de l'étiquette.",
|
||||
"an_error_occurred_resolving_a_note": "Une erreur est survenue lors de la résolution d'une note.",
|
||||
"an_error_occurred_updating_a_note": "Une erreur est survenue lors de la mise à jour d'une note.",
|
||||
"browser": "Navigateur",
|
||||
"city": "Ville",
|
||||
"company": "Société",
|
||||
@@ -1658,7 +1652,6 @@
|
||||
"os": "Système d'exploitation",
|
||||
"person_attributes": "Attributs de la personne",
|
||||
"phone": "Téléphone",
|
||||
"resolve": "Résoudre",
|
||||
"respondent_skipped_questions": "Le répondant a sauté ces questions.",
|
||||
"response_deleted_successfully": "Réponse supprimée avec succès.",
|
||||
"single_use_id": "Identifiant à usage unique",
|
||||
|
||||
@@ -214,7 +214,6 @@
|
||||
"hidden": "Escondido",
|
||||
"hidden_field": "Campo oculto",
|
||||
"hidden_fields": "Campos ocultos",
|
||||
"hide": "esconder",
|
||||
"hide_column": "Ocultar coluna",
|
||||
"image": "imagem",
|
||||
"images": "Imagens",
|
||||
@@ -273,7 +272,6 @@
|
||||
"not_authorized": "Não autorizado",
|
||||
"not_connected": "Desconectado",
|
||||
"note": "Nota",
|
||||
"notes": "Anotações",
|
||||
"notifications": "Notificações",
|
||||
"number": "Número",
|
||||
"off": "desligado",
|
||||
@@ -350,7 +348,6 @@
|
||||
"selected_questions": "Perguntas selecionadas",
|
||||
"selection": "seleção",
|
||||
"selections": "seleções",
|
||||
"send": "Enviar",
|
||||
"send_test_email": "Enviar e-mail de teste",
|
||||
"session_not_found": "Sessão não encontrada",
|
||||
"settings": "Configurações",
|
||||
@@ -1637,10 +1634,7 @@
|
||||
"responses": {
|
||||
"address_line_1": "Endereço Linha 1",
|
||||
"address_line_2": "Complemento",
|
||||
"an_error_occurred_creating_a_new_note": "Deu erro ao criar uma nova nota",
|
||||
"an_error_occurred_deleting_the_tag": "Ocorreu um erro ao deletar a tag",
|
||||
"an_error_occurred_resolving_a_note": "Ocorreu um erro ao resolver uma nota",
|
||||
"an_error_occurred_updating_a_note": "Ocorreu um erro ao atualizar uma nota",
|
||||
"browser": "navegador",
|
||||
"city": "Cidade",
|
||||
"company": "empresa",
|
||||
@@ -1658,7 +1652,6 @@
|
||||
"os": "sistema operacional",
|
||||
"person_attributes": "Atributos da pessoa",
|
||||
"phone": "Celular",
|
||||
"resolve": "resolver",
|
||||
"respondent_skipped_questions": "Respondente pulou essas perguntas.",
|
||||
"response_deleted_successfully": "Resposta deletada com sucesso.",
|
||||
"single_use_id": "ID de Uso Único",
|
||||
|
||||
@@ -214,7 +214,6 @@
|
||||
"hidden": "Oculto",
|
||||
"hidden_field": "Campo oculto",
|
||||
"hidden_fields": "Campos ocultos",
|
||||
"hide": "Esconder",
|
||||
"hide_column": "Ocultar coluna",
|
||||
"image": "Imagem",
|
||||
"images": "Imagens",
|
||||
@@ -273,7 +272,6 @@
|
||||
"not_authorized": "Não autorizado",
|
||||
"not_connected": "Não Conectado",
|
||||
"note": "Nota",
|
||||
"notes": "Notas",
|
||||
"notifications": "Notificações",
|
||||
"number": "Número",
|
||||
"off": "Desligado",
|
||||
@@ -350,7 +348,6 @@
|
||||
"selected_questions": "Perguntas selecionadas",
|
||||
"selection": "Seleção",
|
||||
"selections": "Seleções",
|
||||
"send": "Enviar",
|
||||
"send_test_email": "Enviar email de teste",
|
||||
"session_not_found": "Sessão não encontrada",
|
||||
"settings": "Configurações",
|
||||
@@ -1637,10 +1634,7 @@
|
||||
"responses": {
|
||||
"address_line_1": "Endereço Linha 1",
|
||||
"address_line_2": "Endereço Linha 2",
|
||||
"an_error_occurred_creating_a_new_note": "Ocorreu um erro ao criar uma nova nota",
|
||||
"an_error_occurred_deleting_the_tag": "Ocorreu um erro ao eliminar a etiqueta",
|
||||
"an_error_occurred_resolving_a_note": "Ocorreu um erro ao resolver uma nota",
|
||||
"an_error_occurred_updating_a_note": "Ocorreu um erro ao atualizar uma nota",
|
||||
"browser": "Navegador",
|
||||
"city": "Cidade",
|
||||
"company": "Empresa",
|
||||
@@ -1658,7 +1652,6 @@
|
||||
"os": "SO",
|
||||
"person_attributes": "Atributos da pessoa",
|
||||
"phone": "Telefone",
|
||||
"resolve": "Resolver",
|
||||
"respondent_skipped_questions": "O respondente saltou estas perguntas.",
|
||||
"response_deleted_successfully": "Resposta eliminada com sucesso.",
|
||||
"single_use_id": "ID de Uso Único",
|
||||
|
||||
@@ -214,7 +214,6 @@
|
||||
"hidden": "Ascuns",
|
||||
"hidden_field": "Câmp ascuns",
|
||||
"hidden_fields": "Câmpuri ascunse",
|
||||
"hide": "Ascunde",
|
||||
"hide_column": "Ascunde coloana",
|
||||
"image": "Imagine",
|
||||
"images": "Imagini",
|
||||
@@ -273,7 +272,6 @@
|
||||
"not_authorized": "Neautorizat",
|
||||
"not_connected": "Neconectat",
|
||||
"note": "Notă",
|
||||
"notes": "Notele",
|
||||
"notifications": "Notificări",
|
||||
"number": "Număr",
|
||||
"off": "Oprit",
|
||||
@@ -350,7 +348,6 @@
|
||||
"selected_questions": "Întrebări selectate",
|
||||
"selection": "Selecție",
|
||||
"selections": "Selecții",
|
||||
"send": "Trimite",
|
||||
"send_test_email": "Trimite email de test",
|
||||
"session_not_found": "Sesiune inexistentă",
|
||||
"settings": "Setări",
|
||||
@@ -1637,10 +1634,7 @@
|
||||
"responses": {
|
||||
"address_line_1": "Adresă Linie 1",
|
||||
"address_line_2": "Adresă Linie 2",
|
||||
"an_error_occurred_creating_a_new_note": "A apărut o eroare la crearea unei noi note",
|
||||
"an_error_occurred_deleting_the_tag": "A apărut o eroare la ștergerea etichetei",
|
||||
"an_error_occurred_resolving_a_note": "A apărut o eroare la rezolvarea unei note",
|
||||
"an_error_occurred_updating_a_note": "A apărut o eroare la actualizarea unei note",
|
||||
"browser": "Browser",
|
||||
"city": "Oraș",
|
||||
"company": "Companie",
|
||||
@@ -1658,7 +1652,6 @@
|
||||
"os": "SO",
|
||||
"person_attributes": "Atribute persoană",
|
||||
"phone": "Telefon",
|
||||
"resolve": "Rezolvă",
|
||||
"respondent_skipped_questions": "Respondenții au sărit peste aceste întrebări.",
|
||||
"response_deleted_successfully": "Răspuns șters cu succes.",
|
||||
"single_use_id": "IdentificatorUnicFolositOdată",
|
||||
|
||||
@@ -214,7 +214,6 @@
|
||||
"hidden": "隱藏",
|
||||
"hidden_field": "隱藏欄位",
|
||||
"hidden_fields": "隱藏欄位",
|
||||
"hide": "隱藏",
|
||||
"hide_column": "隱藏欄位",
|
||||
"image": "圖片",
|
||||
"images": "圖片",
|
||||
@@ -273,7 +272,6 @@
|
||||
"not_authorized": "未授權",
|
||||
"not_connected": "未連線",
|
||||
"note": "筆記",
|
||||
"notes": "筆記",
|
||||
"notifications": "通知",
|
||||
"number": "數字",
|
||||
"off": "關閉",
|
||||
@@ -350,7 +348,6 @@
|
||||
"selected_questions": "選取的問題",
|
||||
"selection": "選取",
|
||||
"selections": "選取",
|
||||
"send": "發送",
|
||||
"send_test_email": "發送測試電子郵件",
|
||||
"session_not_found": "找不到工作階段",
|
||||
"settings": "設定",
|
||||
@@ -1637,10 +1634,7 @@
|
||||
"responses": {
|
||||
"address_line_1": "地址 1",
|
||||
"address_line_2": "地址 2",
|
||||
"an_error_occurred_creating_a_new_note": "建立新筆記時發生錯誤",
|
||||
"an_error_occurred_deleting_the_tag": "刪除標籤時發生錯誤",
|
||||
"an_error_occurred_resolving_a_note": "解決筆記時發生錯誤",
|
||||
"an_error_occurred_updating_a_note": "更新筆記時發生錯誤",
|
||||
"browser": "瀏覽器",
|
||||
"city": "城市",
|
||||
"company": "公司",
|
||||
@@ -1658,7 +1652,6 @@
|
||||
"os": "作業系統",
|
||||
"person_attributes": "人員屬性",
|
||||
"phone": "電話",
|
||||
"resolve": "解決",
|
||||
"respondent_skipped_questions": "回應者跳過這些問題。",
|
||||
"response_deleted_successfully": "回應已成功刪除。",
|
||||
"single_use_id": "單次使用 ID",
|
||||
|
||||
@@ -44,8 +44,25 @@ export const FollowUpItem = ({
|
||||
|
||||
if (!to) return true;
|
||||
|
||||
const matchedQuestion = localSurvey.questions.find((question) => question.id === to);
|
||||
const matchedHiddenField = (localSurvey.hiddenFields?.fieldIds ?? []).find((fieldId) => fieldId === to);
|
||||
const matchedQuestion = localSurvey.questions.find((question) => {
|
||||
if (question.id !== to) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (question.type === TSurveyQuestionTypeEnum.OpenText) {
|
||||
return question.inputType === "email";
|
||||
}
|
||||
|
||||
if (question.type === TSurveyQuestionTypeEnum.ContactInfo) {
|
||||
return question.email.show;
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
const matchedHiddenField = localSurvey.hiddenFields?.enabled
|
||||
? (localSurvey.hiddenFields.fieldIds ?? []).find((fieldId) => fieldId === to)
|
||||
: undefined;
|
||||
|
||||
const updatedTeamMemberDetails = teamMemberDetails.map((teamMemberDetail) => {
|
||||
if (teamMemberDetail.email === userEmail) {
|
||||
@@ -65,26 +82,7 @@ export const FollowUpItem = ({
|
||||
|
||||
const matchedEmail = updatedTeamMembers.find((detail) => detail.email === to);
|
||||
|
||||
if (!matchedQuestion && !matchedHiddenField && !matchedEmail) return true;
|
||||
|
||||
if (matchedQuestion) {
|
||||
if (
|
||||
![TSurveyQuestionTypeEnum.OpenText, TSurveyQuestionTypeEnum.ContactInfo].includes(
|
||||
matchedQuestion.type
|
||||
)
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (
|
||||
matchedQuestion.type === TSurveyQuestionTypeEnum.OpenText &&
|
||||
matchedQuestion.inputType !== "email"
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
return !matchedQuestion && !matchedHiddenField && !matchedEmail;
|
||||
}, [
|
||||
followUp.action.properties,
|
||||
localSurvey.hiddenFields?.fieldIds,
|
||||
|
||||
@@ -104,7 +104,7 @@ export const FollowUpModal = ({
|
||||
|
||||
const openTextAndContactQuestions = questions.filter((question) => {
|
||||
if (question.type === TSurveyQuestionTypeEnum.ContactInfo) {
|
||||
return true;
|
||||
return question.email.show;
|
||||
}
|
||||
|
||||
if (question.type === TSurveyQuestionTypeEnum.OpenText) {
|
||||
|
||||
@@ -1343,13 +1343,13 @@ export const ZSurvey = z
|
||||
}
|
||||
|
||||
if (q.type === TSurveyQuestionTypeEnum.ContactInfo) {
|
||||
return true;
|
||||
return q.email.show;
|
||||
}
|
||||
|
||||
return false;
|
||||
})
|
||||
.map((q) => q.id),
|
||||
...(survey.hiddenFields.fieldIds ?? []),
|
||||
...(survey.hiddenFields.enabled ? (survey.hiddenFields.fieldIds ?? []) : []),
|
||||
];
|
||||
|
||||
if (validOptions.findIndex((option) => option === followUp.action.properties.to) === -1) {
|
||||
|
||||
Reference in New Issue
Block a user