From 60d196fcf5701418df5f4119790acce7a23cdb65 Mon Sep 17 00:00:00 2001 From: Nastya Date: Tue, 19 Dec 2023 23:51:13 +0300 Subject: [PATCH] =?UTF-8?q?=D0=B5=D1=81=D0=BB=D0=B8=20=D0=B2=20=D0=BF?= =?UTF-8?q?=D1=83=D0=B1=D0=BB=D0=B8=D0=BA=D0=B0=D1=86=D0=B8=D0=B8=20=D0=B5?= =?UTF-8?q?=D0=B4=D0=B8=D0=BD=D1=81=D1=82=D0=B2=D0=B5=D0=BD=D0=BD=D1=8B?= =?UTF-8?q?=D0=B9=20=D0=B2=D0=BE=D0=BF=D1=80=D0=BE=D1=81=20-=20=D1=80?= =?UTF-8?q?=D0=B5=D0=B7=D1=83=D0=BB=D1=8C=D1=82=D0=B0=D1=82=20-=20=D0=BD?= =?UTF-8?q?=D0=B5=20=D0=B2=D1=8B=D0=B2=D0=BE=D0=B4=D0=B8=D1=82=D1=8C=20?= =?UTF-8?q?=D0=BF=D1=83=D0=B1=D0=BB=D0=B8=D0=BA=D0=B0=D1=86=D0=B8=D1=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Questions/Form/FormDraggableList/QuestionPageCard.tsx | 5 +++-- src/pages/ViewPublicationPage/ResultForm.tsx | 1 + src/pages/ViewPublicationPage/index.tsx | 5 ++++- src/pages/startPage/EditPage.tsx | 2 +- src/ui_kit/CustomTextField.tsx | 2 +- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/pages/Questions/Form/FormDraggableList/QuestionPageCard.tsx b/src/pages/Questions/Form/FormDraggableList/QuestionPageCard.tsx index d4f140f5..14be7e7b 100644 --- a/src/pages/Questions/Form/FormDraggableList/QuestionPageCard.tsx +++ b/src/pages/Questions/Form/FormDraggableList/QuestionPageCard.tsx @@ -51,6 +51,7 @@ export default function QuestionsPageCard({ question, questionIndex, draggablePr }); }, 200); + console.log(question) return ( <> setTitle(target.value)} sx={{ width: "100%" }} InputProps={{ @@ -224,4 +225,4 @@ const IconAndrom = (questionType: QuestionType | null) => { default: return ; } -}; +}; \ No newline at end of file diff --git a/src/pages/ViewPublicationPage/ResultForm.tsx b/src/pages/ViewPublicationPage/ResultForm.tsx index e0e5df4d..9dd57782 100644 --- a/src/pages/ViewPublicationPage/ResultForm.tsx +++ b/src/pages/ViewPublicationPage/ResultForm.tsx @@ -36,6 +36,7 @@ export const ResultForm = ({ setShowResultForm(false); setShowContactForm(true); }; + if (resultQuestion === undefined) return <> return ( { questions.filter(({ type }) => type) as AnyTypedQuizQuestion[] ).sort((previousItem, item) => previousItem.page - item.page); + + console.log(questions) + if (visualStartPage === undefined) return <>; - if (questions.length === 0) return + if (questions.length === 0 || (questions.length === 1 && questions[0].type === "result")) return return ( {!visualStartPage ? ( diff --git a/src/pages/startPage/EditPage.tsx b/src/pages/startPage/EditPage.tsx index df0d7dd4..11f091bb 100755 --- a/src/pages/startPage/EditPage.tsx +++ b/src/pages/startPage/EditPage.tsx @@ -366,7 +366,7 @@ export default function EditPage() { )} - {quiz.status === "stop" ? + {!canCreatePublic && quiz.config.type !== "form" ?