From c8b82a4ea3a2ecee018a6ed0005ef97662d147c0 Mon Sep 17 00:00:00 2001 From: tgyuu-An Date: Wed, 6 Dec 2023 21:39:35 +0900 Subject: [PATCH] =?UTF-8?q?[FIX]=20#61=20:=20=EA=B4=80=EB=A6=AC=20?= =?UTF-8?q?=ED=99=94=EB=A9=B4=EC=97=90=EC=84=9C=20=EC=B6=94=EA=B0=80=20?= =?UTF-8?q?=ED=99=94=EB=A9=B4=20navigate=20=EB=B9=BC=EB=A8=B9=EC=9D=80?= =?UTF-8?q?=EA=B1=B0=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/com/wap/wapp/navigation/WappNavHost.kt | 7 ++++++- .../wap/wapp/feature/management/ManagementViewModel.kt | 3 ++- .../management/navigation/ManagementNavigation.kt | 4 ++-- .../registration/event/EventRegistrationContent.kt | 9 ++++----- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/app/src/main/java/com/wap/wapp/navigation/WappNavHost.kt b/app/src/main/java/com/wap/wapp/navigation/WappNavHost.kt index dde6b979..f711223c 100644 --- a/app/src/main/java/com/wap/wapp/navigation/WappNavHost.kt +++ b/app/src/main/java/com/wap/wapp/navigation/WappNavHost.kt @@ -16,6 +16,8 @@ import com.wap.wapp.feature.management.check.navigation.surveyCheckScreen import com.wap.wapp.feature.management.navigation.managementScreen import com.wap.wapp.feature.management.navigation.navigateToManagement import com.wap.wapp.feature.management.registration.event.navigation.eventRegistrationScreen +import com.wap.wapp.feature.management.registration.event.navigation.navigateToEventRegistration +import com.wap.wapp.feature.management.registration.survey.navigation.navigateToSurveyRegistration import com.wap.wapp.feature.management.registration.survey.navigation.surveyRegistrationScreen import com.wap.wapp.feature.notice.navigation.navigateToNotice import com.wap.wapp.feature.notice.navigation.noticeScreen @@ -69,6 +71,9 @@ fun WappNavHost( profileScreen( navigateToProfileSetting = { navController.navigateToProfileSetting() }, ) - managementScreen() + managementScreen( + navigateToSurveyRegistration = { navController.navigateToSurveyRegistration() }, + navigateToEventRegistration = { navController.navigateToEventRegistration() }, + ) } } diff --git a/feature/management/src/main/java/com/wap/wapp/feature/management/ManagementViewModel.kt b/feature/management/src/main/java/com/wap/wapp/feature/management/ManagementViewModel.kt index 71ef91dc..f575936c 100644 --- a/feature/management/src/main/java/com/wap/wapp/feature/management/ManagementViewModel.kt +++ b/feature/management/src/main/java/com/wap/wapp/feature/management/ManagementViewModel.kt @@ -28,7 +28,8 @@ class ManagementViewModel @Inject constructor( private val _errorFlow: MutableSharedFlow = MutableSharedFlow() val errorFlow: SharedFlow = _errorFlow.asSharedFlow() - private val _managerState: MutableStateFlow = MutableStateFlow(ManagerState.Init) + //for test + private val _managerState: MutableStateFlow = MutableStateFlow(ManagerState.Manager) val managerState: StateFlow = _managerState.asStateFlow() private val _surveyList: MutableStateFlow> = MutableStateFlow(emptyList()) diff --git a/feature/management/src/main/java/com/wap/wapp/feature/management/navigation/ManagementNavigation.kt b/feature/management/src/main/java/com/wap/wapp/feature/management/navigation/ManagementNavigation.kt index 49c67ecd..ebcd4561 100644 --- a/feature/management/src/main/java/com/wap/wapp/feature/management/navigation/ManagementNavigation.kt +++ b/feature/management/src/main/java/com/wap/wapp/feature/management/navigation/ManagementNavigation.kt @@ -14,8 +14,8 @@ fun NavController.navigateToManagement(navOptions: NavOptions? = navOptions {}) } fun NavGraphBuilder.managementScreen( - navigateToEventRegistration: () -> Unit = {}, - navigateToSurveyRegistration: () -> Unit = {}, + navigateToEventRegistration: () -> Unit, + navigateToSurveyRegistration: () -> Unit, showToast: (String) -> Unit = {}, ) { composable(route = managementNavigationRoute) { diff --git a/feature/management/src/main/java/com/wap/wapp/feature/management/registration/event/EventRegistrationContent.kt b/feature/management/src/main/java/com/wap/wapp/feature/management/registration/event/EventRegistrationContent.kt index 6514e834..d397921e 100644 --- a/feature/management/src/main/java/com/wap/wapp/feature/management/registration/event/EventRegistrationContent.kt +++ b/feature/management/src/main/java/com/wap/wapp/feature/management/registration/event/EventRegistrationContent.kt @@ -72,12 +72,13 @@ private fun EventDetailsContent( title = stringResource(id = R.string.event_details_title), content = stringResource(id = R.string.event_details_content), ) - Box(modifier = Modifier.fillMaxSize()) { + Column(modifier = Modifier.fillMaxSize()) { Column( verticalArrangement = Arrangement.spacedBy(10.dp), modifier = Modifier + .fillMaxSize() .padding(top = 50.dp) - .align(Alignment.TopCenter), + .weight(1f), ) { Text( text = stringResource(R.string.event_title), @@ -112,9 +113,7 @@ private fun EventDetailsContent( WappButton( onClick = onNextButtonClicked, textRes = R.string.next, - modifier = Modifier - .align(Alignment.BottomCenter) - .padding(bottom = 20.dp), + modifier = Modifier.padding(bottom = 20.dp), ) } }