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

๐Ÿ”€ :: (#294) - Use UiState To Certification Module #295

Merged
merged 149 commits into from
Nov 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
149 commits
Select commit Hold shift + click to select a range
7c1f612
:sparkles: :: Create asResult() Function(Use ViewModel - UiState)
audgns10 Sep 5, 2024
532eac0
:fire: :: Fire Unused Import
audgns10 Sep 5, 2024
37c632a
:fire: :: Unused Code(File)
audgns10 Sep 6, 2024
bd67678
:recycle: :: Combine The Use Cases Into One
audgns10 Sep 6, 2024
2d55ff6
:sparkles: :: Create GetCertificationListUiState
audgns10 Sep 6, 2024
f77bb0f
:recycle: :: Simplify ViewModel Code And Apply UiState
audgns10 Sep 6, 2024
946d74e
:recycle: :: Apply ViewModel Changed(Apply UiState)
audgns10 Sep 6, 2024
19c1a63
:recycle: :: Simplify ViewModel Code And Apply UiState - getCertificaโ€ฆ
audgns10 Sep 6, 2024
559e7a2
:recycle: :: Apply ViewModel Changed(Apply UiState)
audgns10 Sep 6, 2024
6824bb4
Merge branch 'refactor/294-use-uistate-to-certification-module' of htโ€ฆ
audgns10 Sep 6, 2024
95d670e
:fire: :: Line Spacing
audgns10 Sep 6, 2024
65517f2
:memo: :: Modify Use Flow And Fire Unused Code
audgns10 Sep 9, 2024
7ceb43b
:sparkles: :: Create GetLectureSignUpHistoryUiState
audgns10 Sep 9, 2024
5686d41
:recycle: :: Changed TextStyle And Color && Apply UiState To Screen
audgns10 Sep 9, 2024
d380add
:recycle: :: Apply UiState To CertificationViewModel(getLectureSignUpโ€ฆ
audgns10 Sep 9, 2024
a31bd09
:recycle: :: Use Flow To WriteCertificationUseCase
audgns10 Sep 9, 2024
a2d13ac
:sparkles: :: Create WriteCertificationUiState
audgns10 Sep 9, 2024
0768955
:recycle: :: Apply WriteCertificationUiState To CertificationViewModel
audgns10 Sep 9, 2024
47f2da4
:memo: :: Add strings.xml To Other Strings
audgns10 Sep 9, 2024
ff10373
:heavy_plus_sign: :: Add Implementation To build.gradle.kts(:app)
audgns10 Sep 9, 2024
b761769
:sparkles: :: Create errorToast(BitgoeulNavHost)
audgns10 Sep 9, 2024
4a1fdd8
:recycle: :: Use Flow - EditCertificationUseCase
audgns10 Sep 9, 2024
3939251
:recycle: :: Use Coroutine Flow - EditCertificationUseCase
audgns10 Sep 9, 2024
0b11882
:recycle: :: Use Coroutine Flow(GetStudentBelongClubUseCase)
audgns10 Sep 9, 2024
54b2a1a
Merge branch 'refactor/294-use-uistate-to-certification-module' of htโ€ฆ
audgns10 Sep 9, 2024
78b3c20
:fire: :: Fire Unused Import
audgns10 Sep 9, 2024
d21c9ef
:sparkles: :: Create GetStudentBelongClubDetailUiState
audgns10 Sep 9, 2024
c382f80
:sparkles: :: Create EditCertificationUiState
audgns10 Sep 9, 2024
775271b
:recycle: :: Apply createErrorToast To Certification Navigation
audgns10 Sep 9, 2024
668dfc5
:recycle: :: Use data class - GetCertificationListUiState
audgns10 Sep 9, 2024
ef2d7ea
:recycle: :: Use data class State Error - GetLectureSignUpHistoryUiState
audgns10 Sep 9, 2024
a0f73c3
:recycle: :: Use data class State Error - GetCertificationListUiState
audgns10 Sep 9, 2024
46d7d21
:recycle: :: Use data class State Error - GetLectureSignUpHistoryUiState
audgns10 Sep 9, 2024
389c46e
Merge branch 'refactor/294-use-uistate-to-certification-module' of htโ€ฆ
audgns10 Sep 9, 2024
97a5be4
:recycle: :: Apply Before Changed(Apply UiState, Changed Logic) - Cerโ€ฆ
audgns10 Sep 9, 2024
39f0211
:fire: :: Fire Unused State(Loading) - WriteCertificationUiState
audgns10 Sep 9, 2024
d6e9024
:recycle: :: Apply ViewModel Changed(Check Before Commit)
audgns10 Sep 9, 2024
fea0264
:recycle: :: Apply ViewModel Changed And Change Logic
audgns10 Sep 9, 2024
fb9d26f
:recycle: :: Fire Line Spacing And Changed Error State Logic
audgns10 Sep 9, 2024
d96282b
:recycle: :: Add createErrorToast
audgns10 Sep 9, 2024
1d278c8
:fire: :: Fire Unused Import
audgns10 Sep 9, 2024
7016b25
:fire: :: Fire Line Spacing
audgns10 Sep 9, 2024
3aa76fd
โœจ:: ๋ฌธ์˜์‚ฌํ•ญ ๋ชจ๋“ˆ ์ƒ์„ฑ
Chaejongin12 Sep 11, 2024
765ba7c
โœจ:: G2 ์ƒ‰์ƒ FilterIcon ์ถ”
Chaejongin12 Sep 11, 2024
0c87c1a
โœจ:: G2 ์ƒ‰์ƒ FilterIcon์„ Content๋กœ ํ•˜๋Š” Button ์ถ”๊ฐ€
Chaejongin12 Sep 11, 2024
790b0da
โœจ:: G2 ์ƒ‰์ƒ FilterIcon์„ Content๋กœ ํ•˜๋Š” Button ์ถ”๊ฐ€
Chaejongin12 Sep 11, 2024
51b3680
โœจ:: strings.xml ๋ฌธ์ž์—ด ์ถ”๊ฐ€
Chaejongin12 Sep 11, 2024
65136f6
โœจ:: PositiveTag ์ƒ์„ฑ
Chaejongin12 Sep 11, 2024
929bd23
โœจ:: NegativeTag ์ƒ์„ฑ
Chaejongin12 Sep 11, 2024
e39aafe
โœจ:: G2 ์ƒ‰์ƒ Icon svg ์ถ”๊ฐ€
Chaejongin12 Sep 11, 2024
7c51aea
โœจ:: FilterDialog ์ƒ์„ฑ
Chaejongin12 Sep 11, 2024
809add8
โœจ:: ๋ฌธ์˜์‚ฌํ•ญ ๋ชจ๋“ˆ ์ƒ์„ฑ
Chaejongin12 Sep 11, 2024
da67226
โœจ:: ๋ฌธ์˜์‚ฌํ•ญ ๋ชจ๋“ˆ ์ƒ์„ฑ
Chaejongin12 Sep 11, 2024
82e7fab
โœจ:: InquiryViewModel ์„ธ
Chaejongin12 Sep 11, 2024
252f458
โœจ:: InquiryScreen(๋ฌธ์˜ ์‚ฌํ•ญ ํŽ˜์ด์ง€) ์ƒ
Chaejongin12 Sep 11, 2024
de16bc5
โœจ:: Navigation ์„ธํŒ…
Chaejongin12 Sep 11, 2024
27f864a
โœจ:: InquiryList(๋ฌธ์˜ ์‚ฌํ•ญ ๋ฆฌ์ŠคํŠธ) ์ƒ์„ฑ
Chaejongin12 Sep 11, 2024
3169366
โœจ:: InquiryFilterButton(๋ฌธ์˜ ์‚ฌํ•ญ ํ•„ํ„ฐ ๋ฒ„ํŠผ) ์ƒ์„ฑ
Chaejongin12 Sep 11, 2024
ced61a8
โœจ:: InquiryDetailScreen(๋ฌธ์˜ ์‚ฌํ•ญ ์„ธ๋ถ€ ํŽ˜์ด์ง€) ์„ธํŒ…
Chaejongin12 Sep 11, 2024
b2cfe39
โœจ:: InquiryCard(๋ฌธ์˜ ์‚ฌํ•ญ ์•„์ดํ…œ) ์ƒ์„ฑ
Chaejongin12 Sep 11, 2024
bb41586
โ™ป๏ธ:: ์ž˜๋ชป ์ง€์ •๋œ lineHeight ์ˆ˜
Chaejongin12 Sep 11, 2024
6bb8a35
โ™ป๏ธ:: BitGoeulCheckBox isChecked ๋‚ด๋ถ€ ๊ด€๋ฆฌ๋กœ ๋ณ€๊ฒฝ
Chaejongin12 Sep 11, 2024
dc7f831
๐Ÿ”ฅ:: LectureFilterBottomSheet(๊ฐ•์˜ ํ•„ํ„ฐ ๋ฐ”ํ…€์‹œํŠธ)๋ฅผ ๋”์ด์ƒ ์‚ฌ์šฉํ•˜์ง€ ์•Š๊ธฐ์— ์‚ญ์ œ
Chaejongin12 Sep 11, 2024
267cea6
:recycle: :: BitGoeulCheckBox ๋ˆ„๋ฝ๋œ isChecked ๊ฐ’ ๋ณ€๊ฒฝ ๋กœ์ง ์ถ”๊ฐ€
Chaejongin12 Sep 11, 2024
ac790dd
:recycle: :: isChecked์˜ ๊ฐ’์„ ๋ฐ”๋กœ ๋ฐ˜ํ™˜ํ•˜๋„๋ก ๋ณ€๊ฒฝ
Chaejongin12 Sep 11, 2024
d21f46b
:recycle: :: ํ˜ธ์ด์ŠคํŒ…์„ ์œ„ํ•œ Check ์ƒํƒœ๋ฅผ ์™ธ๋ถ€์—์„œ ์ฃผ์ž…ํ•˜๋Š” ํ˜•์‹์œผ๋กœ ๋ณ€๊ฒฝ
Chaejongin12 Sep 11, 2024
682d2cf
Merge pull request #296 from School-of-Company/feature/#293_publishinโ€ฆ
Chaejongin12 Sep 11, 2024
2a3a3ff
:green_heart: :: Changed Color Code Type
audgns10 Sep 11, 2024
a83448c
Merge pull request #298 from School-of-Company/refactor/297-changed-yโ€ฆ
audgns10 Sep 11, 2024
68b04b2
:sparkles: :: Create asResult() Function(Use ViewModel - UiState)
audgns10 Sep 5, 2024
a063cc4
:fire: :: Fire Unused Import
audgns10 Sep 5, 2024
5c429f5
:fire: :: Unused Code(File)
audgns10 Sep 6, 2024
79a55b0
:recycle: :: Combine The Use Cases Into One
audgns10 Sep 6, 2024
4b42ea2
:sparkles: :: Create GetCertificationListUiState
audgns10 Sep 6, 2024
2e86654
:recycle: :: Simplify ViewModel Code And Apply UiState - getCertificaโ€ฆ
audgns10 Sep 6, 2024
77c19cd
:recycle: :: Apply ViewModel Changed(Apply UiState)
audgns10 Sep 6, 2024
2edae1b
:fire: :: Line Spacing
audgns10 Sep 6, 2024
84d8052
:memo: :: Modify Use Flow And Fire Unused Code
audgns10 Sep 9, 2024
e664c93
:sparkles: :: Create GetLectureSignUpHistoryUiState
audgns10 Sep 9, 2024
40b56a1
:recycle: :: Changed TextStyle And Color && Apply UiState To Screen
audgns10 Sep 9, 2024
407d9cb
:recycle: :: Apply UiState To CertificationViewModel(getLectureSignUpโ€ฆ
audgns10 Sep 9, 2024
6b02c9f
:recycle: :: Use Flow To WriteCertificationUseCase
audgns10 Sep 9, 2024
81d7dd2
:sparkles: :: Create WriteCertificationUiState
audgns10 Sep 9, 2024
44225c4
:recycle: :: Apply WriteCertificationUiState To CertificationViewModel
audgns10 Sep 9, 2024
8cc0ea8
:memo: :: Add strings.xml To Other Strings
audgns10 Sep 9, 2024
bbfca6b
:heavy_plus_sign: :: Add Implementation To build.gradle.kts(:app)
audgns10 Sep 9, 2024
df8d6fa
:sparkles: :: Create errorToast(BitgoeulNavHost)
audgns10 Sep 9, 2024
c85cefa
:recycle: :: Use Coroutine Flow - EditCertificationUseCase
audgns10 Sep 9, 2024
aada795
:recycle: :: Use Coroutine Flow(GetStudentBelongClubUseCase)
audgns10 Sep 9, 2024
e234735
:fire: :: Fire Unused Import
audgns10 Sep 9, 2024
7560dc8
:sparkles: :: Create GetStudentBelongClubDetailUiState
audgns10 Sep 9, 2024
00c73c1
:sparkles: :: Create EditCertificationUiState
audgns10 Sep 9, 2024
cd5f220
:recycle: :: Apply createErrorToast To Certification Navigation
audgns10 Sep 9, 2024
4d853ea
:recycle: :: Use data class State Error - GetCertificationListUiState
audgns10 Sep 9, 2024
b9d6e1a
:recycle: :: Use data class State Error - GetLectureSignUpHistoryUiState
audgns10 Sep 9, 2024
988a638
:recycle: :: Apply Before Changed(Apply UiState, Changed Logic) - Cerโ€ฆ
audgns10 Sep 9, 2024
95b923d
:fire: :: Fire Unused State(Loading) - WriteCertificationUiState
audgns10 Sep 9, 2024
fd37b22
:recycle: :: Apply ViewModel Changed(Check Before Commit)
audgns10 Sep 9, 2024
4121cfc
:recycle: :: Apply ViewModel Changed And Change Logic
audgns10 Sep 9, 2024
ed84531
:recycle: :: Fire Line Spacing And Changed Error State Logic
audgns10 Sep 9, 2024
b21ddeb
:recycle: :: Add createErrorToast
audgns10 Sep 9, 2024
875e71a
:fire: :: Fire Unused Import
audgns10 Sep 9, 2024
5a29483
:fire: :: Fire Line Spacing
audgns10 Sep 9, 2024
2acd623
Merge branch 'refactor/294-use-uistate-to-certification-module' of htโ€ฆ
audgns10 Sep 12, 2024
1736dc5
:green_heart: :: Add Missing Strings - string.xml File
audgns10 Sep 12, 2024
3581ba4
โœจ:: strings.xml ๋ฌธ์ž์—ด ์ถ”๊ฐ€
Chaejongin12 Sep 13, 2024
2dc3082
โœจ:: Type headlineSmall ์ถ”๊ฐ€
Chaejongin12 Sep 13, 2024
02d19ae
โœจ:: ๋ฌธ์˜ ์‚ฌํ•ญ ์„ธ๋ถ€ ํŽ˜์ด์ง€ ์ œ์ž‘
Chaejongin12 Sep 19, 2024
41f6e9c
:recycle: :: scrollState ํ˜ธ์ด์ŠคํŒ… ์ ์šฉ
Chaejongin12 Sep 20, 2024
e3d4c31
:fire: :: ํ˜ธ์ด์ŠคํŒ… ์ œ๊ฑฐ
Chaejongin12 Sep 20, 2024
358bf40
Merge pull request #301 from School-of-Company/feature/#300_publishinโ€ฆ
Chaejongin12 Sep 20, 2024
cdd88ad
:sparkles: :: Create asResult() Function(Use ViewModel - UiState)
audgns10 Sep 5, 2024
57e36a6
:fire: :: Fire Unused Import
audgns10 Sep 5, 2024
cf1f15e
:fire: :: Unused Code(File)
audgns10 Sep 6, 2024
fcdb6fd
:recycle: :: Combine The Use Cases Into One
audgns10 Sep 6, 2024
28cae03
:sparkles: :: Create GetCertificationListUiState
audgns10 Sep 6, 2024
77fe0a3
:recycle: :: Simplify ViewModel Code And Apply UiState - getCertificaโ€ฆ
audgns10 Sep 6, 2024
d01afc8
:recycle: :: Apply ViewModel Changed(Apply UiState)
audgns10 Sep 6, 2024
35332d3
:fire: :: Line Spacing
audgns10 Sep 6, 2024
6a21b77
:memo: :: Modify Use Flow And Fire Unused Code
audgns10 Sep 9, 2024
83c5b58
:sparkles: :: Create GetLectureSignUpHistoryUiState
audgns10 Sep 9, 2024
98c8a90
:recycle: :: Changed TextStyle And Color && Apply UiState To Screen
audgns10 Sep 9, 2024
905c21f
:recycle: :: Apply UiState To CertificationViewModel(getLectureSignUpโ€ฆ
audgns10 Sep 9, 2024
d7c0b5c
:recycle: :: Use Flow To WriteCertificationUseCase
audgns10 Sep 9, 2024
4903d84
:sparkles: :: Create WriteCertificationUiState
audgns10 Sep 9, 2024
3286f56
:recycle: :: Apply WriteCertificationUiState To CertificationViewModel
audgns10 Sep 9, 2024
792c1f7
:memo: :: Add strings.xml To Other Strings
audgns10 Sep 9, 2024
606abea
:heavy_plus_sign: :: Add Implementation To build.gradle.kts(:app)
audgns10 Sep 9, 2024
fb13703
:sparkles: :: Create errorToast(BitgoeulNavHost)
audgns10 Sep 9, 2024
4424640
:recycle: :: Use Coroutine Flow - EditCertificationUseCase
audgns10 Sep 9, 2024
3569b63
:recycle: :: Use Coroutine Flow(GetStudentBelongClubUseCase)
audgns10 Sep 9, 2024
b750378
:fire: :: Fire Unused Import
audgns10 Sep 9, 2024
e001b7c
:sparkles: :: Create GetStudentBelongClubDetailUiState
audgns10 Sep 9, 2024
8b159e9
:sparkles: :: Create EditCertificationUiState
audgns10 Sep 9, 2024
2f55889
:recycle: :: Apply createErrorToast To Certification Navigation
audgns10 Sep 9, 2024
21019eb
:recycle: :: Use data class State Error - GetCertificationListUiState
audgns10 Sep 9, 2024
828e380
:recycle: :: Use data class State Error - GetLectureSignUpHistoryUiState
audgns10 Sep 9, 2024
1121a1c
:recycle: :: Apply Before Changed(Apply UiState, Changed Logic) - Cerโ€ฆ
audgns10 Sep 9, 2024
d34336d
:fire: :: Fire Unused State(Loading) - WriteCertificationUiState
audgns10 Sep 9, 2024
8f76f47
:recycle: :: Apply ViewModel Changed(Check Before Commit)
audgns10 Sep 9, 2024
2b05a7e
:recycle: :: Apply ViewModel Changed And Change Logic
audgns10 Sep 9, 2024
302a1d9
:recycle: :: Fire Line Spacing And Changed Error State Logic
audgns10 Sep 9, 2024
3f90b1d
:recycle: :: Add createErrorToast
audgns10 Sep 9, 2024
0b9dcbc
:fire: :: Fire Unused Import
audgns10 Sep 9, 2024
89be535
:fire: :: Fire Line Spacing
audgns10 Sep 9, 2024
3216bea
:recycle: :: Apply Before Changed(Apply UiState, Changed Logic) - Cerโ€ฆ
audgns10 Sep 9, 2024
ee7d9b4
:fire: :: Fire Line Spacing
audgns10 Sep 9, 2024
91e18fd
Merge branch 'refactor/294-use-uistate-to-certification-module' of htโ€ฆ
audgns10 Sep 21, 2024
0773190
:recycle: :: Improve Code Readability(Apply Reviewer)
audgns10 Sep 21, 2024
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
4 changes: 2 additions & 2 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ jobs:
with:
title: โœ… Bitgouel-Android-CI ์„ฑ๊ณต! โœ…
webhook: ${{ secrets.BITGOUEL_DISCORD_WEBHOOK }}
color: 00FF00
color: 65280

- name: Bitgouel Android CI Discord Notification
uses: sarisia/actions-status-discord@v1
if: ${{ failure() }}
with:
title: โ—๏ธ Bitgouel-Android-CI ์‹คํŒจ! โ—๏ธ
webhook: ${{ secrets.BITGOUEL_DISCORD_WEBHOOK }}
color: FF0000
color: 16711680
2 changes: 2 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ android {
}

dependencies {
implementation(project(":core:common"))
implementation(project(":core:design-system"))
implementation(project(":core:ui"))
implementation(project(":feature:login"))
implementation(project(":feature:sign-up"))
implementation(project(":feature:student-activity"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package com.msg.bitgoeul_android.navigation

import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext
import androidx.navigation.compose.NavHost
import com.bitgoeul.email.navigation.emailSendInformScreen
import com.bitgoeul.email.navigation.inputEmailScreen
Expand All @@ -18,6 +19,7 @@ import com.example.my_page.navigation.changePasswordScreen
import com.example.my_page.navigation.myPageScreen
import com.example.my_page.navigation.navigateToMyPage
import com.example.my_page.navigation.navigateToPasswordChange
import com.msg.design_system.R
import com.msg.bitgoeul_android.ui.BitgoeulAppState
import com.msg.bitgoeul_android.ui.navigateWithPopUpToLogin
import com.msg.certification.navigation.addCertificationScreen
Expand All @@ -26,6 +28,12 @@ import com.msg.certification.navigation.navigateToAddCertificationPage
import com.msg.club.navigation.clubDetailScreen
import com.msg.club.navigation.clubScreen
import com.msg.club.navigation.navigateToClubDetailPage
import com.msg.common.exception.ForBiddenException
import com.msg.common.exception.NetworkException
import com.msg.common.exception.OtherException
import com.msg.common.exception.ServerException
import com.msg.common.exception.TimeOutException
import com.msg.common.exception.UnknownException
import com.msg.lecture.navigation.lectureDetailScreen
import com.msg.lecture.navigation.lectureListScreen
import com.msg.lecture.navigation.lectureTakingStudentListScreen
Expand All @@ -46,14 +54,32 @@ import com.msg.student_activity.navigation.studentActivityScreen
import com.msg.student_activity.navigation.studentAddActivityScreen
import com.msg.student_activity.navigation.studentDetailActivityScreen
import com.msg.student_activity.navigation.studentDetailSettingActivityScreen
import com.msg.ui.makeToast

@Composable
fun BitgoeulNavHost(
appState: BitgoeulAppState,
modifier: Modifier = Modifier,
startDestination: String = loginRoute,
) {
val context = LocalContext.current
val navController = appState.navController

val createErrorToast: (throwable: Throwable?, message: Int?) -> Unit = { throwable, message ->
val errorMessage = throwable?.let {
when(it) {
is ForBiddenException -> R.string.error_for_bidden
is TimeOutException -> R.string.error_time_out
is ServerException -> R.string.error_server
is NetworkException -> R.string.error_no_internet
is OtherException -> R.string.error_other_http
is UnknownException -> R.string.error_un_known
else -> message
}
} ?: message ?: R.string.error_default
makeToast(context, context.getString(errorMessage))
}

NavHost(
navController = navController,
startDestination = startDestination,
Expand Down Expand Up @@ -139,10 +165,12 @@ fun BitgoeulNavHost(
)
certificationScreen(
onHumanClicked = navController::navigateToMyPage,
onEditClicked = navController::navigateToAddCertificationPage
onEditClicked = navController::navigateToAddCertificationPage,
createErrorToast = createErrorToast
)
addCertificationScreen(
onBackClicked = navController::navigateUp
onBackClicked = navController::navigateUp,
createErrorToast = createErrorToast
)
}
}
13 changes: 13 additions & 0 deletions core/common/src/main/java/com/msg/common/result/Result.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.msg.common.result

import kotlinx.coroutines.flow.*

sealed interface Result<out T> {
data class Success<T>(val data: T): Result<T>
data class Error(val exception: Throwable): Result<Nothing>
data object Loading: Result<Nothing>
}

fun <T> Flow<T>.asResult(): Flow<Result<T>> = map<T, Result<T>> { Result.Success(it) }
.onStart { emit(Result.Loading) }
.catch { emit(Result.Error(it)) }
Original file line number Diff line number Diff line change
Expand Up @@ -84,126 +84,6 @@ fun SelectorBottomSheet(
}
}

@Composable
@OptIn(ExperimentalMaterial3Api::class)
fun LectureFilterBottomSheet(
onQuit: () -> Unit,
isVisible: Boolean,
) {
val isChecked = remember { mutableStateListOf(false, false) }

val bottomSheetState = rememberModalBottomSheetState(skipPartiallyExpanded = true)

if (isVisible) {
BitgoeulAndroidTheme { colors, type ->
ModalBottomSheet(
onDismissRequest = {
onQuit()
},
sheetState = bottomSheetState
) {
Column(
modifier = Modifier
.padding(horizontal = 28.dp)
) {
Text(
text = stringResource(id = R.string.filter),
modifier = Modifier
.width(35.dp)
.height(26.dp),
color = colors.BLACK,
style = type.bodySmall,
fontSize = 20.sp
)

Spacer(modifier = Modifier.height(18.dp))

Text(
text = stringResource(id = R.string.lecture_category),
modifier = Modifier
.width(67.dp)
.height(26.dp),
color = colors.BLACK,
style = type.bodyLarge,
fontSize = 18.sp
)

Spacer(modifier = Modifier.height(8.dp))

Row(
modifier = Modifier
.wrapContentSize()
.padding(vertical = 8.dp, horizontal = 13.dp),
verticalAlignment = Alignment.CenterVertically
) {
BitGoeulCheckBox(
isChecked = isChecked[0],
onCheckedChange = { isChecked[0] = it },
modifier = Modifier
.width(24.dp)
.height(24.dp),
)

Spacer(modifier = Modifier.width(8.dp))

Text(
text = stringResource(id = R.string.mutual_credit_recognition_curriculum),
modifier = Modifier
.width(139.dp),
color = colors.BLACK,
style = type.bodySmall,
fontSize = 16.sp
)
}
Row(
modifier = Modifier
.wrapContentSize()
.padding(vertical = 8.dp, horizontal = 13.dp),
verticalAlignment = Alignment.CenterVertically
) {
BitGoeulCheckBox(
isChecked = isChecked[1],
onCheckedChange = { isChecked[1] = it },
modifier = Modifier
.width(24.dp)
.height(24.dp),
)

Spacer(modifier = Modifier.width(8.dp))

Text(
text = stringResource(id = R.string.university_visit_program),
modifier = Modifier
.width(111.dp),
color = colors.BLACK,
style = type.bodySmall,
fontSize = 16.sp
)
}

Spacer(modifier = Modifier.height(16.dp))

BitgoeulButton(
text = stringResource(id = R.string.apply),
modifier = Modifier
.fillMaxWidth()
.height(52.dp),
state = ButtonState.Enable
) {
// ํด๋ฆญ์‹œ ํ•„ํ„ฐ ์ ์šฉ ์‹œํ‚ค๊ธฐ
}

Box(
modifier = Modifier
.height(38.dp)
.fillMaxWidth()
)
}
}
}
}
}

@Composable
@OptIn(ExperimentalMaterial3Api::class)
fun TimePickerBottomSheet(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.msg.design_system.component.icon.G2ColorFilterIcon
import com.msg.design_system.component.icon.MainColorSettingIcon
import com.msg.design_system.theme.BitgoeulAndroidTheme

Expand Down Expand Up @@ -98,7 +99,7 @@ fun BitgoeulButton(
fun DetailSettingButton(
modifier: Modifier = Modifier,
type: String,
onClicked: () -> Unit
onClicked: () -> Unit,
) {
BitgoeulAndroidTheme { colors, typography ->
OutlinedButton(
Expand Down Expand Up @@ -130,7 +131,7 @@ fun NegativeBitgoeulButton(
modifier: Modifier = Modifier,
text: String,
state: ButtonState = ButtonState.Enable,
onClicked: () -> Unit
onClicked: () -> Unit,
) {
BitgoeulAndroidTheme { colors, typography ->

Expand Down Expand Up @@ -182,7 +183,6 @@ fun ApplicationDoneButton(
),
shape = RoundedCornerShape(8.dp),
) {

Text(
text = text,
color = colors.E5,
Expand All @@ -192,6 +192,27 @@ fun ApplicationDoneButton(
}
}

@Composable
fun G2FilterIconButton(
modifier: Modifier = Modifier,
onClicked: () -> Unit,
) {
BitgoeulAndroidTheme { colors, _ ->
OutlinedButton(
modifier = modifier,
onClick = onClicked,
border = BorderStroke(1.dp, color = colors.G2),
colors = ButtonDefaults.outlinedButtonColors(
containerColor = colors.WHITE,
contentColor = colors.G2,
),
shape = RoundedCornerShape(8.dp),
) {
G2ColorFilterIcon()
}
}
}

@Preview
@Composable
fun BitgoeulButtonPre() {
Expand Down Expand Up @@ -233,5 +254,12 @@ fun BitgoeulButtonPre() {
onClicked = {},
text = "์ˆ˜๊ฐ• ์‹ ์ฒญ ์ทจ์†Œ"
)

G2FilterIconButton(
modifier = Modifier
.width(319.dp)
.height(52.dp),
onClicked = {},
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.runtime.Composable
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.res.painterResource
Expand All @@ -15,8 +17,8 @@ import com.msg.design_system.R
@Composable
fun BitGoeulCheckBox(
modifier: Modifier,
isChecked: Boolean,
onCheckedChange: (Boolean) -> Unit,
isChecked: Boolean,
) {
Box(
modifier = modifier.background(color = Color.White, shape = RoundedCornerShape(8.dp))
Expand All @@ -28,7 +30,9 @@ fun BitGoeulCheckBox(
painterResource(id = R.drawable.ic_unchecked_box)
},
contentDescription = null,
modifier = modifier.clickable { onCheckedChange(!isChecked) }
modifier = modifier.clickable {
onCheckedChange(!isChecked)
}
)
}
}
Loading
Loading