Skip to content

Commit

Permalink
[FIX] #61 : 관리 화면에서 추가 화면 navigate 빼먹은거 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
tgyuuAn committed Dec 6, 2023
1 parent cef1650 commit c8b82a4
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
7 changes: 6 additions & 1 deletion app/src/main/java/com/wap/wapp/navigation/WappNavHost.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -69,6 +71,9 @@ fun WappNavHost(
profileScreen(
navigateToProfileSetting = { navController.navigateToProfileSetting() },
)
managementScreen()
managementScreen(
navigateToSurveyRegistration = { navController.navigateToSurveyRegistration() },
navigateToEventRegistration = { navController.navigateToEventRegistration() },
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ class ManagementViewModel @Inject constructor(
private val _errorFlow: MutableSharedFlow<Throwable> = MutableSharedFlow()
val errorFlow: SharedFlow<Throwable> = _errorFlow.asSharedFlow()

private val _managerState: MutableStateFlow<ManagerState> = MutableStateFlow(ManagerState.Init)
//for test
private val _managerState: MutableStateFlow<ManagerState> = MutableStateFlow(ManagerState.Manager)
val managerState: StateFlow<ManagerState> = _managerState.asStateFlow()

private val _surveyList: MutableStateFlow<List<Survey>> = MutableStateFlow(emptyList())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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),
)
}
}
Expand Down

0 comments on commit c8b82a4

Please sign in to comment.