Skip to content
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 @@ -19,5 +19,10 @@ enum class DateChipGroupType(
titleRes = R.string.date_chip_group_enroll_course,
titleTextStyle = defaultDateRoadTypography.bodySemi15,
maxSize = 3
),
TIMELINE(
titleRes = R.string.date_chip_group_enroll_timeline,
titleTextStyle = defaultDateRoadTypography.bodySemi15,
maxSize = 3
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ fun DateRoadPlaceCard(
Spacer(modifier = Modifier.width(10.dp))

DateRoadTextTag(
modifier = Modifier.width(74.dp),
textContent = place.duration,
tagContentType = TagType.PLACE_CARD_TIME
)
Expand Down Expand Up @@ -130,7 +131,7 @@ fun DateRoadPlaceCardPreview() {
DateRoadPlaceCard(
placeCardType = PlaceCardType.COURSE_NORMAL,
sequence = 0,
place = Place(title = "성수미술관 성수점성수미술관 성수점성수미술관 성수점성수미술관 성수점성수미술관 성수점", address = "서울 광진구 자양동 704-1", duration = "2.5시간")
place = Place(title = "성수미술관 성수점성수미술관 성수점성수미술관 성수점성수미술관 성수점성수미술관 성수점", address = "서울 광진구 자양동 704-1", duration = "4.0시간")
)
Spacer(modifier = Modifier.height(8.dp))
DateRoadPlaceCard(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
package org.sopt.teamdateroad.presentation.ui.component.tag

import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.tooling.preview.Preview
import org.sopt.teamdateroad.presentation.type.TagType
import org.sopt.teamdateroad.ui.theme.DATEROADTheme
Expand All @@ -18,11 +21,17 @@ fun DateRoadTextTag(
modifier = modifier,
tagType = tagContentType
) {
Text(
text = textContent,
style = tagContentType.textStyle,
color = tagContentType.contentColor
)
Box(
modifier = modifier,
contentAlignment = Alignment.Center
) {
Text(
text = textContent,
style = tagContentType.textStyle,
color = tagContentType.contentColor,
textAlign = TextAlign.Center
)
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import org.sopt.teamdateroad.domain.type.SeoulAreaType
import org.sopt.teamdateroad.presentation.type.DateChipGroupType
import org.sopt.teamdateroad.presentation.type.DateTagType
import org.sopt.teamdateroad.presentation.type.DateTagType.Companion.getDateTagTypeByName
import org.sopt.teamdateroad.presentation.type.EnrollType
import org.sopt.teamdateroad.presentation.ui.component.chipgroup.DateRoadDateChipGroup
import org.sopt.teamdateroad.presentation.ui.component.textfield.DateRoadBasicTextField
import org.sopt.teamdateroad.presentation.util.view.LoadState
Expand Down Expand Up @@ -67,7 +68,10 @@ fun EnrollFirstScreen(
)
Spacer(modifier = Modifier.height(20.dp))
DateRoadDateChipGroup(
dateChipGroupType = DateChipGroupType.ENROLL,
dateChipGroupType = when (enrollUiState.enrollType) {
EnrollType.COURSE -> DateChipGroupType.ENROLL
EnrollType.TIMELINE -> DateChipGroupType.TIMELINE
},
selectedDateTags = enrollUiState.enroll.tags.mapNotNull { tag -> tag.getDateTagTypeByName() },
onSelectedDateTagsChanged = onDateChipClicked
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ fun EnrollScreenPreview() {
loadState = LoadState.Success
),
searchKeyword = "",
searchPlaceInfos = listOf<PlaceInfo>(),
searchPlaceInfos = emptyList(),
onTopBarBackButtonClick = {},
onTopBarLoadButtonClick = {},
onEnrollButtonClick = {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import kotlinx.coroutines.launch
import org.sopt.teamdateroad.R
import org.sopt.teamdateroad.domain.model.Place
import org.sopt.teamdateroad.domain.model.PlaceInfo
import org.sopt.teamdateroad.presentation.type.EnrollType
import org.sopt.teamdateroad.presentation.type.PlaceCardType
import org.sopt.teamdateroad.presentation.ui.component.button.DateRoadTextButton
import org.sopt.teamdateroad.presentation.ui.component.card.DateRoadPlaceCard
Expand Down Expand Up @@ -78,7 +79,10 @@ fun EnrollSecondScreen(
Spacer(modifier = Modifier.height(11.dp))
Text(
modifier = Modifier.padding(horizontal = 16.dp),
text = stringResource(id = R.string.enroll_place_title),
text = when (enrollUiState.enrollType) {
EnrollType.COURSE -> stringResource(id = R.string.enroll_course_place_title)
EnrollType.TIMELINE -> stringResource(id = R.string.enroll_timeline_place_title)
},
color = DateRoadTheme.colors.black,
style = DateRoadTheme.typography.bodyBold17
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
Expand All @@ -31,6 +32,7 @@ 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.platform.LocalConfiguration
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.input.ImeAction
Expand Down Expand Up @@ -180,10 +182,13 @@ fun PlaceSearchBottomSheet(

@Composable
private fun EmptyPlaceSearchResult() {
val screenHeight = LocalConfiguration.current.screenHeightDp.dp
val offsetPadding = screenHeight * 0.2f

Column(
modifier = Modifier
.height(472.dp)
.fillMaxWidth(),
.fillMaxSize()
.padding(bottom = offsetPadding),
horizontalAlignment = Alignment.CenterHorizontally,
verticalArrangement = Arrangement.Center
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import org.sopt.teamdateroad.presentation.ui.signin.navigation.SignInRoute
import org.sopt.teamdateroad.presentation.ui.signin.navigation.navigationSignIn
import org.sopt.teamdateroad.presentation.ui.timeline.navigation.navigationTimeline
import org.sopt.teamdateroad.presentation.ui.timelinedetail.navigation.navigateToTimelineDetail
import org.sopt.teamdateroad.presentation.util.ViewPath

class MainNavigator(
val navHostController: NavHostController
Expand Down Expand Up @@ -78,6 +79,14 @@ class MainNavigator(
navHostController.navigationEnroll(enrollType = enrollType, viewPath = viewPath, courseId = courseId)
}

fun navigateToTimeLineToEnrollCourse(courseId: Int) {
navHostController.navigationEnroll(
enrollType = EnrollType.COURSE,
viewPath = ViewPath.TIMELINE_TO_ENROLL_COURSE,
courseId = courseId
)
}

fun navigateToHome(navOptions: NavOptions? = null) {
navHostController.navigationHome(
navOptions ?: navOptions {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ fun MainNavHost(

timelineDetailGraph(
popBackStack = navigator::popBackStackIfNotHome,
navigateToEnrollCourse = navigator::navigateToTimeLineToEnrollCourse,
viewPath = previousView
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ import org.sopt.teamdateroad.ui.theme.DateRoadTheme
@Composable
fun TimelineDetailRoute(
popBackStack: () -> Unit,
navigateToEnrollCourse: (Int) -> Unit,
timelineId: Int,
timelineType: TimelineType,
previousView: String
Expand Down Expand Up @@ -114,6 +115,7 @@ fun TimelineDetailRoute(
timelineType = timelineType,
onTopBarItemClick = popBackStack,
onButtonClick = { viewModel.setEvent(TimelineDetailContract.TimelineDetailEvent.SetShowDeleteBottomSheet(true)) },
onEnrollCourseButtonClick = navigateToEnrollCourse,
showKakaoClicked = {
viewModel.setEvent(TimelineDetailContract.TimelineDetailEvent.SetShowKakaoDialog(true))
AmplitudeUtils.trackEventWithProperties(
Expand Down Expand Up @@ -149,6 +151,7 @@ fun TimelineDetailScreen(
timelineType: TimelineType,
onTopBarItemClick: () -> Unit = {},
onButtonClick: () -> Unit = {},
onEnrollCourseButtonClick: (Int) -> Unit = {},
showKakaoClicked: () -> Unit = {},
setShowKakaoDialog: (Boolean) -> Unit,
setShowDeleteBottomSheet: (Boolean) -> Unit,
Expand Down Expand Up @@ -308,6 +311,27 @@ fun TimelineDetailScreen(
)
}
}
} else {
Column(
modifier = Modifier
.align(Alignment.BottomCenter)
.padding(vertical = 16.dp, horizontal = 70.dp)
.background(DateRoadTheme.colors.purple600, CircleShape)
.noRippleClickable(onClick = { onEnrollCourseButtonClick(uiState.timelineDetail.timelineId) })
) {
Box(
modifier = Modifier
.padding(horizontal = 24.dp, vertical = 16.dp)
.clip(CircleShape)
) {
Text(
text = stringResource(id = R.string.timeline_detail_point),
style = DateRoadTheme.typography.bodyBold15,
color = DateRoadTheme.colors.white,
textAlign = TextAlign.Center
)
}
}
}
}
}
Expand Down Expand Up @@ -377,7 +401,7 @@ fun TimelineDetailScreenPreview() {
loadState = LoadState.Success,
timelineDetail = TimelineDetail(
date = "2024-08-17",
dDay = "D-3",
dDay = "",
title = "Seoul City Tour",
city = "Seoul",
startAt = "10:00 AM",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ fun NavController.navigateToTimelineDetail(timelineType: TimelineType, timelineI

fun NavGraphBuilder.timelineDetailGraph(
viewPath: String,
popBackStack: () -> Unit
popBackStack: () -> Unit,
navigateToEnrollCourse: (Int) -> Unit
) {
composable(
route = TimelineDetailRoutes.ROUTE_WITH_ARGUMENT,
Expand All @@ -29,6 +30,7 @@ fun NavGraphBuilder.timelineDetailGraph(

TimelineDetailRoute(
popBackStack = popBackStack,
navigateToEnrollCourse = navigateToEnrollCourse,
timelineId = timelineId,
timelineType = timelineType,
previousView = viewPath
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ object SignIn {
}

object Time {
const val TIME = " 시간"
const val TIME = "시간"
}

object TimelineAmplitude {
Expand Down Expand Up @@ -204,6 +204,7 @@ object ViewPath {
const val MY_COURSE_READ = "내가 열람한 코스"
const val COURSE_DETAIL = "코스 상세"
const val LOOK = "코스 둘러보기"
const val TIMELINE_TO_ENROLL_COURSE = "일정을 데이트 코스로 등록"
const val POINT_HISTORY = "포인트 내역"
}

Expand Down
6 changes: 4 additions & 2 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@
<!-- TopBarTitle -->
<string name="top_bar_title_point_history">포인트 내역</string>
<string name="top_bar_title_enroll_course">코스 등록하기</string>
<string name="top_bar_title_enroll_timeline">일정 등록하기</string>
<string name="top_bar_title_enroll_timeline">일정 계획하기</string>
<string name="top_bar_title_my_course_read">내가 열람한 코스</string>
<string name="top_bar_title_my_course_enroll">내가 등록한 코스</string>
<string name="top_bar_title_look">코스 둘러보기</string>
Expand Down Expand Up @@ -206,6 +206,7 @@
<!-- DateChipGroup -->
<string name="date_chip_group_profile">나의 데이트 성향 (%1$d/%2$d)</string>
<string name="date_chip_group_enroll_course">데이트코스와 어울리는 태그를 선택해 주세요 (%1$d/%2$d)</string>
<string name="date_chip_group_enroll_timeline">예정된 데이트와 어울리는 태그를 선택해 주세요 (%1$d/%2$d)</string>

<!-- Course Detail -->
<string name="course_detail_duration">%1$.1f 시간</string>
Expand Down Expand Up @@ -246,7 +247,8 @@
<string name="enroll_city_placeholder">데이트 지역을 선택해 주세요 (필수)</string>
<string name="enroll_place_insert_bar_enter_place_placeholder">장소명을 입력해주세요</string>
<string name="enroll_place_insert_bar_select_course_time_placeholder">소요 시간</string>
<string name="enroll_place_title">어떤 코스로 이동하셨나요?</string>
<string name="enroll_course_place_title">어떤 코스로 이동하셨나요?</string>
<string name="enroll_timeline_place_title">어떤 코스를 계획하셨나요?</string>
<string name="enroll_place_description">장소와 소요시간을 입력하여 코스를 추가해 주세요</string>
<string name="enroll_place_guide">최소 2개의 장소를 추가해 주세요</string>
<string name="enroll_description_title">코스에 대한 설명을 적어 주세요</string>
Expand Down