diff --git a/src/front/src/components/testing/ConstructorTest/CreatedTest.vue b/src/front/src/components/testing/ConstructorTest/CreatedTest.vue new file mode 100644 index 000000000..64629d756 --- /dev/null +++ b/src/front/src/components/testing/ConstructorTest/CreatedTest.vue @@ -0,0 +1,14 @@ + + + diff --git a/src/front/src/components/testing/TestConstructor.vue b/src/front/src/components/testing/TestConstructor.vue new file mode 100644 index 000000000..0fd1dcea7 --- /dev/null +++ b/src/front/src/components/testing/TestConstructor.vue @@ -0,0 +1,420 @@ + + + + + diff --git a/src/front/src/components/vote/ConstructorVote/AnswerList.vue b/src/front/src/components/vote/ConstructorVote/AnswerList.vue index 43225bda4..0897ed11e 100644 --- a/src/front/src/components/vote/ConstructorVote/AnswerList.vue +++ b/src/front/src/components/vote/ConstructorVote/AnswerList.vue @@ -6,15 +6,15 @@ :key="aIndex" class="d-flex align-start mb-4" > - + - mdi-check + mdi-check mdi-close @@ -76,22 +76,29 @@ export default { removeAnswer: { type: Function, required: true, + }, + isTest: { + type: Boolean, + default: false } }, - setup() { + setup(props) { const route = useRoute(); + // Поддерживаем оба способа определения: через роут или через явный проп const isTestRoute = computed(() => { return route.path && String(route.path).includes('test'); }); const toggleCorrect = (answer) => { - answer.correct = !answer.correct; + // Используем right_wrong для тестов (совместимо с бэкендом) + answer.right_wrong = !answer.right_wrong; }; return { isTestRoute, toggleCorrect, + isTest: props.isTest }; } }; diff --git a/src/front/src/components/vote/ConstructorVote/CreatedVote.vue b/src/front/src/components/vote/ConstructorVote/CreatedVote.vue index 5c7b7295b..0859d8aa4 100644 --- a/src/front/src/components/vote/ConstructorVote/CreatedVote.vue +++ b/src/front/src/components/vote/ConstructorVote/CreatedVote.vue @@ -3,11 +3,19 @@
mdi-check-circle -

Голосование создано!

+

{{ title || 'Голосование создано!' }}

- diff --git a/src/front/src/components/vote/ConstructorVote/MainInfo.vue b/src/front/src/components/vote/ConstructorVote/MainInfo.vue index 3a3f7bd4f..0f4e14401 100644 --- a/src/front/src/components/vote/ConstructorVote/MainInfo.vue +++ b/src/front/src/components/vote/ConstructorVote/MainInfo.vue @@ -1,6 +1,6 @@