From 1bfc1f4c9f8e44b162804af972f942021dbc9f67 Mon Sep 17 00:00:00 2001 From: jeongjaino Date: Tue, 6 Feb 2024 21:25:08 +0900 Subject: [PATCH] =?UTF-8?q?[CHORE]=20#95=20:=20=EB=B3=91=ED=95=A9=20?= =?UTF-8?q?=EC=B6=A9=EB=8F=8C=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/wap/wapp/MainActivity.kt | 1 + .../feature/survey/answer/SurveyAnswerForm.kt | 30 ++----------------- 2 files changed, 4 insertions(+), 27 deletions(-) diff --git a/app/src/main/java/com/wap/wapp/MainActivity.kt b/app/src/main/java/com/wap/wapp/MainActivity.kt index 9e3c8755..29a43d65 100644 --- a/app/src/main/java/com/wap/wapp/MainActivity.kt +++ b/app/src/main/java/com/wap/wapp/MainActivity.kt @@ -118,6 +118,7 @@ private fun handleBottomBarState( ManagementSurveyRoute.surveyFormRegistrationRoute -> setBottomBarState(false) eventRegistrationNavigationRoute -> setBottomBarState(false) SurveyRoute.answerRoute("{id}") ->setBottomBarState(false) + ManagementSurveyRoute.surveyFormEditRoute("{id}") -> setBottomBarState(false) else -> setBottomBarState(true) } diff --git a/feature/survey/src/main/java/com/wap/wapp/feature/survey/answer/SurveyAnswerForm.kt b/feature/survey/src/main/java/com/wap/wapp/feature/survey/answer/SurveyAnswerForm.kt index 61582b85..db843423 100644 --- a/feature/survey/src/main/java/com/wap/wapp/feature/survey/answer/SurveyAnswerForm.kt +++ b/feature/survey/src/main/java/com/wap/wapp/feature/survey/answer/SurveyAnswerForm.kt @@ -66,9 +66,9 @@ internal fun SurveyAnswerForm( modifier = Modifier.weight(1f), ) - SurveyAnswerButton( - isLastQuestion = isLastQuestion, - onButtonClicked = onNextQuestionButtonClicked, + WappButton( + textRes = if (isLastQuestion) R.string.submit else R.string.next, + onClick = { onNextQuestionButtonClicked() }, isEnabled = checkQuestionTypeAndSubjectiveAnswer( questionType = surveyQuestion.questionType, subjectiveAnswer = subjectiveAnswer, @@ -79,30 +79,6 @@ internal fun SurveyAnswerForm( } } -@Composable -private fun SurveyAnswerButton( - isLastQuestion: Boolean, - isEnabled: Boolean, - onButtonClicked: () -> Unit, - modifier: Modifier, -) { - if (isLastQuestion) { - WappButton( - textRes = R.string.submit, - onClick = { onButtonClicked() }, - isEnabled = isEnabled, - modifier = modifier, - ) - } else { - WappButton( - textRes = R.string.next, - onClick = { onButtonClicked() }, - isEnabled = isEnabled, - modifier = modifier, - ) - } -} - private fun checkQuestionTypeAndSubjectiveAnswer( questionType: QuestionType, subjectiveAnswer: String,