Skip to content

Commit

Permalink
[chore] #206 total cost 0원 일때 무지출
Browse files Browse the repository at this point in the history
  • Loading branch information
t1nm1ksun committed Aug 28, 2024
1 parent 7c2459a commit b6cfaaa
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,10 @@ package org.sopt.dateroad.data.mapper.toEntity
import java.text.NumberFormat
import java.util.Locale
import org.sopt.dateroad.data.dataremote.util.Cost
import org.sopt.dateroad.presentation.util.TotalCostZero.ZEROCOST

fun Int.toCost(): String = "${NumberFormat.getNumberInstance(Locale.KOREA).format(this)}${Cost.COST}"
fun Int.toCost(): String = if (this == 0) {
ZEROCOST
} else {
"${NumberFormat.getNumberInstance(Locale.KOREA).format(this)}${Cost.COST}"
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ object TimePicker {
const val PM = "오후"
}

object TotalCostZero {
const val ZEROCOST = "무지출"
}

object DatePicker {
const val DATE_PATTERN = "yyyy.MM.dd"
}
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@
<string name="course_detail_bottom_sheet_confirm">글 삭제</string>
<string name="course_detail_bottom_sheet_delete">닫기</string>
<string name="course_detail_bottom_sheet_report">신고하기</string>
<string name="course_detail_total_cost_zero">무지출</string>

<!-- DateSchedule -->
<string name="home_timeline_is_not">다가오는 데이트 일정이 없어요</string>
Expand Down

0 comments on commit b6cfaaa

Please sign in to comment.