From e70d1b90dac566d08e1b4d52849fb8cbf3649e60 Mon Sep 17 00:00:00 2001 From: noctesilente Date: Wed, 12 Jun 2024 21:33:14 +0900 Subject: [PATCH 1/8] =?UTF-8?q?feat(quiz):=20=ED=80=B4=EC=A6=88=20?= =?UTF-8?q?=EC=83=9D=EC=84=B1=20=EB=AA=A8=EB=8B=AC=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/quiz/CreateQuiz.vue | 230 +++++++++++++++++++++-------- 1 file changed, 172 insertions(+), 58 deletions(-) diff --git a/src/components/quiz/CreateQuiz.vue b/src/components/quiz/CreateQuiz.vue index 5ff5a3b..32c2736 100644 --- a/src/components/quiz/CreateQuiz.vue +++ b/src/components/quiz/CreateQuiz.vue @@ -1,80 +1,194 @@ - + \ No newline at end of file From ac586cfa792be9f06ba52f32a8e738c527d760ed Mon Sep 17 00:00:00 2001 From: noctesilente Date: Wed, 12 Jun 2024 21:40:29 +0900 Subject: [PATCH 2/8] =?UTF-8?q?feat(quiz):=20=ED=80=B4=EC=A6=88=20?= =?UTF-8?q?=ED=91=B8=EB=8A=94=20=EB=AA=A8=EB=8B=AC=EC=B0=BD=20=EA=B5=AC?= =?UTF-8?q?=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/quiz/TakeQuiz.vue | 104 +++++++++++++++---------------- 1 file changed, 49 insertions(+), 55 deletions(-) diff --git a/src/components/quiz/TakeQuiz.vue b/src/components/quiz/TakeQuiz.vue index 75f87e7..4040323 100644 --- a/src/components/quiz/TakeQuiz.vue +++ b/src/components/quiz/TakeQuiz.vue @@ -1,71 +1,66 @@ + \ No newline at end of file From c8399274b0e30dad3facf7841ce6a3eee8f61463 Mon Sep 17 00:00:00 2001 From: noctesilente Date: Wed, 12 Jun 2024 21:42:44 +0900 Subject: [PATCH 3/8] =?UTF-8?q?feat(quiz):=20=ED=80=B4=EC=A6=88=20?= =?UTF-8?q?=EB=AA=A8=EB=8B=AC=EC=B0=BD=20=EB=91=90=20=EA=B0=9C=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/post/SelectedPostDetail.vue | 94 +++++++++++++++++++--- 1 file changed, 83 insertions(+), 11 deletions(-) diff --git a/src/components/post/SelectedPostDetail.vue b/src/components/post/SelectedPostDetail.vue index 5c2179c..a411ae1 100644 --- a/src/components/post/SelectedPostDetail.vue +++ b/src/components/post/SelectedPostDetail.vue @@ -92,9 +92,21 @@ assistant_navigation -
- -
+
+ + + + +
+
+

원래 퀴즈

+

문제: {{ originalQuizData.content }}

+

답안: {{ originalQuizData.answer }}

+

참조 내용: {{ originalQuizData.commentary }}

+

활성화: {{ originalQuizData.status ? '예' : '아니오' }}

+
+
@@ -48,6 +56,7 @@ const props = defineProps({ const emit = defineEmits(['close-edit-quiz']); +const originalQuizData = ref(null); const quizData = ref({ content: '', answer: '', @@ -66,7 +75,8 @@ const closeModal = () => { const fetchQuizData = async () => { try { const response = await axios.get(`http://triumers-back.ap-northeast-2.elasticbeanstalk.com/quiz/contents?id=${props.quizId}`); - quizData.value = response.data; + originalQuizData.value = response.data; + quizData.value = { ...response.data }; } catch (error) { console.error('퀴즈 데이터 가져오기 실패:', error); } @@ -137,6 +147,10 @@ const submitQuiz = async () => { margin-top: 20px; } +.original-quiz { + margin-bottom: 20px; +} + .form-group { margin-bottom: 20px; } From 98ee32706cd75e748229e14d7053dd79764e6b63 Mon Sep 17 00:00:00 2001 From: noctesilente Date: Thu, 13 Jun 2024 09:10:20 +0900 Subject: [PATCH 7/8] =?UTF-8?q?refactor(quiz):=20=EB=AC=B8=EC=A0=9C=20?= =?UTF-8?q?=ED=92=80=EA=B3=A0=20=EB=82=98=EC=84=9C=20=EB=8B=B5=EA=B3=BC=20?= =?UTF-8?q?=ED=95=A8=EA=BB=98=20=ED=95=B4=EC=84=A4=EA=B9=8C=EC=A7=80=20?= =?UTF-8?q?=EB=9C=A8=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/quiz/TakeQuiz.vue | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/components/quiz/TakeQuiz.vue b/src/components/quiz/TakeQuiz.vue index 4040323..7cb0135 100644 --- a/src/components/quiz/TakeQuiz.vue +++ b/src/components/quiz/TakeQuiz.vue @@ -18,7 +18,10 @@

정답입니다!

-

틀렸습니다. 정답은 {{ quiz.answer }}입니다.

+
+

틀렸습니다. 정답은 {{ quiz.answer }}입니다.

+

해설: {{ quiz.commentary }}

+
@@ -54,7 +57,6 @@ const submitQuestion = async () => { answer: answer.value, employeeId: 1, }); - isCorrect.value = answer.value.trim().toLowerCase() === props.quiz.answer.trim().toLowerCase(); showResult.value = true; } catch (error) { @@ -141,4 +143,8 @@ const submitQuestion = async () => { .incorrect { color: red; } + +.incorrect p { + margin-bottom: 5px; +} \ No newline at end of file From b4cd9f1067fb2bfa375b75346c9be34f1908b3f7 Mon Sep 17 00:00:00 2001 From: noctesilente Date: Thu, 13 Jun 2024 09:35:08 +0900 Subject: [PATCH 8/8] =?UTF-8?q?refactor(quiz):=20=ED=80=B4=EC=A6=88=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=20=EB=B2=84=ED=8A=BC=20=EC=9A=B0=EC=84=A0=20?= =?UTF-8?q?=EC=A3=BC=EC=84=9D=20=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/post/SelectedPostDetail.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/post/SelectedPostDetail.vue b/src/components/post/SelectedPostDetail.vue index 94387ad..b70a8aa 100644 --- a/src/components/post/SelectedPostDetail.vue +++ b/src/components/post/SelectedPostDetail.vue @@ -96,7 +96,7 @@
- +