Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

πŸ”€ :: (#255) - Feature λͺ¨λ“ˆμ˜ ꡬ쑰λ₯Ό λͺ©μ μ— 맞게 ꡬ쑰 변경을 ν–ˆμŠ΅λ‹ˆλ‹€. #257

Merged
merged 17 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,11 @@ dependencies {

implementation(project(":feature:signin"))
implementation(project(":feature:signup"))
implementation(project(":feature:home"))
implementation(project(":feature:program"))
implementation(project(":feature:expo"))
implementation(project(":feature:standard"))
implementation(project(":feature:training"))
implementation(project(":feature:sms"))

implementation(libs.androidx.core.splashscreen)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,23 @@ import com.school_of_company.expo.navigation.navigateToExpoDetail
import com.school_of_company.expo.navigation.navigateToExpoModify
import com.school_of_company.expo.navigation.navigateToHome
import com.school_of_company.expo_android.ui.ExpoAppState
import com.school_of_company.home.navigation.homeDetailParticipantManagementScreen
import com.school_of_company.home.navigation.homeDetailProgramScreen
import com.school_of_company.home.navigation.homeDetailStandardProgramParticipantScreen
import com.school_of_company.home.navigation.homeDetailTrainingProgramParticipantScreen
import com.school_of_company.home.navigation.homeSendMessageScreen
import com.school_of_company.home.navigation.navigateQrScanner
import com.school_of_company.home.navigation.navigateToHomeDetailParticipantManagement
import com.school_of_company.home.navigation.navigateToHomeDetailProgram
import com.school_of_company.home.navigation.navigateToHomeDetailStandardProgramParticipant
import com.school_of_company.home.navigation.navigateToHomeDetailTrainingProgramParticipant
import com.school_of_company.home.navigation.navigateToHomeSendMessage
import com.school_of_company.home.navigation.qrScannerScreen
import com.school_of_company.program.navigation.navigateQrScanner
import com.school_of_company.program.navigation.qrScannerScreen
import com.school_of_company.navigation.navigateToSignIn
import com.school_of_company.navigation.sigInRoute
import com.school_of_company.navigation.signInScreen
import com.school_of_company.program.navigation.navigateToProgramDetailParticipantManagement
import com.school_of_company.program.navigation.navigateToProgramDetailProgram
import com.school_of_company.program.navigation.programDetailParticipantManagementScreen
import com.school_of_company.program.navigation.programDetailProgramScreen
import com.school_of_company.signup.navigation.navigationToSignUp
import com.school_of_company.signup.navigation.signUpScreen
import com.school_of_company.sms.navigation.navigateToSmsSendMessage
import com.school_of_company.sms.navigation.smsSendMessageScreen
import com.school_of_company.standard.navigation.navigateToStandardProgramParticipant
import com.school_of_company.standard.navigation.standardProgramParticipantScreen
import com.school_of_company.training.navigation.navigateToTrainingProgramParticipant
import com.school_of_company.training.navigation.trainingProgramParticipantScreen
import com.school_of_company.ui.toast.makeToast

@Composable
Expand Down Expand Up @@ -82,42 +82,42 @@ fun ExpoNavHost(

expoDetailScreen(
onBackClick = navController::popBackStack,
onMessageClick = navController::navigateToHomeSendMessage,
onCheckClick = navController::navigateToHomeDetailParticipantManagement,
onMessageClick = navController::navigateToSmsSendMessage,
onCheckClick = navController::navigateToProgramDetailParticipantManagement,
onQrGenerateClick = {},
onModifyClick = { id ->
navController.navigateToExpoModify(id)
},
onProgramClick = { id ->
navController.navigateToHomeDetailProgram(id)
navController.navigateToProgramDetailProgram(id)
}
)

homeSendMessageScreen(
smsSendMessageScreen(
onBackClick = navController::popBackStack,
)

homeDetailProgramScreen(
programDetailProgramScreen(
onBackClick = navController::popBackStack,
navigateToTrainingProgramDetail = { id ->
navController.navigateToHomeDetailTrainingProgramParticipant(id)
navController.navigateToTrainingProgramParticipant(id)
},
navigateToStandardProgramDetail = { id ->
navController.navigateToHomeDetailStandardProgramParticipant(id)
navController.navigateToStandardProgramParticipant(id)
}
)

homeDetailTrainingProgramParticipantScreen(
trainingProgramParticipantScreen(
onBackClick = navController::popBackStack,
navigateToQrScanner = navController::navigateQrScanner
)

homeDetailStandardProgramParticipantScreen(
standardProgramParticipantScreen(
onBackClick = navController::popBackStack,
navigateToQrScanner = navController::navigateQrScanner
)

homeDetailParticipantManagementScreen(
programDetailParticipantManagementScreen(
onBackClick = navController::popBackStack
)

Expand Down

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.school_of_company.home
package com.school_of_company.program

import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.school_of_company.home.enum
package com.school_of_company.program.enum

enum class ProgramEnum {
NORMAL,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
package com.school_of_company.program.navigation

import androidx.navigation.NavController
import androidx.navigation.NavGraphBuilder
import androidx.navigation.NavOptions
import androidx.navigation.compose.composable
import com.school_of_company.program.view.ProgramDetailParticipantManagementRoute
import com.school_of_company.program.view.ProgramDetailProgramRoute
import com.school_of_company.program.view.QrScannerRoute

const val programDetailProgramRoute = "program_detail_program_route"
const val programDetailParticipantManagementRoute = "program_detail_participant_management_route"
const val qrScannerRoute = "qr_scanner_route"

fun NavController.navigateToProgramDetailProgram(
id: String,
navOptions: NavOptions? = null
) {
this.navigate(
route = "$programDetailProgramRoute/${id}",
navOptions
)
}

fun NavController.navigateToProgramDetailParticipantManagement(navOptions: NavOptions? = null) {
this.navigate(programDetailParticipantManagementRoute, navOptions)
}

fun NavController.navigateQrScanner(
id: Long,
traineeId: Long,
navOptions: NavOptions? = null
) {
this.navigate(
route = "$qrScannerRoute/${id}/${traineeId}",
navOptions
)
}

fun NavGraphBuilder.programDetailProgramScreen(
onBackClick: () -> Unit,
navigateToTrainingProgramDetail: (Long) -> Unit,
navigateToStandardProgramDetail: (Long) -> Unit
) {
composable(route = "$programDetailProgramRoute/{id}") { backStackEntry ->
val id = backStackEntry.arguments?.getString("id") ?: ""
ProgramDetailProgramRoute(
id = id,
onBackClick = onBackClick,
navigateToTrainingProgramDetail = navigateToTrainingProgramDetail,
navigateToStandardProgramDetail = navigateToStandardProgramDetail
)
}
}

fun NavGraphBuilder.programDetailParticipantManagementScreen(
onBackClick: () -> Unit
) {
composable(route = programDetailParticipantManagementRoute) {
ProgramDetailParticipantManagementRoute(
onBackClick = onBackClick
)
}
}

fun NavGraphBuilder.qrScannerScreen(
onBackClick: () -> Unit,
onPermissionBlock: () -> Unit
) {
composable(route = "$qrScannerRoute/{id}/{traineeId}") { backStackEntry ->
val id = backStackEntry.arguments?.getString("id")?.toLongOrNull()
val traineeId = backStackEntry.arguments?.getString("traineeId")?.toLongOrNull()
if (id != null && traineeId != null) {
QrScannerRoute(
id = id,
traineeId = traineeId,
onBackClick = onBackClick,
onPermissionBlock = onPermissionBlock
)
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.school_of_company.home.util
package com.school_of_company.program.util

import android.util.Log
import androidx.camera.core.ImageAnalysis
Expand Down
Loading
Loading