Skip to content

Commit

Permalink
Merge pull request #202 from TeamDATEROAD/refactor-course-detail-startAt
Browse files Browse the repository at this point in the history
[refactor] 코스 상세 뷰 시작시간 정보 추가
  • Loading branch information
t1nm1ksun authored Aug 27, 2024
2 parents d6ba3a7 + 4dc330d commit 2d00bdb
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import org.sopt.dateroad.data.dataremote.model.response.ResponseCourseDetailDto
import org.sopt.dateroad.data.mapper.toEntity.toCost
import org.sopt.dateroad.data.mapper.toEntity.toCourseDetailDate
import org.sopt.dateroad.data.mapper.toEntity.toDuration
import org.sopt.dateroad.data.mapper.toEntity.toStartAtString
import org.sopt.dateroad.domain.model.CourseDetail
import org.sopt.dateroad.domain.type.MoneyTagType.Companion.toCostTagTitle

Expand All @@ -24,6 +25,6 @@ fun ResponseCourseDetailDto.toDomain(): CourseDetail = CourseDetail(
free = this.free,
totalPoint = this.totalPoint,
isCourseMine = this.isCourseMine,
isUserLiked = this.isUserLiked

isUserLiked = this.isUserLiked,
startAt = this.startAt.toStartAtString()
)
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ fun CourseDetailScreen(
true -> {
courseDetailOpenedDetail(
description = description,
startAt = startAt,
places = places,
totalCost = totalCost,
tags = tags.mapNotNull { tag -> tag.getDateTagTypeByName() }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import org.sopt.dateroad.ui.theme.DateRoadTheme

fun LazyListScope.courseDetailOpenedDetail(
description: String,
startAt: String,
places: List<Place>,
totalCost: String,
tags: List<DateTagType>
Expand All @@ -29,7 +30,7 @@ fun LazyListScope.courseDetailOpenedDetail(
item {
Spacer(modifier = Modifier.height(16.dp))
}
courseDetailTimeline(places = places)
courseDetailTimeline(startAt = startAt, places = places)
item {
CourseDetailCost(totalCost = totalCost)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import org.sopt.dateroad.presentation.ui.component.card.DateRoadPlaceCard
import org.sopt.dateroad.ui.theme.DateRoadTheme

fun LazyListScope.courseDetailTimeline(
startAt: String,
places: List<Place>
) {
item {
Expand All @@ -25,7 +26,14 @@ fun LazyListScope.courseDetailTimeline(
color = DateRoadTheme.colors.black,
modifier = Modifier.padding(horizontal = 16.dp)
)
Spacer(modifier = Modifier.height(12.dp))
Spacer(modifier = Modifier.height(7.dp))
Text(
text = startAt,
style = DateRoadTheme.typography.bodySemi15,
color = DateRoadTheme.colors.gray400,
modifier = Modifier.padding(horizontal = 16.dp)
)
Spacer(modifier = Modifier.height(14.dp))
}
items(places.size) { index ->
DateRoadPlaceCard(
Expand Down

0 comments on commit 2d00bdb

Please sign in to comment.