-
Notifications
You must be signed in to change notification settings - Fork 0
Feature#137 : 마이페이지 디테일 수정 및 이전 활동내역 작업 완료 #141
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
Changes from 15 commits
d801c48
1f0d6a9
993a495
943831f
267584e
5a2765c
cf74976
3f75e63
ec900e2
e407fa5
bc4feea
aa39fc6
a644235
cb8e5bf
677201e
1e0b260
5fa2468
8234428
dbdb1c5
c3a484d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,12 @@ | ||
| package com.yapp.dataapi | ||
|
|
||
| import com.yapp.model.ActivityHistory | ||
| import com.yapp.model.UserInfo | ||
| import kotlinx.coroutines.flow.Flow | ||
|
|
||
| interface UserRepository { | ||
| suspend fun getUserAccessToken() : Flow<String> | ||
| suspend fun deleteAccount() | ||
| suspend fun getUserProfile(): Flow<UserInfo> | ||
| fun getUserActivityHistories(): Flow<ActivityHistory> | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| package com.yapp.core.data.remote.model.response | ||
|
|
||
| import com.yapp.model.ActivityHistory | ||
| import kotlinx.serialization.Serializable | ||
|
|
||
| @Serializable | ||
| data class UserActivityHistoryResponse( | ||
| val activityUnits: List<Unit> | ||
| ) { | ||
| @Serializable | ||
| data class Unit( | ||
| val generation: Int, | ||
| val position: String, | ||
| val activityStartDate: String?, | ||
| val activityEndDate: String? | ||
| ) | ||
|
|
||
| fun toModel(): ActivityHistory { | ||
| return ActivityHistory( | ||
| activityUnits = activityUnits.map { | ||
| ActivityHistory.Unit( | ||
| generation = it.generation, | ||
| position = it.position, | ||
| activityStartDate = it.activityStartDate, | ||
| activityEndDate = it.activityEndDate | ||
| ) | ||
| } | ||
| ) | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| package com.yapp.model | ||
|
|
||
| data class ActivityHistory( | ||
| val activityUnits: List<Unit> | ||
| ) { | ||
| data class Unit( | ||
| val generation: Int, | ||
| val position: String, | ||
| val activityStartDate: String?, | ||
| val activityEndDate: String? | ||
| ) | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,6 +11,6 @@ data class Sessions( | |
| val progressPhase: String | ||
| ) { | ||
| enum class AttendType { | ||
|
|
||
| OFFLINE, TEAM | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| package com.yapp.feature.history | ||
| package com.yapp.feature.history.attend | ||
|
|
||
| import com.yapp.model.Sessions | ||
|
|
||
|
|
||
|
Member
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. R: Card(
modifier = modifier.fillMaxWidth(),
shape = RoundedCornerShape(8.dp),
colors = CardDefaults.cardColors(containerColor = YappTheme.colorScheme.staticWhite),
border = BorderStroke(
color = YappTheme.colorScheme.lineSolidAlternative,
width = 1.dp
)
) {
Column {
Row(
modifier = Modifier
.fillMaxWidth()
.background(YappTheme.colorScheme.backgroundElevatedAlternative)
.padding(horizontal = 16.dp, vertical = 10.dp),
horizontalArrangement = Arrangement.SpaceEvenly,
verticalAlignment = Alignment.CenterVertically
) {피그마 디자인과 같이 배경색상 변경 및 테두리 처리해주시면 감사하겠습니다.
Contributor
Author
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. |
|
Member
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. R:
Contributor
Author
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. 꼼꼼한 확인 항상 감사합니다 🙇♂️ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| package com.yapp.feature.history.previous | ||
|
|
||
| import androidx.compose.foundation.Image | ||
| import androidx.compose.foundation.background | ||
| import androidx.compose.foundation.layout.Arrangement | ||
| import androidx.compose.foundation.layout.Box | ||
| import androidx.compose.foundation.layout.Column | ||
| import androidx.compose.foundation.layout.Row | ||
| import androidx.compose.foundation.layout.fillMaxWidth | ||
| import androidx.compose.foundation.layout.padding | ||
| import androidx.compose.foundation.layout.size | ||
| import androidx.compose.foundation.shape.RoundedCornerShape | ||
| import androidx.compose.material3.Text | ||
| import androidx.compose.runtime.Composable | ||
| import androidx.compose.ui.Alignment | ||
| import androidx.compose.ui.Modifier | ||
| import androidx.compose.ui.res.painterResource | ||
| import androidx.compose.ui.tooling.preview.Preview | ||
| import androidx.compose.ui.unit.dp | ||
| import com.yapp.core.designsystem.theme.YappTheme | ||
| import com.yapp.core.designsystem.R as coreDesignR | ||
|
|
||
| @Composable | ||
| internal fun HistoryItems( | ||
| modifier: Modifier = Modifier, | ||
| generation: Int, | ||
| position: String, | ||
| slot: @Composable (() -> Unit)? = null | ||
| ) { | ||
| Column( | ||
| modifier = modifier.fillMaxWidth(), | ||
| verticalArrangement = Arrangement.spacedBy(8.dp) | ||
| ) { | ||
| Row(horizontalArrangement = Arrangement.spacedBy(2.dp), verticalAlignment = Alignment.CenterVertically) { | ||
| Text(modifier = Modifier.weight(1f), text = position, style = YappTheme.typography.heading2Bold) | ||
| Box(modifier = Modifier.size(20.dp)) { | ||
| Image( | ||
| modifier = Modifier.size(16.dp).align(Alignment.Center), | ||
| painter = painterResource(coreDesignR.drawable.icon_yapp), | ||
| contentDescription = null | ||
| ) | ||
| } | ||
|
|
||
| Text("${generation}기", style = YappTheme.typography.label1NormalMedium) | ||
| } | ||
|
|
||
| slot?.invoke() | ||
| } | ||
| } | ||
|
|
||
| @Preview(showBackground = true) | ||
| @Composable | ||
| private fun PreviewHistoryItems() { | ||
| HistoryItems( | ||
| modifier = Modifier.background( | ||
| color = YappTheme.colorScheme.orange99, | ||
| shape = RoundedCornerShape(12.dp) | ||
| ).padding(16.dp), | ||
| generation = 20, | ||
| position = "운영진" | ||
| ) | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| package com.yapp.feature.history.previous | ||
|
|
||
| data class PreviousHistoryState( | ||
| val items: List<History> = emptyList() | ||
| ) { | ||
| data class History( | ||
| val generation: Int, | ||
| val position: String, | ||
| val activityStartDate: String?, | ||
| val activityEndDate: String? | ||
| ) { | ||
| val showSlot = activityEndDate.orEmpty().isNotEmpty() && activityStartDate.orEmpty().isNotEmpty() | ||
| } | ||
| } | ||
|
|
||
| sealed interface PreviousHistorySideEffect { | ||
| data object Finish : PreviousHistorySideEffect | ||
| } | ||
|
|
||
| sealed interface PreviousHistoryIntent { | ||
| data object OnEntryScreen : PreviousHistoryIntent | ||
| data object OnClickBackButton : PreviousHistoryIntent | ||
| } | ||
|
|

Uh oh!
There was an error while loading. Please reload this page.
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.
R:
sessionRepository -> scheduleRepository 네이밍 변경이 반영되지 않아서 컴파일 오류가 발생하는 것 같습니다