Skip to content

Commit ad1f83f

Browse files
authored
[Feat/#35] 분철팟 상세 뷰 UI 구현 (#39)
* [feat/#35] 헤더 컴포넌트 구현 * [feat/#35] 분철팟 상세 뷰 UI 구현 * [feat/#35] 분철팟 상세 뷰 UI 구현 * [feat/#35] 이미지 비율 수정 * [feat/#35] 내비게이션 연결 * [feat/#35] 패키지 분리 * [feat/#35] 내비게이션 파라미터 수정 * [feat/#35] 코리 반영 * [feat/#35] 내비 수정 * [feat/#35] 주석 수정 * [feat/#35] 뷰모델 연결
1 parent e3327fb commit ad1f83f

File tree

25 files changed

+793
-49
lines changed

25 files changed

+793
-49
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package com.poti.android.core.common.extension
2+
3+
import java.text.DecimalFormat
4+
5+
fun Int.toMoneyString(): String {
6+
val decimalFormat = DecimalFormat("#,###")
7+
return decimalFormat.format(this)
8+
}

app/src/main/java/com/poti/android/core/designsystem/component/display/PotiProfileSummary.kt

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,18 @@ import androidx.compose.foundation.layout.padding
88
import androidx.compose.foundation.layout.size
99
import androidx.compose.foundation.layout.width
1010
import androidx.compose.foundation.shape.RoundedCornerShape
11-
import androidx.compose.material3.Icon
1211
import androidx.compose.material3.Text
1312
import androidx.compose.runtime.Composable
1413
import androidx.compose.ui.Alignment
1514
import androidx.compose.ui.Modifier
1615
import androidx.compose.ui.draw.clip
17-
import androidx.compose.ui.graphics.Color
1816
import androidx.compose.ui.layout.ContentScale
1917
import androidx.compose.ui.res.painterResource
2018
import androidx.compose.ui.text.TextStyle
2119
import androidx.compose.ui.tooling.preview.Preview
2220
import androidx.compose.ui.unit.Dp
2321
import androidx.compose.ui.unit.dp
24-
import coil.compose.SubcomposeAsyncImage
22+
import coil.compose.AsyncImage
2523
import com.poti.android.R
2624
import com.poti.android.core.designsystem.theme.PotiTheme
2725
import com.poti.android.core.designsystem.theme.PotiTheme.colors
@@ -34,7 +32,7 @@ enum class PotiProfileSummarySize(val profilePicSize: Dp) {
3432

3533
@Composable
3634
fun PotiProfileSummary(
37-
profileImageUrl: String,
35+
profileImageUrl: String?,
3836
nickname: String,
3937
sizeType: PotiProfileSummarySize,
4038
rating: String,
@@ -46,25 +44,15 @@ fun PotiProfileSummary(
4644
horizontalArrangement = Arrangement.spacedBy(8.dp),
4745
verticalAlignment = Alignment.CenterVertically,
4846
) {
49-
SubcomposeAsyncImage(
47+
AsyncImage(
5048
model = profileImageUrl,
5149
contentDescription = null,
5250
contentScale = ContentScale.Crop,
5351
modifier = Modifier
5452
.size(sizeType.profilePicSize)
5553
.clip(RoundedCornerShape(99.dp)),
56-
// TODO: [천민재] 에셋 추가시 구현
57-
loading = {
58-
// TODO: [천민재] 임시 이미지
59-
Icon(
60-
painter = painterResource(id = R.drawable.ic_member),
61-
tint = Color.Black,
62-
contentDescription = null,
63-
)
64-
},
65-
// TODO: [천민재] 에셋 추가시 구현
66-
error = {
67-
},
54+
placeholder = painterResource(id = R.drawable.ic_member),
55+
error = painterResource(id = R.drawable.ic_member),
6856
)
6957

7058
when (sizeType) {

app/src/main/java/com/poti/android/core/designsystem/component/navigation/PotiBottomButton.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import androidx.compose.runtime.Composable
99
import androidx.compose.ui.Modifier
1010
import androidx.compose.ui.tooling.preview.Preview
1111
import androidx.compose.ui.unit.dp
12+
import com.poti.android.core.common.util.screenWidthDp
1213
import com.poti.android.core.designsystem.component.button.ActionButtonType
1314
import com.poti.android.core.designsystem.component.button.PotiActionButton
1415
import com.poti.android.core.designsystem.theme.PotiTheme
@@ -24,7 +25,7 @@ fun PotiBottomButton(
2425
Row(
2526
modifier = modifier
2627
.background(PotiTheme.colors.white)
27-
.padding(horizontal = 16.dp)
28+
.padding(horizontal = screenWidthDp(16.dp))
2829
.padding(top = 4.dp, bottom = 16.dp),
2930
horizontalArrangement = Arrangement.spacedBy(8.dp),
3031
) {

app/src/main/java/com/poti/android/core/designsystem/component/navigation/PotiHeaderPage.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import androidx.compose.ui.tooling.preview.Preview
1313
import androidx.compose.ui.unit.dp
1414
import androidx.compose.ui.unit.em
1515
import com.poti.android.R
16+
import com.poti.android.core.common.util.screenWidthDp
1617
import com.poti.android.core.designsystem.component.button.PotiIconButton
1718
import com.poti.android.core.designsystem.theme.PotiTheme
1819

@@ -27,7 +28,7 @@ fun PotiHeaderPage(
2728
Row(
2829
modifier = modifier
2930
.background(PotiTheme.colors.white)
30-
.padding(4.dp),
31+
.padding(horizontal = screenWidthDp(4.dp), vertical = 4.dp),
3132
verticalAlignment = Alignment.CenterVertically,
3233
horizontalArrangement = Arrangement.spacedBy(8.dp),
3334
) {

app/src/main/java/com/poti/android/core/designsystem/component/navigation/PotiHeaderPrimary.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import androidx.compose.ui.res.vectorResource
1818
import androidx.compose.ui.tooling.preview.Preview
1919
import androidx.compose.ui.unit.dp
2020
import com.poti.android.R
21+
import com.poti.android.core.common.util.screenWidthDp
2122
import com.poti.android.core.designsystem.component.button.PotiIconButton
2223
import com.poti.android.core.designsystem.theme.PotiTheme
2324

@@ -33,7 +34,7 @@ fun PotiHeaderPrimary(
3334
Row(
3435
modifier = modifier
3536
.background(PotiTheme.colors.white)
36-
.padding(start = 20.dp, end = 4.dp)
37+
.padding(start = screenWidthDp(20.dp), end = screenWidthDp(4.dp))
3738
.padding(vertical = 4.dp),
3839
verticalAlignment = Alignment.CenterVertically,
3940
) {
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package com.poti.android.domain.model.delivery
2+
3+
data class DeliveryOption(
4+
val deliveryId: Long, // 배송 방식 ID
5+
val name: String, // 배송 방식
6+
val price: Int, // 배송비
7+
)
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package com.poti.android.domain.model.party
2+
3+
data class Participant(
4+
val userId: Long, // 참여자 유저 ID
5+
val nickname: String, // 참여자 닉네임
6+
val profileImage: String?, // 참여자 프로필 이미지 (없으면 null)
7+
val rating: Double, // 참여자 평점
8+
val selectedMembers: List<String>, // 선점한 멤버 목록
9+
)
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package com.poti.android.domain.model.party
2+
3+
import com.poti.android.domain.model.delivery.DeliveryOption
4+
import com.poti.android.domain.model.user.UserSummary
5+
import com.poti.android.domain.type.PartyStatusType
6+
7+
data class PartyDetail(
8+
val postId: Long, // 분철글 고유 ID
9+
val isMyPost: Boolean, // 본인 작성 글 여부
10+
val status: PartyStatusType, // 모집 상태
11+
val artist: String, // 아티스트 그룹명
12+
val artistId: Long, // 아티스트 아이디
13+
val title: String, // 분철글 제목
14+
val price: Int, // 1인당 가격 (원)
15+
val uploadTime: String, // 업로드 시간 (예: "4시간 전")
16+
val deadline: String, // 모집 마감일
17+
val images: List<PartyImage>, // 상품 이미지 리스트
18+
val content: String, // 분철글 본문 내용
19+
val deliveryOptions: List<DeliveryOption>, // 배송 방법 리스트
20+
val userSummary: UserSummary, // 총대(작성자) 정보
21+
val currentCount: Int, // 현재 참여 인원 수
22+
val totalCount: Int, // 총 모집 인원 수
23+
val participants: List<Participant>, // 참여자 정보 리스트
24+
)
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
package com.poti.android.domain.model.party
2+
3+
data class PartyImage(
4+
val sortOrder: Int, // 이미지 노출 순서
5+
val imageUrl: String, // 이미지 S3 URL
6+
)
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package com.poti.android.domain.model.user
2+
3+
data class UserSummary(
4+
val userId: Long, // 총대 유저 ID
5+
val nickname: String, // 총대 닉네임
6+
val profileImage: String?, // 총대 프로필 이미지 (없으면 null)
7+
val rating: Double, // 총대 매너 온도/평점
8+
val reviewCount: Int, // 총대가 받은 거래 후기 수
9+
)

0 commit comments

Comments
 (0)