Skip to content
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.poti.android.core.common.extension

import java.text.DecimalFormat

fun Int.toMoneyString(): String {
val decimalFormat = DecimalFormat("#,###")
return decimalFormat.format(this)
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,18 @@ import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.Icon
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.layout.ContentScale
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import coil.compose.SubcomposeAsyncImage
import coil.compose.AsyncImage
import com.poti.android.R
import com.poti.android.core.designsystem.theme.PotiTheme
import com.poti.android.core.designsystem.theme.PotiTheme.colors
Expand All @@ -34,7 +32,7 @@ enum class PotiProfileSummarySize(val profilePicSize: Dp) {

@Composable
fun PotiProfileSummary(
profileImageUrl: String,
profileImageUrl: String?,
nickname: String,
sizeType: PotiProfileSummarySize,
rating: String,
Expand All @@ -46,25 +44,15 @@ fun PotiProfileSummary(
horizontalArrangement = Arrangement.spacedBy(8.dp),
verticalAlignment = Alignment.CenterVertically,
) {
SubcomposeAsyncImage(
AsyncImage(
model = profileImageUrl,
contentDescription = null,
contentScale = ContentScale.Crop,
modifier = Modifier
.size(sizeType.profilePicSize)
.clip(RoundedCornerShape(99.dp)),
// TODO: [천민재] 에셋 추가시 구현
loading = {
// TODO: [천민재] 임시 이미지
Icon(
painter = painterResource(id = R.drawable.ic_member),
tint = Color.Black,
contentDescription = null,
)
},
// TODO: [천민재] 에셋 추가시 구현
error = {
},
placeholder = painterResource(id = R.drawable.ic_member),
error = painterResource(id = R.drawable.ic_member),
)

when (sizeType) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package com.poti.android.domain.model.delivery

data class DeliveryOption(
val deliveryId: Long,
val name: String, // 배송 방식
val price: Int, // 배송비
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.poti.android.domain.model.party

data class Participant(
val userId: Long, // 참여자 유저 ID
val nickname: String, // 참여자 닉네임
val profileImage: String?, // 참여자 프로필 이미지 (없으면 null)
val rating: Double, // 참여자 평점
val selectedMembers: List<String>, // 선점한 멤버 목록
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package com.poti.android.domain.model.party

import com.poti.android.domain.model.delivery.DeliveryOption
import com.poti.android.domain.model.user.UserSummary
import com.poti.android.domain.type.PartyStatusType

data class PartyDetail(
val postId: Long, // 분철글 고유 ID
val isMyPost: Boolean, // 본인 작성 글 여부
val status: PartyStatusType, // 모집 상태
val artist: String, // 아티스트 그룹명
val artistId: Long, // 아티스트 아이디
val title: String, // 분철글 제목
val price: Int, // 1인당 가격 (원)
val uploadTime: String, // 업로드 시간 (예: "4시간 전")
val deadline: String, // 모집 마감일
val images: List<PartyImage>, // 상품 이미지 리스트
val content: String, // 분철글 본문 내용
val deliveryOptions: List<DeliveryOption>, // 배송 방법 리스트
val userSummary: UserSummary, // 총대(작성자) 정보
val currentCount: Int, // 현재 참여 인원 수
val totalCount: Int, // 총 모집 인원 수
val participants: List<Participant>, // 참여자 정보 리스트
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package com.poti.android.domain.model.party

data class PartyImage(
val sortOrder: Int, // 이미지 노출 순서
val imageUrl: String, // 이미지 S3 URL
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.poti.android.domain.model.user

data class UserSummary(
val userId: Long, // 총대 유저 ID
val nickname: String, // 총대 닉네임
val profileImage: String?, // 총대 프로필 이미지 (없으면 null)
val rating: Double, // 총대 매너 온도/평점
val reviewCount: Int, // 총대가 받은 거래 후기 수
)
10 changes: 10 additions & 0 deletions app/src/main/java/com/poti/android/domain/type/PartyStatusType.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package com.poti.android.domain.type

enum class PartyStatusType {
RECRUITING, // 모집중
CLOSED, // 모집 완료
PAYMENT_DONE, // 입금완료
SHIPPING, // 배송시작
DELIVERED, // 배송완료
COMPLETED, // 거래 완료
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import androidx.navigation.compose.NavHost
import com.poti.android.presentation.auth.navigation.authNavGraph
import com.poti.android.presentation.history.navigation.historyNavGraph
import com.poti.android.presentation.onboarding.navigation.onboardingNavGraph
import com.poti.android.presentation.party.goodsfilter.navigation.navigateToGoodsCategory
import com.poti.android.presentation.party.partyNavGraph
import com.poti.android.presentation.user.mypage.navigation.myPageNavGraph
import com.poti.android.presentation.user.profile.navigation.profileNavGraph
Expand All @@ -31,8 +30,8 @@ fun PotiNavHost(
paddingValues = paddingValues,
)
partyNavGraph(
navController = navigator.navController,
paddingValues = paddingValues,
onNavigateToGoodsCategory = navigator.navController::navigateToGoodsCategory,
)
historyNavGraph(
paddingValues = paddingValues,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.poti.android.presentation.party

import androidx.compose.foundation.layout.PaddingValues
import androidx.navigation.NavController
import androidx.navigation.NavGraphBuilder
import androidx.navigation.navigation
import com.poti.android.core.navigation.Route
Expand All @@ -15,21 +16,22 @@ import kotlinx.serialization.Serializable
object PartyGraph : Route

fun NavGraphBuilder.partyNavGraph(
onNavigateToGoodsCategory: () -> Unit,
navController: NavController,
paddingValues: PaddingValues,
) {
navigation<PartyGraph>(
startDestination = HomeRoute.Home,
) {
homeNavGraph(
paddingValues = paddingValues,
onNavigateToGoodsCategory = onNavigateToGoodsCategory,
navController = navController,
)
goodsFilterNavGraph(
paddingValues = paddingValues,
)
partyDetailNavGraph(
paddingValues = paddingValues,
navController = navController,
)
partyCreateNavGraph(
paddingValues = paddingValues,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
package com.poti.android.presentation.party.detail

import com.poti.android.domain.model.delivery.DeliveryOption
import com.poti.android.domain.model.party.Participant
import com.poti.android.domain.model.party.PartyDetail
import com.poti.android.domain.model.party.PartyImage
import com.poti.android.domain.model.user.UserSummary
import com.poti.android.domain.type.PartyStatusType

val dummyPartyDetail = PartyDetail(
postId = 1,
isMyPost = false,
status = PartyStatusType.RECRUITING,
artist = "IVE(아이브)",
artistId = 1,
title = "러브다이브 위드뮤",
price = 5000,
uploadTime = "4시간 전",
deadline = "2025-12-31",
content = "내용내용내용\n내용내용내용",
images = listOf(
PartyImage(
sortOrder = 1,
imageUrl = "https://i.pinimg.com/736x/ad/6f/c0/ad6fc0da5a240a59524a64f0d168659f.jpg",
),
PartyImage(
sortOrder = 2,
imageUrl = "https://i.pinimg.com/736x/54/a1/f6/54a1f60741b33e99d574e81ccf4f5b9e.jpg",
),
PartyImage(
sortOrder = 3,
imageUrl = "https://i.pinimg.com/1200x/61/73/3b/61733b2ae4023c9826ec7d303dab0ba0.jpg",
),
),
deliveryOptions = listOf(
DeliveryOption(
deliveryId = 1,
name = "택배",
price = 4000,
),
DeliveryOption(
deliveryId = 2,
name = "준등기",
price = 1800,
),
),
userSummary = UserSummary(
userId = 1,
nickname = "닉네임",
profileImage = null,
rating = 4.8,
reviewCount = 14,
),
participants = listOf(
Participant(
userId = 1,
nickname = "참여자1",
profileImage = null,
rating = 4.5,
selectedMembers = listOf("원영"),
),
Participant(
userId = 1,
nickname = "참여자1",
profileImage = null,
rating = 4.5,
selectedMembers = listOf("이서"),
),
Participant(
userId = 2,
nickname = "참여자2",
profileImage = null,
rating = 3.4,
selectedMembers = listOf("유진"),
),
),
currentCount = 2,
totalCount = 5,
)
Loading