Skip to content
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

[refactor] 코스 상세 뷰 시작시간 정보 추가 #202

Merged
merged 2 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading