Skip to content

Commit 11b3e51

Browse files
authored
Allow to disable surveys (#9349)
Signed-off-by: Denis Bykhov <[email protected]>
1 parent 6ed7719 commit 11b3e51

File tree

12 files changed

+45
-13
lines changed

12 files changed

+45
-13
lines changed

models/all/src/index.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ import {
111111
serverDocumentsId,
112112
createModel as serverDocumentsModel
113113
} from '@hcengineering/model-server-controlled-documents'
114-
import { surveyId, createModel as surveyModel } from '@hcengineering/model-survey'
114+
import survey, { surveyId, createModel as surveyModel } from '@hcengineering/model-survey'
115115
import { presenceId, createModel as presenceModel } from '@hcengineering/model-presence'
116116
import chat, { chatId, createModel as chatModel } from '@hcengineering/model-chat'
117117
import processes, { processId, createModel as processModel } from '@hcengineering/model-process'
@@ -456,7 +456,17 @@ export default function buildModel (): Builder {
456456
classFilter: defaultFilter
457457
}
458458
],
459-
[surveyModel, surveyId],
459+
[
460+
surveyModel,
461+
surveyId,
462+
{
463+
label: survey.string.ConfigLabel,
464+
description: survey.string.ConfigDescription,
465+
enabled: false,
466+
beta: true,
467+
classFilter: defaultFilter
468+
}
469+
],
460470
[presenceModel, presenceId],
461471
[
462472
chatModel,

plugins/survey-assets/lang/cs.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@
4343
"SurveySubmitConfirm": "Po odeslání nebude možné odpovědi změnit. Opravdu chcete odeslat nyní?",
4444
"ValidateFail": "Některé povinné otázky nejsou zodpovězeny",
4545
"ValidateInfo": "Takto bude formulář vypadat pro uživatele. Vyzkoušejte zadat odpovědi a vybrat možnosti, abyste si otestovali průzkum. Zelená ikona v horním záhlaví ukazuje, že je formulář správně vyplněn.",
46-
"ValidateOk": "Formulář je správně vyplněn"
46+
"ValidateOk": "Formulář je správně vyplněn",
47+
"ConfigLabel": "Průzkumy",
48+
"ConfigDescription": "Rozšíření pro správu průzkumů"
4749
}
4850
}

plugins/survey-assets/lang/de.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@
4343
"SurveySubmitConfirm": "Nach dem Absenden können die Antworten nicht mehr geändert werden. Möchten Sie jetzt wirklich absenden?",
4444
"ValidateFail": "Einige Pflichtfragen wurden nicht beantwortet",
4545
"ValidateInfo": "So wird das Formular für die Benutzer aussehen. Versuchen Sie, Antworten einzugeben und Optionen auszuwählen, um die Umfrage zu testen. Das grüne Symbol oben zeigt an, dass das Formular korrekt ausgefüllt ist.",
46-
"ValidateOk": "Das Formular ist korrekt ausgefüllt"
46+
"ValidateOk": "Das Formular ist korrekt ausgefüllt",
47+
"ConfigLabel": "Umfragen",
48+
"ConfigDescription": "Erweiterung zur Verwaltung von Umfragen"
4749
}
4850
}

plugins/survey-assets/lang/en.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@
4444
"ValidateFail": "Some required questions are not answered",
4545
"ValidateInfo": "This is how the form will look like for an user. Try to type answers and select options to test your survey. A green icon in the header above shows the form is filled properly",
4646
"ValidateOk": "Form is filled correctly",
47-
"EditAnswers": "Edit answers"
47+
"EditAnswers": "Edit answers",
48+
"ConfigLabel": "Surveys",
49+
"ConfigDescription": "Extension to manage surveys"
4850
}
4951
}

plugins/survey-assets/lang/es.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@
4343
"SurveySubmitConfirm": "Una vez enviado, no se podrán modificar las respuestas. ¿Seguro que desea enviarlo ahora?",
4444
"ValidateFail": "Faltan respuestas a algunas preguntas obligatorias",
4545
"ValidateInfo": "Así es como verán los usuarios el formulario. Pruebe ingresando respuestas y seleccionando opciones para probar la encuesta. El icono verde en la parte superior indica que el formulario está correctamente completado.",
46-
"ValidateOk": "El formulario está correctamente completado"
46+
"ValidateOk": "El formulario está correctamente completado",
47+
"ConfigLabel": "Encuestas",
48+
"ConfigDescription": "Extensión para gestionar encuestas"
4749
}
4850
}

plugins/survey-assets/lang/fr.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@
4343
"SurveySubmitConfirm": "Une fois soumis, les réponses ne pourront pas être modifiées. Voulez-vous vraiment soumettre maintenant ?",
4444
"ValidateFail": "Certaines questions obligatoires n'ont pas été répondues",
4545
"ValidateInfo": "Voici à quoi ressemblera le formulaire pour les utilisateurs. Essayez de saisir des réponses et de sélectionner des options pour tester le sondage. L'icône verte en haut indique que le formulaire est correctement rempli.",
46-
"ValidateOk": "Le formulaire est correctement rempli"
46+
"ValidateOk": "Le formulaire est correctement rempli",
47+
"ConfigLabel": "Enquêtes",
48+
"ConfigDescription": "Extension pour gérer les enquêtes"
4749
}
4850
}

plugins/survey-assets/lang/it.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@
4343
"SurveySubmitConfirm": "Una volta inviato, non sarà possibile modificare le risposte. Sei sicuro di voler inviare ora?",
4444
"ValidateFail": "Alcune domande obbligatorie non sono state risposte",
4545
"ValidateInfo": "Ecco come apparirà il modulo per gli utenti. Prova a inserire risposte e selezionare opzioni per testare il sondaggio. L'icona verde in alto indica che il modulo è correttamente compilato.",
46-
"ValidateOk": "Il modulo è correttamente compilato"
46+
"ValidateOk": "Il modulo è correttamente compilato",
47+
"ConfigLabel": "Sondaggi",
48+
"ConfigDescription": "Estensione per gestire i sondaggi"
4749
}
4850
}

plugins/survey-assets/lang/ja.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@
4444
"ValidateFail": "未回答の必須質問があります",
4545
"ValidateInfo": "ユーザーに表示されるフォームの見た目はこのようになります。回答や選択肢を入力してアンケートをテストしてください。ヘッダーの緑色のアイコンはフォームが正しく入力されていることを示します",
4646
"ValidateOk": "フォームは正しく入力されています",
47-
"EditAnswers": "回答を編集"
47+
"EditAnswers": "回答を編集",
48+
"ConfigLabel": "アンケート",
49+
"ConfigDescription": "アンケートを管理する拡張機能"
4850
}
4951
}

plugins/survey-assets/lang/pt.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@
4343
"SurveySubmitConfirm": "Você não poderá alterar as respostas após o envio. Tem certeza de que deseja enviar agora?",
4444
"ValidateFail": "Algumas perguntas obrigatórias não foram respondidas",
4545
"ValidateInfo": "É assim que o formulário será exibido para um usuário. Tente digitar respostas e selecionar opções para testar sua pesquisa. Um ícone verde no cabeçalho acima indica que o formulário está preenchido corretamente",
46-
"ValidateOk": "Formulário preenchido corretamente"
46+
"ValidateOk": "Formulário preenchido corretamente",
47+
"ConfigLabel": "Pesquisas",
48+
"ConfigDescription": "Extensão para gerenciar pesquisas"
4749
}
4850
}

plugins/survey-assets/lang/ru.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@
4444
"ValidateFail": "Нет ответов на некоторые обязательные вопросы",
4545
"ValidateInfo": "Так будет выглядеть форма для пользователя. Для проверки анкеты попробуйте вводить ответы и выбирать варианты. Зеленый значок в заголовке покажет, что форма заполнена правильно",
4646
"ValidateOk": "Форма заполнена правильно",
47-
"EditAnswers": "Редактировать ответы"
47+
"EditAnswers": "Редактировать ответы",
48+
"ConfigLabel": "Опросы",
49+
"ConfigDescription": "Расширение реализующее опросы"
4850
}
4951
}

plugins/survey-assets/lang/zh.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@
4343
"SurveySubmitConfirm": "提交后无法更改答案。您确定现在提交吗?",
4444
"ValidateFail": "某些必填问题未作答",
4545
"ValidateInfo": "这是用户看到的表单样式。请尝试输入答案并选择选项来测试调查。顶部的绿色图标表示表单已正确填写。",
46-
"ValidateOk": "表单填写正确"
46+
"ValidateOk": "表单填写正确",
47+
"ConfigLabel": "调查",
48+
"ConfigDescription": "管理调查的扩展"
4749
}
4850
}

plugins/survey/src/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,9 @@ const survey = plugin(surveyId, {
9696
ValidateFail: '' as IntlString,
9797
ValidateInfo: '' as IntlString,
9898
ValidateOk: '' as IntlString,
99-
EditAnswers: '' as IntlString
99+
EditAnswers: '' as IntlString,
100+
ConfigLabel: '' as IntlString,
101+
ConfigDescription: '' as IntlString
100102
},
101103
component: {
102104
CreateSurvey: '' as AnyComponent,

0 commit comments

Comments
 (0)