-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #78 from YAPP-Github/feature/TNT-186
[TNT-186] 트레이니 마이페이지 기능 구현
- Loading branch information
Showing
16 changed files
with
424 additions
and
374 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
domain/src/main/java/co/kr/tnt/domain/repository/TraineeRepository.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
package co.kr.tnt.domain.repository | ||
|
||
import co.kr.tnt.domain.model.User | ||
import co.kr.tnt.domain.model.trainee.TraineeDailyRecord | ||
import co.kr.tnt.domain.model.trainee.TraineeDailyRecordStatus | ||
import java.time.LocalDate | ||
import java.time.YearMonth | ||
|
||
interface TraineeRepository { | ||
suspend fun getMyInfo(): User.Trainee | ||
suspend fun getDailyDataStatus(yearMonth: YearMonth): List<TraineeDailyRecordStatus> | ||
|
||
suspend fun getTraineeDailyRecord(day: LocalDate): TraineeDailyRecord | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 29 additions & 25 deletions
54
feature/trainee/mypage/src/main/java/co/kr/tnt/trainee/mypage/TraineeMyPageContract.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,49 @@ | ||
package co.kr.tnt.trainee.mypage | ||
|
||
import co.kr.tnt.trainee.mypage.model.DialogState | ||
import co.kr.tnt.domain.model.User | ||
import co.kr.tnt.ui.base.UiEvent | ||
import co.kr.tnt.ui.base.UiSideEffect | ||
import co.kr.tnt.ui.base.UiState | ||
|
||
internal class TraineeMyPageContract { | ||
data class TraineeMyPageUiState( | ||
val image: String? = "", | ||
val name: String = "", | ||
val user: User.Trainee = User.Trainee.EMPTY, | ||
val trainerName: String = "", | ||
val isConnected: Boolean = false, | ||
val isPushEnabled: Boolean = true, | ||
val appVersion: String = "0.0.0", | ||
val dialogState: DialogState = DialogState.LOGOUT, | ||
val url: String = "", | ||
val showWebView: Boolean = false, | ||
val showWarningDialog: Boolean = false, | ||
val showCompleteDialog: Boolean = false, | ||
) : UiState | ||
val isEnablePushNotification: Boolean = true, | ||
val dialogState: DialogState = DialogState.NONE, | ||
) : UiState { | ||
enum class DialogState { | ||
NONE, | ||
LOGOUT_CONFIRM, | ||
LOGOUT, | ||
DELETE_ACCOUNT_CONFIRM, | ||
DELETE_ACCOUNT, | ||
SHOULD_ALLOW_PERMISSION, | ||
} | ||
} | ||
|
||
sealed interface TraineeMyPageUiEvent : UiEvent { | ||
data object OnEditButtonClick : TraineeMyPageUiEvent | ||
data object OnConnectButtonClick : TraineeMyPageUiEvent | ||
data object OnDisconnectButtonClick : TraineeMyPageUiEvent | ||
data object ToggleNotification : TraineeMyPageUiEvent | ||
data object OnServiceTermClick : TraineeMyPageUiEvent | ||
data object OnPrivacyClick : TraineeMyPageUiEvent | ||
data object OnOpenSourceClick : TraineeMyPageUiEvent | ||
data object OnLogoutClick : TraineeMyPageUiEvent | ||
data object OnDeleteAccountClick : TraineeMyPageUiEvent | ||
data object OnConfirmWarningDialog : TraineeMyPageUiEvent | ||
data object OnConfirmCompleteDialog : TraineeMyPageUiEvent | ||
data object OnDismissPopup : TraineeMyPageUiEvent | ||
data class OnToggleNotification( | ||
val isGrantedPermission: Boolean, | ||
val shouldShowRationale: Boolean, | ||
) : TraineeMyPageUiEvent | ||
|
||
data object OnClickConnect : TraineeMyPageUiEvent | ||
data object OnClickTermsOfService : TraineeMyPageUiEvent | ||
data object OnClickPrivacy : TraineeMyPageUiEvent | ||
data object OnClickOpenSource : TraineeMyPageUiEvent | ||
data object OnClickLogout : TraineeMyPageUiEvent | ||
data object OnClickDeleteAccount : TraineeMyPageUiEvent | ||
data object OnClickDialogConfirm : TraineeMyPageUiEvent | ||
data object OnDismissDialog : TraineeMyPageUiEvent | ||
} | ||
|
||
sealed interface TraineeMyPageEffect : UiSideEffect { | ||
data class ShowToast(val message: String) : TraineeMyPageEffect | ||
data object NavigateToConnect : TraineeMyPageEffect | ||
data object NavigateToPrevious : TraineeMyPageEffect | ||
data object NavigateToLogin : TraineeMyPageEffect | ||
data class NavigateToWebView(val url: String) : TraineeMyPageEffect | ||
data object NavigateToOpenSourceLicense : TraineeMyPageEffect | ||
data class RequestPermission(val isExplicitlyDenied: Boolean) : TraineeMyPageEffect | ||
} | ||
} |
Oops, something went wrong.