diff --git a/data/src/main/java/com/terning/data/dto/response/HomeFilteringInfoResponseDto.kt b/data/src/main/java/com/terning/data/dto/response/HomeFilteringInfoResponseDto.kt index 6524556bc..0b0a43308 100644 --- a/data/src/main/java/com/terning/data/dto/response/HomeFilteringInfoResponseDto.kt +++ b/data/src/main/java/com/terning/data/dto/response/HomeFilteringInfoResponseDto.kt @@ -1,6 +1,5 @@ package com.terning.data.dto.response -import com.terning.domain.entity.response.HomeFilteringInfoModel import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable @@ -14,12 +13,4 @@ data class HomeFilteringInfoResponseDto( val startYear: Int?, @SerialName("startMonth") val startMonth: Int?, -) { - fun toHomeFilteringInfoModel(): HomeFilteringInfoModel = - HomeFilteringInfoModel( - grade = this.grade, - workingPeriod = this.workingPeriod, - startYear = this.startYear, - startMonth = this.startMonth, - ) -} \ No newline at end of file +) diff --git a/data/src/main/java/com/terning/data/dto/response/HomeRecommendInternResponseDto.kt b/data/src/main/java/com/terning/data/dto/response/HomeRecommendInternResponseDto.kt index 008315cc7..c8f8e8671 100644 --- a/data/src/main/java/com/terning/data/dto/response/HomeRecommendInternResponseDto.kt +++ b/data/src/main/java/com/terning/data/dto/response/HomeRecommendInternResponseDto.kt @@ -1,6 +1,5 @@ package com.terning.data.dto.response -import com.terning.domain.entity.response.HomeRecommendInternModel import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable @@ -24,17 +23,4 @@ data class HomeRecommendInternResponseDto( val companyImage: String, @SerialName("isScrapped") val isScrapped: Boolean, -) { - fun toRecommendInternEntity(): HomeRecommendInternModel = - HomeRecommendInternModel( - scrapId = this.scrapId, - internshipAnnouncementId = this.internshipAnnouncementId, - title = this.title, - dDay = this.dDay, - deadline = deadline, - workingPeriod = this.workingPeriod, - startYearMonth = this.startYearMonth, - companyImage = this.companyImage, - isScrapped = this.isScrapped, - ) -} +) diff --git a/data/src/main/java/com/terning/data/dto/response/HomeTodayInternResponseDto.kt b/data/src/main/java/com/terning/data/dto/response/HomeTodayInternResponseDto.kt index f93a1f21f..33283ae00 100644 --- a/data/src/main/java/com/terning/data/dto/response/HomeTodayInternResponseDto.kt +++ b/data/src/main/java/com/terning/data/dto/response/HomeTodayInternResponseDto.kt @@ -1,6 +1,5 @@ package com.terning.data.dto.response -import com.terning.domain.entity.response.HomeTodayInternModel import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable @@ -25,17 +24,4 @@ data class HomeTodayInternResponseDto( @SerialName("startYearMonth") val startYearMonth: String, -) { - fun toHomeTodayInternList(): HomeTodayInternModel = - HomeTodayInternModel( - scrapId = this.scrapId, - internshipAnnouncementId = this.internshipAnnouncementId, - companyImage = this.companyImage, - title = this.title, - dDay = this.dDay, - deadline = this.deadline, - workingPeriod = this.workingPeriod, - startYearMonth = this.startYearMonth, - color = this.color, - ) -} +) \ No newline at end of file diff --git a/data/src/main/java/com/terning/data/mapper/home/HomeFilteringInfoMapper.kt b/data/src/main/java/com/terning/data/mapper/home/HomeFilteringInfoMapper.kt new file mode 100644 index 000000000..afdb5f7bb --- /dev/null +++ b/data/src/main/java/com/terning/data/mapper/home/HomeFilteringInfoMapper.kt @@ -0,0 +1,12 @@ +package com.terning.data.mapper.home + +import com.terning.data.dto.response.HomeFilteringInfoResponseDto +import com.terning.domain.entity.home.HomeFilteringInfo + +fun HomeFilteringInfoResponseDto.toHomeFilteringInfo(): HomeFilteringInfo = + HomeFilteringInfo( + grade = this.grade, + workingPeriod = this.workingPeriod, + startYear = this.startYear, + startMonth = this.startMonth, + ) \ No newline at end of file diff --git a/data/src/main/java/com/terning/data/mapper/home/HomeRecommendInternMapper.kt b/data/src/main/java/com/terning/data/mapper/home/HomeRecommendInternMapper.kt new file mode 100644 index 000000000..6e505189c --- /dev/null +++ b/data/src/main/java/com/terning/data/mapper/home/HomeRecommendInternMapper.kt @@ -0,0 +1,17 @@ +package com.terning.data.mapper.home + +import com.terning.data.dto.response.HomeRecommendInternResponseDto +import com.terning.domain.entity.home.HomeRecommendIntern + +fun HomeRecommendInternResponseDto.toHomeRecommendInternList(): HomeRecommendIntern = + HomeRecommendIntern( + scrapId = this.scrapId, + internshipAnnouncementId = this.internshipAnnouncementId, + title = this.title, + dDay = this.dDay, + deadline = deadline, + workingPeriod = this.workingPeriod, + startYearMonth = this.startYearMonth, + companyImage = this.companyImage, + isScrapped = this.isScrapped, + ) diff --git a/data/src/main/java/com/terning/data/mapper/home/HomeTodayInternMapper.kt b/data/src/main/java/com/terning/data/mapper/home/HomeTodayInternMapper.kt new file mode 100644 index 000000000..762354301 --- /dev/null +++ b/data/src/main/java/com/terning/data/mapper/home/HomeTodayInternMapper.kt @@ -0,0 +1,17 @@ +package com.terning.data.mapper.home + +import com.terning.data.dto.response.HomeTodayInternResponseDto +import com.terning.domain.entity.home.HomeTodayIntern + +fun HomeTodayInternResponseDto.toHomeTodayInternList(): HomeTodayIntern = + HomeTodayIntern( + scrapId = this.scrapId, + internshipAnnouncementId = this.internshipAnnouncementId, + companyImage = this.companyImage, + title = this.title, + dDay = this.dDay, + deadline = this.deadline, + workingPeriod = this.workingPeriod, + startYearMonth = this.startYearMonth, + color = this.color, + ) \ No newline at end of file diff --git a/data/src/main/java/com/terning/data/repositoryimpl/HomeRepositoryImpl.kt b/data/src/main/java/com/terning/data/repositoryimpl/HomeRepositoryImpl.kt index 6e6e50fb0..25dc6cc11 100644 --- a/data/src/main/java/com/terning/data/repositoryimpl/HomeRepositoryImpl.kt +++ b/data/src/main/java/com/terning/data/repositoryimpl/HomeRepositoryImpl.kt @@ -2,20 +2,23 @@ package com.terning.data.repositoryimpl import com.terning.data.datasource.HomeDataSource import com.terning.data.dto.request.toChangeFilterRequestDto +import com.terning.data.mapper.home.toHomeFilteringInfo +import com.terning.data.mapper.home.toHomeRecommendInternList +import com.terning.data.mapper.home.toHomeTodayInternList +import com.terning.domain.entity.home.HomeFilteringInfo +import com.terning.domain.entity.home.HomeRecommendIntern +import com.terning.domain.entity.home.HomeTodayIntern import com.terning.domain.entity.request.ChangeFilteringRequestModel -import com.terning.domain.entity.response.HomeFilteringInfoModel -import com.terning.domain.entity.response.HomeRecommendInternModel -import com.terning.domain.entity.response.HomeTodayInternModel import com.terning.domain.repository.HomeRepository import javax.inject.Inject class HomeRepositoryImpl @Inject constructor( private val homeDataSource: HomeDataSource, ) : HomeRepository { - override suspend fun getHomeTodayInternList(): Result> = + override suspend fun getHomeTodayInternList(): Result> = runCatching { - homeDataSource.getTodayIntern().result.map { - it.toHomeTodayInternList() + homeDataSource.getTodayIntern().result.map { homeTodayInternResponseDto -> + homeTodayInternResponseDto.toHomeTodayInternList() } } @@ -23,20 +26,20 @@ class HomeRepositoryImpl @Inject constructor( sortBy: String, startYear: Int, startMonth: Int - ): Result> = + ): Result> = runCatching { homeDataSource.getRecommendIntern( sortBy = sortBy, startYear = startYear, startMonth = startMonth - ).result.map { - it.toRecommendInternEntity() + ).result.map { homeRecommendInternResponseDto -> + homeRecommendInternResponseDto.toHomeRecommendInternList() } } - override suspend fun getFilteringInfo(): Result = + override suspend fun getFilteringInfo(): Result = runCatching { - homeDataSource.getFilteringInfo().result.toHomeFilteringInfoModel() + homeDataSource.getFilteringInfo().result.toHomeFilteringInfo() } override suspend fun putFilteringInfo(putFilteringRequest: ChangeFilteringRequestModel): Result = diff --git a/domain/src/main/java/com/terning/domain/entity/response/HomeFilteringInfoModel.kt b/domain/src/main/java/com/terning/domain/entity/home/HomeFilteringInfo.kt similarity index 57% rename from domain/src/main/java/com/terning/domain/entity/response/HomeFilteringInfoModel.kt rename to domain/src/main/java/com/terning/domain/entity/home/HomeFilteringInfo.kt index b1c386044..657fce14d 100644 --- a/domain/src/main/java/com/terning/domain/entity/response/HomeFilteringInfoModel.kt +++ b/domain/src/main/java/com/terning/domain/entity/home/HomeFilteringInfo.kt @@ -1,6 +1,6 @@ -package com.terning.domain.entity.response +package com.terning.domain.entity.home -data class HomeFilteringInfoModel( +data class HomeFilteringInfo( val grade: Int?, val workingPeriod: Int?, val startYear: Int?, diff --git a/domain/src/main/java/com/terning/domain/entity/response/HomeRecommendInternModel.kt b/domain/src/main/java/com/terning/domain/entity/home/HomeRecommendIntern.kt similarity index 76% rename from domain/src/main/java/com/terning/domain/entity/response/HomeRecommendInternModel.kt rename to domain/src/main/java/com/terning/domain/entity/home/HomeRecommendIntern.kt index 5b1b23ce0..e8e4150d9 100644 --- a/domain/src/main/java/com/terning/domain/entity/response/HomeRecommendInternModel.kt +++ b/domain/src/main/java/com/terning/domain/entity/home/HomeRecommendIntern.kt @@ -1,6 +1,6 @@ -package com.terning.domain.entity.response +package com.terning.domain.entity.home -data class HomeRecommendInternModel( +data class HomeRecommendIntern( val scrapId: Long?, val internshipAnnouncementId: Long, val title: String, diff --git a/domain/src/main/java/com/terning/domain/entity/response/HomeTodayInternModel.kt b/domain/src/main/java/com/terning/domain/entity/home/HomeTodayIntern.kt similarity index 76% rename from domain/src/main/java/com/terning/domain/entity/response/HomeTodayInternModel.kt rename to domain/src/main/java/com/terning/domain/entity/home/HomeTodayIntern.kt index abd234bae..742773035 100644 --- a/domain/src/main/java/com/terning/domain/entity/response/HomeTodayInternModel.kt +++ b/domain/src/main/java/com/terning/domain/entity/home/HomeTodayIntern.kt @@ -1,6 +1,6 @@ -package com.terning.domain.entity.response +package com.terning.domain.entity.home -data class HomeTodayInternModel( +data class HomeTodayIntern( val scrapId: Long, val internshipAnnouncementId: Long, val companyImage: String, diff --git a/domain/src/main/java/com/terning/domain/repository/HomeRepository.kt b/domain/src/main/java/com/terning/domain/repository/HomeRepository.kt index ecead916b..c21daa27a 100644 --- a/domain/src/main/java/com/terning/domain/repository/HomeRepository.kt +++ b/domain/src/main/java/com/terning/domain/repository/HomeRepository.kt @@ -1,20 +1,20 @@ package com.terning.domain.repository +import com.terning.domain.entity.home.HomeFilteringInfo +import com.terning.domain.entity.home.HomeRecommendIntern +import com.terning.domain.entity.home.HomeTodayIntern import com.terning.domain.entity.request.ChangeFilteringRequestModel -import com.terning.domain.entity.response.HomeFilteringInfoModel -import com.terning.domain.entity.response.HomeRecommendInternModel -import com.terning.domain.entity.response.HomeTodayInternModel interface HomeRepository { - suspend fun getHomeTodayInternList(): Result> + suspend fun getHomeTodayInternList(): Result> suspend fun getRecommendIntern( sortBy: String, startYear: Int, startMonth: Int - ): Result> + ): Result> - suspend fun getFilteringInfo(): Result + suspend fun getFilteringInfo(): Result suspend fun putFilteringInfo( putFilteringRequest: ChangeFilteringRequestModel, diff --git a/feature/src/main/java/com/terning/feature/home/changefilter/ChangeFilterRoute.kt b/feature/src/main/java/com/terning/feature/home/changefilter/ChangeFilterRoute.kt index 2551651dd..649df5d59 100644 --- a/feature/src/main/java/com/terning/feature/home/changefilter/ChangeFilterRoute.kt +++ b/feature/src/main/java/com/terning/feature/home/changefilter/ChangeFilterRoute.kt @@ -26,8 +26,8 @@ import com.terning.core.designsystem.component.topappbar.BackButtonTopAppBar import com.terning.core.designsystem.theme.TerningTheme import com.terning.core.extension.toast import com.terning.core.state.UiState +import com.terning.domain.entity.home.HomeFilteringInfo import com.terning.domain.entity.request.ChangeFilteringRequestModel -import com.terning.domain.entity.response.HomeFilteringInfoModel import com.terning.feature.R import com.terning.feature.home.changefilter.component.ChangeFilteringRadioGroup import com.terning.feature.home.changefilter.component.FilteringMainTitleText @@ -35,7 +35,6 @@ import com.terning.feature.home.changefilter.component.FilteringSubTitleText import com.terning.feature.home.changefilter.navigation.navigateChangeFilter import com.terning.feature.home.home.HomeSideEffect import com.terning.feature.home.home.HomeViewModel -import com.terning.feature.home.home.navigation.navigateHome const val MIN_INDEX = 0 const val MAX_WORKING_INDEX = 2 @@ -53,7 +52,7 @@ fun ChangeFilterRoute( when (filteringState) { is UiState.Success -> ChangeFilterScreen( - (filteringState as UiState.Success).data, + (filteringState as UiState.Success).data, navController, viewModel, ) @@ -75,7 +74,7 @@ fun ChangeFilterRoute( @Composable fun ChangeFilterScreen( - filterData: HomeFilteringInfoModel, + filterData: HomeFilteringInfo, navController: NavController, viewModel: HomeViewModel, ) { diff --git a/feature/src/main/java/com/terning/feature/home/home/HomeRoute.kt b/feature/src/main/java/com/terning/feature/home/home/HomeRoute.kt index 15d0c463a..732f51cb5 100644 --- a/feature/src/main/java/com/terning/feature/home/home/HomeRoute.kt +++ b/feature/src/main/java/com/terning/feature/home/home/HomeRoute.kt @@ -56,9 +56,9 @@ import com.terning.core.designsystem.theme.White import com.terning.core.extension.noRippleClickable import com.terning.core.extension.toast import com.terning.core.state.UiState -import com.terning.domain.entity.response.HomeFilteringInfoModel -import com.terning.domain.entity.response.HomeRecommendInternModel -import com.terning.domain.entity.response.HomeTodayInternModel +import com.terning.domain.entity.home.HomeFilteringInfo +import com.terning.domain.entity.home.HomeRecommendIntern +import com.terning.domain.entity.home.HomeTodayIntern import com.terning.feature.R import com.terning.feature.home.changefilter.navigation.navigateChangeFilter import com.terning.feature.home.home.component.HomeFilteringEmptyIntern @@ -102,7 +102,7 @@ fun HomeRoute( val homeUserState by viewModel.homeUserState.collectAsStateWithLifecycle() val homeDialogState by viewModel.homeDialogState.collectAsStateWithLifecycle() - val homeTodayInternList: MutableState> = remember { + val homeTodayInternList: MutableState> = remember { mutableStateOf(emptyList()) } @@ -120,7 +120,7 @@ fun HomeRoute( LaunchedEffect(homeFilteringState, currentSortBy.value) { when (homeFilteringState) { is UiState.Success -> - with((homeFilteringState as UiState.Success).data) { + with((homeFilteringState as UiState.Success).data) { viewModel.getRecommendInternsData( currentSortBy.value, startYear ?: viewModel.currentYear, @@ -143,7 +143,7 @@ fun HomeRoute( when (homeTodayState) { is UiState.Success -> { homeTodayInternList.value = - (homeTodayState as UiState.Success>).data + (homeTodayState as UiState.Success>).data } is UiState.Loading -> {} @@ -154,15 +154,15 @@ fun HomeRoute( val homeRecommendInternList = when (homeRecommendInternState) { is UiState.Success -> { - (homeRecommendInternState as UiState.Success>).data + (homeRecommendInternState as UiState.Success>).data } else -> emptyList() } val homeFilteringInfo = when (homeFilteringState) { - is UiState.Success -> (homeFilteringState as UiState.Success).data - else -> HomeFilteringInfoModel(null, null, viewModel.currentYear, viewModel.currentMonth) + is UiState.Success -> (homeFilteringState as UiState.Success).data + else -> HomeFilteringInfo(null, null, viewModel.currentYear, viewModel.currentMonth) } val homeUserName = when (homeUserState) { @@ -187,9 +187,9 @@ fun HomeRoute( fun HomeScreen( currentSortBy: MutableState, homeUserName: String, - homeFilteringInfo: HomeFilteringInfoModel, - homeTodayInternList: List, - recommendInternList: List, + homeFilteringInfo: HomeFilteringInfo, + homeTodayInternList: List, + recommendInternList: List, homeDialogState: HomeDialogState, onChangeFilterClick: () -> Unit, viewModel: HomeViewModel = hiltViewModel(), @@ -372,7 +372,7 @@ fun HomeScreen( viewModel.updateScrapped(false) } }, - homeRecommendInternModel = this, + homeRecommendIntern = this, ) } } @@ -385,7 +385,7 @@ fun HomeScreen( @Composable private fun RecommendInternItem( navController: NavHostController, - intern: HomeRecommendInternModel, + intern: HomeRecommendIntern, onScrapButtonClicked: (Long) -> Unit, ) { InternItemWithShadow( @@ -425,7 +425,7 @@ private fun ShowMainTitleWithName(userName: String) { @Composable private fun ShowTodayIntern( - homeTodayInternList: List, + homeTodayInternList: List, homeDialogState: HomeDialogState, navigateToDetail: (Long) -> Unit, ) { @@ -463,7 +463,7 @@ private fun ShowRecommendTitle() { @Composable private fun ShowInternFilter( - homeFilteringInfo: HomeFilteringInfoModel, + homeFilteringInfo: HomeFilteringInfo, onChangeFilterClick: () -> Unit, ) { if (homeFilteringInfo.grade == null) { diff --git a/feature/src/main/java/com/terning/feature/home/home/HomeViewModel.kt b/feature/src/main/java/com/terning/feature/home/home/HomeViewModel.kt index 5e56342f3..5cca99d71 100644 --- a/feature/src/main/java/com/terning/feature/home/home/HomeViewModel.kt +++ b/feature/src/main/java/com/terning/feature/home/home/HomeViewModel.kt @@ -5,11 +5,11 @@ import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope import com.terning.core.designsystem.theme.CalRed import com.terning.core.state.UiState -import com.terning.domain.entity.request.ChangeFilteringRequestModel import com.terning.domain.entity.CalendarScrapRequest -import com.terning.domain.entity.response.HomeFilteringInfoModel -import com.terning.domain.entity.response.HomeRecommendInternModel -import com.terning.domain.entity.response.HomeTodayInternModel +import com.terning.domain.entity.home.HomeFilteringInfo +import com.terning.domain.entity.home.HomeRecommendIntern +import com.terning.domain.entity.home.HomeTodayIntern +import com.terning.domain.entity.request.ChangeFilteringRequestModel import com.terning.domain.repository.HomeRepository import com.terning.domain.repository.MyPageRepository import com.terning.domain.repository.ScrapRepository @@ -39,15 +39,15 @@ class HomeViewModel @Inject constructor( val homeSideEffect get() = _homeSideEffect.asSharedFlow() private val _homeTodayState = - MutableStateFlow>>(UiState.Loading) + MutableStateFlow>>(UiState.Loading) val homeTodayState get() = _homeTodayState.asStateFlow() private val _homeRecommendInternState = - MutableStateFlow>>(UiState.Loading) + MutableStateFlow>>(UiState.Loading) val homeRecommendInternState get() = _homeRecommendInternState.asStateFlow() private val _homeFilteringState = - MutableStateFlow>(UiState.Loading) + MutableStateFlow>(UiState.Loading) val homeFilteringState get() = _homeFilteringState.asStateFlow() private val _homeSortByState = MutableStateFlow(0) diff --git a/feature/src/main/java/com/terning/feature/home/home/component/HomeRecommendInternDialog.kt b/feature/src/main/java/com/terning/feature/home/home/component/HomeRecommendInternDialog.kt index 9738753e9..776cf9081 100644 --- a/feature/src/main/java/com/terning/feature/home/home/component/HomeRecommendInternDialog.kt +++ b/feature/src/main/java/com/terning/feature/home/home/component/HomeRecommendInternDialog.kt @@ -44,7 +44,7 @@ import com.terning.core.designsystem.theme.TerningMain import com.terning.core.designsystem.theme.TerningTheme import com.terning.core.designsystem.theme.White import com.terning.core.extension.noRippleClickable -import com.terning.domain.entity.response.HomeRecommendInternModel +import com.terning.domain.entity.home.HomeRecommendIntern import com.terning.feature.home.home.HomeViewModel import com.terning.feature.intern.component.InternInfoRow @@ -54,7 +54,7 @@ fun HomeRecommendInternDialog( internInfoList: List>, clickAction: () -> Unit, onColorSelected:(Color) -> Unit = {}, - homeRecommendInternModel: HomeRecommendInternModel, + homeRecommendIntern: HomeRecommendIntern, viewModel: HomeViewModel = hiltViewModel(), ) { val state by viewModel.homeDialogState.collectAsStateWithLifecycle() @@ -73,7 +73,7 @@ fun HomeRecommendInternDialog( ) { AsyncImage( model = ImageRequest.Builder(LocalContext.current) - .data(homeRecommendInternModel.companyImage) + .data(homeRecommendIntern.companyImage) .build(), contentDescription = stringResource(R.string.image_content_descriptin), modifier = Modifier @@ -89,7 +89,7 @@ fun HomeRecommendInternDialog( ) Text( - text = homeRecommendInternModel.title, + text = homeRecommendIntern.title, textAlign = TextAlign.Center, style = TerningTheme.typography.title4, color = Grey500, @@ -179,7 +179,7 @@ fun HomeRecommendInternDialog( } } else { Text( - text = homeRecommendInternModel.dDay, + text = homeRecommendIntern.dDay, style = TerningTheme.typography.body5, color = TerningMain, modifier = Modifier.padding(bottom = 9.dp) diff --git a/feature/src/main/java/com/terning/feature/home/home/component/HomeTodayIntern.kt b/feature/src/main/java/com/terning/feature/home/home/component/HomeTodayIntern.kt index 83b14f432..0e0e2cc6f 100644 --- a/feature/src/main/java/com/terning/feature/home/home/component/HomeTodayIntern.kt +++ b/feature/src/main/java/com/terning/feature/home/home/component/HomeTodayIntern.kt @@ -16,14 +16,14 @@ import androidx.compose.ui.unit.dp import androidx.hilt.navigation.compose.hiltViewModel import com.terning.core.designsystem.component.dialog.TerningBasicDialog import com.terning.core.extension.noRippleClickable -import com.terning.domain.entity.response.HomeTodayInternModel +import com.terning.domain.entity.home.HomeTodayIntern import com.terning.feature.R import com.terning.feature.home.home.HomeViewModel import com.terning.feature.home.home.model.HomeDialogState @Composable fun HomeTodayIntern( - internList: List, + internList: List, homeDialogState: HomeDialogState, navigateToDetail: (Long) -> Unit, homeViewModel: HomeViewModel = hiltViewModel() @@ -76,7 +76,7 @@ fun HomeTodayIntern( navigateToDetail(internshipAnnouncementId) homeViewModel.updateScrapDialogVisible(false) }, - homeTodayInternModel = internList[selectedIndex], + homeTodayIntern = internList[selectedIndex], ) } }, diff --git a/feature/src/main/java/com/terning/feature/home/home/component/HomeTodayInternDialog.kt b/feature/src/main/java/com/terning/feature/home/home/component/HomeTodayInternDialog.kt index 44b0e29d5..cb6808de1 100644 --- a/feature/src/main/java/com/terning/feature/home/home/component/HomeTodayInternDialog.kt +++ b/feature/src/main/java/com/terning/feature/home/home/component/HomeTodayInternDialog.kt @@ -7,7 +7,6 @@ import androidx.compose.foundation.layout.Box 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 @@ -54,7 +53,7 @@ import com.terning.core.designsystem.theme.TerningMain import com.terning.core.designsystem.theme.TerningTheme import com.terning.core.designsystem.theme.White import com.terning.core.extension.noRippleClickable -import com.terning.domain.entity.response.HomeTodayInternModel +import com.terning.domain.entity.home.HomeTodayIntern import com.terning.feature.home.home.HomeViewModel import com.terning.feature.intern.component.InternInfoRow @@ -63,7 +62,7 @@ import com.terning.feature.intern.component.InternInfoRow fun HomeTodayInternDialog( internInfoList: List>, navigateTo: () -> Unit, - homeTodayInternModel: HomeTodayInternModel, + homeTodayIntern: HomeTodayIntern, viewModel: HomeViewModel = hiltViewModel(), ) { val state by viewModel.homeDialogState.collectAsStateWithLifecycle() @@ -88,7 +87,7 @@ fun HomeTodayInternDialog( ) { AsyncImage( model = ImageRequest.Builder(LocalContext.current) - .data(homeTodayInternModel.companyImage) + .data(homeTodayIntern.companyImage) .build(), contentDescription = stringResource(R.string.image_content_descriptin), modifier = Modifier @@ -104,7 +103,7 @@ fun HomeTodayInternDialog( ) Text( - text = homeTodayInternModel.title, + text = homeTodayIntern.title, textAlign = TextAlign.Center, style = TerningTheme.typography.title4, color = Grey500, @@ -185,7 +184,7 @@ fun HomeTodayInternDialog( contentAlignment = Alignment.Center ) { ColorPalette( - initialColor = Color(android.graphics.Color.parseColor(homeTodayInternModel.color)), + initialColor = Color(android.graphics.Color.parseColor(homeTodayIntern.color)), onColorSelected = { newColor -> viewModel.updateSelectColor(newColor) } @@ -193,7 +192,7 @@ fun HomeTodayInternDialog( } } else { Text( - text = homeTodayInternModel.dDay, + text = homeTodayIntern.dDay, style = TerningTheme.typography.body5, color = TerningMain, modifier = Modifier.padding(bottom = 9.dp) @@ -228,14 +227,14 @@ fun HomeTodayInternDialog( viewModel.updatePaletteOpen(false) viewModel.updateColorChange(false) viewModel.patchScrap( - scrapId = homeTodayInternModel.scrapId, + scrapId = homeTodayIntern.scrapId, colorIndex = selectedColorIndex, ) } else { if (state.isColorChange) { viewModel.updateColorChange(false) viewModel.patchScrap( - scrapId = homeTodayInternModel.scrapId, + scrapId = homeTodayIntern.scrapId, colorIndex = selectedColorIndex, ) } diff --git a/feature/src/main/java/com/terning/feature/search/searchprocess/SearchProcessRoute.kt b/feature/src/main/java/com/terning/feature/search/searchprocess/SearchProcessRoute.kt index cd804faa6..9d6e7f446 100644 --- a/feature/src/main/java/com/terning/feature/search/searchprocess/SearchProcessRoute.kt +++ b/feature/src/main/java/com/terning/feature/search/searchprocess/SearchProcessRoute.kt @@ -1,6 +1,5 @@ package com.terning.feature.search.searchprocess -import android.util.Log import androidx.compose.foundation.Image import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column @@ -62,7 +61,7 @@ import com.terning.core.designsystem.theme.TerningTheme import com.terning.core.extension.addFocusCleaner import com.terning.core.extension.noRippleClickable import com.terning.core.extension.toast -import com.terning.domain.entity.response.HomeRecommendInternModel +import com.terning.domain.entity.home.HomeRecommendIntern import com.terning.feature.R import com.terning.feature.home.home.component.HomeRecommendInternDialog import com.terning.feature.intern.navigation.navigateIntern @@ -361,7 +360,7 @@ fun SearchProcessScreen( onColorSelected = { newColor -> viewModel.updateSelectColor(newColor) }, - homeRecommendInternModel = HomeRecommendInternModel( + homeRecommendIntern = HomeRecommendIntern( scrapId = scrapId, internshipAnnouncementId = internshipAnnouncementId, companyImage = companyImage,