-
Notifications
You must be signed in to change notification settings - Fork 0
[Feat/#71] 마이페이지 API 연동 #76
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
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
08f9b38
[Feat/#71] MyPageResponseDto
sonyerim fd1381f
[Feat/#71] data
sonyerim e7ea318
[Feat/#71] domain
sonyerim b86776d
[Feat/#71] presentation
sonyerim 1eb971d
Merge branch 'develop' into feat/#71-mypage-api
sonyerim 620277d
[Feat/#71] 마이페이지 & 분철 내역 뷰 네비게이션
sonyerim 1e2ba2d
[Refactor/#71] 코드 리뷰 반영
sonyerim 271cb9c
Merge remote-tracking branch 'origin/develop' into feat/#71-mypage-api
jyvnee 83de8ff
[feat/#71] 마이페이지 패딩 수정
jyvnee File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
app/src/main/java/com/poti/android/data/mapper/user/MyPageMapper.kt
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| package com.poti.android.data.mapper.user | ||
|
|
||
| import com.poti.android.data.remote.dto.response.user.MyPageResponseDto | ||
| import com.poti.android.data.remote.dto.response.user.ParticipationSummaryDto | ||
| import com.poti.android.data.remote.dto.response.user.RecruitSummaryDto | ||
| import com.poti.android.domain.model.user.HistorySummary | ||
| import com.poti.android.domain.model.user.UserMyPage | ||
| import java.lang.String.format | ||
| import java.util.Locale | ||
|
|
||
| fun MyPageResponseDto.toDomain(): UserMyPage = | ||
| UserMyPage( | ||
| nickname = nickname, | ||
| email = email, | ||
| profileImageUrl = profileImageUrl, | ||
| ratingAvg = format(Locale.US, "%.1f", ratingAvg), | ||
| activityMessage = activityMessage, | ||
| joinedAt = joinedAt, | ||
| hasFavoriteArtist = hasFavoriteArtist, | ||
| favoriteArtistName = favoriteArtistName, | ||
| participationSummary = participationSummary.toDomain(), | ||
| recruitSummary = recruitSummary.toDomain(), | ||
| ) | ||
|
|
||
| fun ParticipationSummaryDto.toDomain(): HistorySummary = | ||
| HistorySummary( | ||
| total = total, | ||
| inProgress = inProgress, | ||
| completed = completed, | ||
| ) | ||
|
|
||
| fun RecruitSummaryDto.toDomain(): HistorySummary = | ||
| HistorySummary( | ||
| total = total, | ||
| inProgress = inProgress, | ||
| completed = completed, | ||
| ) |
This file contains hidden or 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
50 changes: 50 additions & 0 deletions
50
app/src/main/java/com/poti/android/data/remote/dto/response/user/MyPageResponseDto.kt
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| package com.poti.android.data.remote.dto.response.user | ||
|
|
||
| import kotlinx.serialization.SerialName | ||
| import kotlinx.serialization.Serializable | ||
|
|
||
| @Serializable | ||
| data class MyPageResponseDto( | ||
| @SerialName("userId") | ||
| val userId: Long, | ||
| @SerialName("nickname") | ||
| val nickname: String, | ||
| @SerialName("email") | ||
| val email: String, | ||
| @SerialName("profileImageUrl") | ||
| val profileImageUrl: String?, | ||
| @SerialName("ratingAvg") | ||
| val ratingAvg: Double, | ||
| @SerialName("activityMessage") | ||
| val activityMessage: String, | ||
| @SerialName("joinedAt") | ||
| val joinedAt: String, | ||
| @SerialName("hasFavoriteArtist") | ||
| val hasFavoriteArtist: Boolean, | ||
| @SerialName("favoriteArtistName") | ||
| val favoriteArtistName: String?, | ||
| @SerialName("participationSummary") | ||
| val participationSummary: ParticipationSummaryDto, | ||
| @SerialName("recruitSummary") | ||
| val recruitSummary: RecruitSummaryDto, | ||
| ) | ||
|
|
||
| @Serializable | ||
| data class ParticipationSummaryDto( | ||
| @SerialName("total") | ||
| val total: Int, | ||
| @SerialName("inProgress") | ||
| val inProgress: Int, | ||
| @SerialName("completed") | ||
| val completed: Int, | ||
| ) | ||
|
|
||
| @Serializable | ||
| data class RecruitSummaryDto( | ||
| @SerialName("total") | ||
| val total: Int, | ||
| @SerialName("inProgress") | ||
| val inProgress: Int, | ||
| @SerialName("completed") | ||
| val completed: Int, | ||
| ) |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -8,15 +8,20 @@ import androidx.navigation.NavGraphBuilder | |
| import androidx.navigation.compose.composable | ||
| import com.poti.android.core.navigation.Route | ||
| import com.poti.android.presentation.history.list.HistoryListRoute | ||
| import com.poti.android.presentation.history.list.HistoryMode | ||
| import com.poti.android.presentation.history.manage.ParticipantManageRoute | ||
| import com.poti.android.presentation.history.participant.ParticipantDetailRoute | ||
| import com.poti.android.presentation.history.recruiter.RecruiterDetailRoute | ||
| import com.poti.android.presentation.party.detail.navigation.navigateToPartyDetail | ||
| import com.poti.android.presentation.user.component.HistorySummaryType | ||
| import kotlinx.serialization.Serializable | ||
|
|
||
| sealed interface HistoryRoute : Route { | ||
| @Serializable | ||
| data object HistoryList : HistoryRoute | ||
| data class HistoryList( | ||
| val mode: HistoryMode? = HistoryMode.RECRUIT, | ||
| val type: HistorySummaryType? = HistorySummaryType.ALL, | ||
| ) : HistoryRoute | ||
|
Comment on lines
+21
to
+24
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. p1: 코드레빗 말처럼 serializable 필요해보여용 |
||
|
|
||
| @Serializable | ||
| data class ParticipantDetail(val participantId: Long) : HistoryRoute | ||
|
|
@@ -28,8 +33,16 @@ sealed interface HistoryRoute : Route { | |
| data class ParticipantManage(val recruitId: Long) : HistoryRoute | ||
| } | ||
|
|
||
| fun NavController.navigateToHistoryList() { | ||
| navigate(HistoryRoute.HistoryList) | ||
| fun NavController.navigateToHistoryList( | ||
| mode: HistoryMode, | ||
| type: HistorySummaryType, | ||
| ) { | ||
| navigate( | ||
| HistoryRoute.HistoryList( | ||
| mode = mode, | ||
| type = type, | ||
| ), | ||
| ) | ||
| } | ||
|
|
||
| fun NavController.navigateToParticipantDetail(participantId: Long) { | ||
|
|
||
This file contains hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: team-poti/POTI-ANDROID
Length of output: 149
🏁 Script executed:
Repository: team-poti/POTI-ANDROID
Length of output: 152
🏁 Script executed:
rg -nA5 "^(sealed class|enum class|data class)\s+HistoryMode" --type=ktRepository: team-poti/POTI-ANDROID
Length of output: 92
🏁 Script executed:
rg -nA5 "^(sealed class|enum class|data class)\s+HistorySummaryType" --type=ktRepository: team-poti/POTI-ANDROID
Length of output: 92
🏁 Script executed:
rg "@Serializable|enum class HistoryMode|sealed class HistoryMode" -B2 -A5 ./app/src/main/java/com/poti/android/presentation/history/Repository: team-poti/POTI-ANDROID
Length of output: 3454
🏁 Script executed:
rg "@Serializable|enum class HistorySummaryType|sealed class HistorySummaryType" -B2 -A5 ./app/src/main/java/com/poti/android/Repository: team-poti/POTI-ANDROID
Length of output: 26047
🏁 Script executed:
Repository: team-poti/POTI-ANDROID
Length of output: 3104
HistoryMode과HistorySummaryTypeenum에@Serializable추가 필수HistoryRoute.HistoryList가@Serializable로 표시되어 있으므로, 포함된 모든 프로퍼티 타입도 직렬화 가능해야 합니다. 현재HistoryMode와HistorySummaryTypeenum 모두@Serializable어노테이션이 없어서 네비게이션 인자 전달 시 직렬화 실패가 발생합니다. 두 enum 정의에@Serializable을 추가하세요.🤖 Prompt for AI Agents