Skip to content

Commit

Permalink
Merge pull request #281 from School-of-Company/refactor/#229_refactor…
Browse files Browse the repository at this point in the history
…ing_main_page

Refactoring main page
  • Loading branch information
wjdcksdn authored Aug 29, 2024
2 parents e1e0c6e + 66122b4 commit e85b9aa
Show file tree
Hide file tree
Showing 44 changed files with 27 additions and 2,538 deletions.
1 change: 0 additions & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ dependencies {
implementation(project(":feature:post"))
implementation(project(":feature:club"))
implementation(project(":feature:email"))
implementation(project(":feature:main"))
implementation(project(":feature:certification"))

implementation(libs.kakao.maps)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,11 @@ import com.msg.lecture.navigation.lectureDetailSettingScreen
import com.msg.lecture.navigation.lectureListScreen
import com.msg.lecture.navigation.lectureOpenScreen
import com.msg.lecture.navigation.lectureTakingStudentListScreen
import com.msg.lecture.navigation.navigateToLecture
import com.msg.lecture.navigation.navigateToLectureDetail
import com.msg.lecture.navigation.navigateToLectureDetailSetting
import com.msg.lecture.navigation.navigateToLectureOpen
import com.msg.lecture.navigation.navigateToLectureTakingStudentList
import com.msg.main.navigation.mainPageScreen
import com.msg.main.navigation.navigateToMainPage
import com.msg.post.navigation.navigateToPostAddPage
import com.msg.post.navigation.navigateToPostDetailPage
import com.msg.post.navigation.navigateToPostDetailSettingPage
Expand Down Expand Up @@ -71,7 +70,7 @@ fun BitgoeulNavHost(
loginScreen(
onSignUpClicked = navController::navigateToSignUp,
onFindPasswordClicked = navController::navigateToInputEmail,
onLoginClicked = navController::navigateToMainPage
onLoginClicked = navController::navigateToLecture
)
inputEmailScreen(
onBackClicked = { navController.navigateWithPopUpToLogin(loginRoute) },
Expand Down Expand Up @@ -165,10 +164,7 @@ fun BitgoeulNavHost(
)
clubDetailScreen(
onBackClickedByAdmin = navController::navigateUp,
onBackClicked = navController::navigateToMainPage
)
mainPageScreen(
onLoginClicked = navController::navigateToLogin
onBackClicked = navController::navigateUp
)
certificationScreen(
onHumanClicked = navController::navigateToMyPage,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ enum class TopLevelDestination(
unselectedIcon = R.drawable.ic_club,
iconText = "동아리"
),
MAIN(
unselectedIcon = R.drawable.ic_home,
iconText = ""
),
POST(
unselectedIcon = R.drawable.ic_board,
iconText = "게시판"
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/java/com/msg/bitgoeul_android/ui/BitgoeulApp.kt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import com.msg.design_system.theme.BitgoeulAndroidTheme
import com.msg.design_system.theme.Typography
import com.msg.design_system.theme.color.BitgoeulColor
import com.msg.lecture.navigation.lectureListRoute
import com.msg.main.navigation.mainPageRoute
import com.msg.post.navigation.postRoute

@SuppressLint("UnusedMaterial3ScaffoldPaddingParameter")
Expand All @@ -42,7 +41,6 @@ fun BitgoeulApp(
val topLevelDestinationRoute = arrayOf(
lectureListRoute,
clubRoute,
mainPageRoute,
postRoute,
myPageRoute
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ import com.msg.club.navigation.clubRoute
import com.msg.club.navigation.navigateToClubPage
import com.msg.lecture.navigation.lectureListRoute
import com.msg.lecture.navigation.navigateToLecture
import com.msg.main.navigation.mainPageRoute
import com.msg.main.navigation.navigateToMainPage
import com.msg.post.navigation.navigateToPostPage
import com.msg.post.navigation.postRoute
import kotlinx.coroutines.CoroutineScope
Expand Down Expand Up @@ -60,7 +58,6 @@ class BitgoeulAppState(
@Composable get() = when (currentDestination?.route) {
lectureListRoute -> TopLevelDestination.LECTURE
clubRoute -> TopLevelDestination.CLUB
mainPageRoute -> TopLevelDestination.MAIN
postRoute -> TopLevelDestination.POST
myPageRoute -> TopLevelDestination.MY_PAGE
else -> null
Expand All @@ -83,7 +80,6 @@ class BitgoeulAppState(
when (topLevelDestination) {
TopLevelDestination.LECTURE -> navController.navigateToLecture(topLevelNavOptions)
TopLevelDestination.CLUB -> navController.navigateToClubPage(topLevelNavOptions)
TopLevelDestination.MAIN -> navController.navigateToMainPage(topLevelNavOptions)
TopLevelDestination.POST -> navController.navigateToPostPage(topLevelNavOptions)
TopLevelDestination.MY_PAGE -> navController.navigateToMyPage(topLevelNavOptions)
}
Expand Down
7 changes: 7 additions & 0 deletions core/data/src/main/java/com/msg/data/di/RepositoryModule.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import com.msg.data.repository.certification.CertificationRepository
import com.msg.data.repository.certification.CertificationRepositoryImpl
import com.msg.data.repository.club.ClubRepository
import com.msg.data.repository.club.ClubRepositoryImpl
import com.msg.data.repository.company.CompanyRepository
import com.msg.data.repository.company.CompanyRepositoryImpl
import com.msg.data.repository.email.EmailRepository
import com.msg.data.repository.email.EmailRepositoryImpl
import com.msg.data.repository.faq.FaqRepository
Expand Down Expand Up @@ -96,6 +98,11 @@ abstract class RepositoryModule {
universityRepositoryImpl: UniversityRepositoryImpl
): UniversityRepository

@Binds
abstract fun bindCompanyRepository(
companyRepositoryImpl: CompanyRepositoryImpl
): CompanyRepository

@Binds
abstract fun bindGovernmentRepository(
governmentRepositoryImpl: GovernmentRepositoryImpl
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,12 @@ fun BitgoeulNavigationPre() {
val items = listOf(
"강의",
"동아리",
"",
"게시판",
"내 정보"
)
val icons = listOf(
R.drawable.ic_lecture,
R.drawable.ic_club,
R.drawable.ic_home,
R.drawable.ic_board,
R.drawable.ic_my
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,6 @@ object BitgoeulColor : ColorTheme() {
override val G9 = Color(0xFFEBEBEB)
override val WHITE = Color(0xFFFFFFFF)

override val BACKGROUND_GRAY = Color(0xFFF7F7F8)

}
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,5 @@ abstract class ColorTheme {
abstract val G8: Color
abstract val G9: Color
abstract val WHITE: Color
abstract val BACKGROUND_GRAY: Color
}
9 changes: 9 additions & 0 deletions core/model/src/main/java/com/msg/model/enumdata/Field.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.msg.model.enumdata

enum class Field(val text: String) {
FUTURISTIC_TRANSPORTATION_EQUIPMENT("미래형 운송기기"),
ENERGY("에너지 산업"),
MEDICAL_HEALTHCARE("의료•헬스케어"),
AI_CONVERGENCE("AI 융•복합"),
CULTURE("문화산업")
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ import java.util.UUID

data class SchoolModel(
val id: Long,
val schoolName: String,
val name: String,
val line: String,
val department: List<String>,
val logoImageUrl: String,
val clubs: List<Club>
) {
data class Club(
val id: UUID,
val clubName: String,
val id: Long,
val name: String,
val field: String
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ class AuthInterceptor @Inject constructor(
val request = chain.request()
val builder = request.newBuilder()
val currentTime = System.currentTimeMillis().toLocalDateTime()
val ignorePath = listOf("/auth", "/faq", "/club/name", "/school/name", "/company", "/university", "/government")
val ignorePath = listOf("/auth", "/faq", "/club/name", "/school/name", "/company", "/university", "/government", "/school")
val ignoreMethod = listOf("POST", "GET")
val path = request.url.encodedPath
val method = request.method

run breaking@{
ignorePath.forEachIndexed { index, s ->
if (path.contains(s) && ignoreMethod[index] == method) {
if (path.contains(s) && ignoreMethod.contains(method)) {
if (ignorePath.subList(4, 6).contains(s) && index == 0) return@breaking
return chain.proceed(request)
}
Expand Down
1 change: 0 additions & 1 deletion feature/main/.gitignore

This file was deleted.

9 changes: 0 additions & 9 deletions feature/main/build.gradle.kts

This file was deleted.

21 changes: 0 additions & 21 deletions feature/main/proguard-rules.pro

This file was deleted.

This file was deleted.

4 changes: 0 additions & 4 deletions feature/main/src/main/AndroidManifest.xml

This file was deleted.

62 changes: 0 additions & 62 deletions feature/main/src/main/java/com/msg/main/ClubInfo.kt

This file was deleted.

Loading

0 comments on commit e85b9aa

Please sign in to comment.