Skip to content

Commit

Permalink
FEAT: 프로필 설정 파트 선택 구현 (#104)
Browse files Browse the repository at this point in the history
  • Loading branch information
arinming committed Feb 9, 2024
1 parent 1cb9ca5 commit 629d65d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ package com.kusitms.presentation.model.profile.edit

data class ProfileEditUiState(
val currentSelectedProfileFilter: String = "기본 프로필",
val currentSelectedPart: String = "",
)
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class ProfileEditViewModel @Inject constructor(


fun updateSelectedPart(part: String) {
_selectedPart.value = part
_selectedPart.value = mapPartToKorean(part)
validateFields()
}

Expand Down Expand Up @@ -207,11 +207,19 @@ class ProfileEditViewModel @Inject constructor(
if (profileResult.isSuccess) {
_detailMemberInfo = profileResult.getOrNull()!!
_major.value = _detailMemberInfo.major.toString()
_selectedPart.value = mapPartToKorean(_detailMemberInfo.part.toString())

detailMemberInfo = _detailMemberInfo
}
}
}



private fun mapPartToKorean(part: String): String {
return when (part) {
"PLANNING" -> "기획"
"DESIGN" -> "디자인"
"DEVELOPMENT" -> "개발"
else -> part
}
}
}

0 comments on commit 629d65d

Please sign in to comment.