Skip to content

Commit

Permalink
Merge pull request #144 from pknu-wap/feature/jaino/#128
Browse files Browse the repository at this point in the history
Feature/jaino/#128
  • Loading branch information
jeongjaino authored Feb 27, 2024
2 parents 18e78a7 + 83a72f2 commit f2e53e3
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ class EventEditViewModel @Inject constructor(
val endDate = _eventEndDate.value

if (startDate == endDate) {
return eventTime > _eventStartTime.value
val startTime = _eventStartTime.value
return eventTime > startTime
}
return startDate < endDate
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ class EventRegistrationViewModel @Inject constructor(
val endDate = _eventEndDate.value

if (startDate == endDate) {
return eventTime > _eventStartTime.value
val startTime = _eventStartTime.value
return eventTime > startTime
}
return startDate < endDate
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ internal fun SurveyDeadlineContent(
)

WappButton(
textRes = R.string.next,
textRes = R.string.submit_survey,
onClick = onRegisterButtonClicked,
modifier = Modifier.weight(1f),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ internal fun SurveyEventContent(
verticalArrangement = Arrangement.spacedBy(16.dp),
modifier = Modifier
.fillMaxWidth()
.weight(1f)
.weight(1f),
) {
when (eventsState) {
is EventsState.Loading -> item {
Expand Down
1 change: 1 addition & 0 deletions feature/management-survey/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,5 @@
<string name="next_question">다음 질문</string>
<string name="previous_question">이전 질문</string>
<string name="survey_form_registration_content_animated_content">Survey Form Registration Content Animated Content</string>
<string name="submit_survey">설문 등록</string>
</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ private fun checkQuestionTypeAndSubjectiveAnswer(
if (questionType == QuestionType.OBJECTIVE) {
return true
}
return subjectiveAnswer.length >= MINIMUN_ANSWER_LENGTH
return subjectiveAnswer.length >= MINIMUM_ANSWER_LENGTH
}

private val MINIMUN_ANSWER_LENGTH = 10
private const val MINIMUM_ANSWER_LENGTH = 8
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.wap.designsystem.WappTheme
import com.wap.designsystem.component.WappSubTopBar
import com.wap.wapp.core.commmon.extensions.toSupportingText
import com.wap.wapp.core.designresource.R.drawable
import com.wap.wapp.core.model.survey.Rating
import com.wap.wapp.core.model.survey.SurveyForm
import com.wap.wapp.feature.survey.R
Expand Down Expand Up @@ -65,6 +66,7 @@ internal fun SurveyAnswerScreen(
titleRes = R.string.survey_answer,
showLeftButton = true,
modifier = Modifier.padding(top = 16.dp), // 하단은 Content Padding에 의존
leftButtonDrawableRes = drawable.ic_close,
onClickLeftButton = {
when (surveyAnswerState) {
SurveyAnswerState.SURVEY_OVERVIEW -> navigateToSurvey()
Expand Down Expand Up @@ -112,6 +114,8 @@ internal fun SurveyAnswerScreen(
// 응답의 갯수가 질문의 갯수보다 작은 경우
if (questionNumber >= surveyAnswerList.size) {
viewModel.addSurveyAnswer()
} else {
viewModel.editSurveyAnswer()
}
viewModel.setPreviousQuestionAndAnswer()
},
Expand Down
2 changes: 1 addition & 1 deletion feature/survey/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<string name="survey_title">설문 작성</string>
<string name="survey_content">참가한 행사에 대해 설문에 응답하세요!</string>
<string name="survey_answer">설문 응답</string>
<string name="text_counter_content">/10자 이상</string>
<string name="text_counter_content">/8자 이상</string>
<string name="alreay_submitted_description">이미 작성한 설문입니다.</string>
<string name="go_to_signin">로그인 하러가기</string>
<string name="survey_guset_title">앗 회원이 아니시네요 !</string>
Expand Down

0 comments on commit f2e53e3

Please sign in to comment.