diff --git a/feature/management-event/src/main/java/com/wap/wapp/feature/management/event/registration/EventRegistrationScreen.kt b/feature/management-event/src/main/java/com/wap/wapp/feature/management/event/registration/EventRegistrationScreen.kt index 16a53c44..48bd84d1 100644 --- a/feature/management-event/src/main/java/com/wap/wapp/feature/management/event/registration/EventRegistrationScreen.kt +++ b/feature/management-event/src/main/java/com/wap/wapp/feature/management/event/registration/EventRegistrationScreen.kt @@ -159,12 +159,7 @@ internal fun EventRegistrationScreen( EventRegistrationContent( eventRegistrationState = currentRegistrationState, modifier = Modifier - .padding( - top = 50.dp, - start = 20.dp, - end = 20.dp, - bottom = 20.dp, - ), + .padding(top = 50.dp, start = 20.dp, end = 20.dp, bottom = 20.dp), eventTitle = title, eventContent = content, location = location, diff --git a/feature/management-event/src/main/java/com/wap/wapp/feature/management/event/registration/EventRegistrationViewModel.kt b/feature/management-event/src/main/java/com/wap/wapp/feature/management/event/registration/EventRegistrationViewModel.kt index 2f0217db..927f4ba8 100644 --- a/feature/management-event/src/main/java/com/wap/wapp/feature/management/event/registration/EventRegistrationViewModel.kt +++ b/feature/management-event/src/main/java/com/wap/wapp/feature/management/event/registration/EventRegistrationViewModel.kt @@ -54,11 +54,17 @@ class EventRegistrationViewModel @Inject constructor( MutableStateFlow(generateNowTime().plusHours(1)) val eventEndTime = _eventEndTime.asStateFlow() - fun setEventTitle(eventTitle: String) { _eventTitle.value = eventTitle } + fun setEventTitle(eventTitle: String) { + _eventTitle.value = eventTitle + } - fun setEventContent(eventContent: String) { _eventContent.value = eventContent } + fun setEventContent(eventContent: String) { + _eventContent.value = eventContent + } - fun setEventLocation(eventLocation: String) { _eventLocation.value = eventLocation } + fun setEventLocation(eventLocation: String) { + _eventLocation.value = eventLocation + } fun setEventStartDate(eventDate: LocalDate) { if (!isValidStartDate(eventDate)) { @@ -68,7 +74,9 @@ class EventRegistrationViewModel @Inject constructor( _eventStartDate.value = eventDate } - fun setEventStartTime(eventTime: LocalTime) { _eventStartTime.value = eventTime } + fun setEventStartTime(eventTime: LocalTime) { + _eventStartTime.value = eventTime + } fun setEventEndDate(eventDate: LocalDate) { if (!isValidEndDate(eventDate)) { @@ -122,8 +130,15 @@ class EventRegistrationViewModel @Inject constructor( } } - private fun isValidEndTime(eventTime: LocalTime): Boolean = - _eventEndDate.value == _eventStartDate.value && eventTime > _eventStartTime.value + private fun isValidEndTime(eventTime: LocalTime): Boolean { + if (_eventEndDate.value > _eventStartDate.value) { + return true + } + if (_eventEndDate.value == _eventStartDate.value && eventTime > _eventStartTime.value) { + return true + } + return false + } private fun isValidEndDate(eventDate: LocalDate): Boolean = eventDate >= _eventStartDate.value diff --git a/feature/survey-check/src/main/java/com/wap/wapp/feature/survey/check/SurveyCheckScreen.kt b/feature/survey-check/src/main/java/com/wap/wapp/feature/survey/check/SurveyCheckScreen.kt index 5f14eb35..e67338fe 100644 --- a/feature/survey-check/src/main/java/com/wap/wapp/feature/survey/check/SurveyCheckScreen.kt +++ b/feature/survey-check/src/main/java/com/wap/wapp/feature/survey/check/SurveyCheckScreen.kt @@ -61,7 +61,7 @@ internal fun SurveyCheckScreen( verticalArrangement = Arrangement.spacedBy(20.dp), modifier = Modifier .fillMaxSize() - .padding(start = 16.dp, end = 16.dp, bottom = 16.dp, top = 40.dp) + .padding(start = 16.dp, end = 16.dp, bottom = 16.dp, top = 20.dp) .padding(paddingValues), ) { val surveyList = surveyListUiState.surveyList