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

[TNT-181] 트레이니 홈 화면 일별 기록 UI 구현 #71

Merged
merged 19 commits into from
Feb 9, 2025

Conversation

SeonJeongk
Copy link
Contributor

📝 작업 내용

📸 실행 화면

TraineeHomeDaily.mp4

🙆🏻 리뷰 요청 사항

없습니다아

👀 레퍼런스

@SeonJeongk SeonJeongk added ✨ Feat 기능 구현 🎨 Design UI 및 디자인 작업 🌻 선정 김씨 집안 막내 김선정 labels Feb 8, 2025
@SeonJeongk SeonJeongk added this to the 3차 스프린트 milestone Feb 8, 2025
@SeonJeongk SeonJeongk self-assigned this Feb 8, 2025
@github-actions github-actions bot requested a review from hoyahozz February 8, 2025 17:46
)
}
}
if (state.recordList.isNullOrEmpty()) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nullempty 가 같은 의미인지 한 번 더 생각해보면 좋을 것 같습니다 ~!

val markedDates: List<LocalDate> = emptyList(),
val recordList: List<RecordList> = emptyList(),
val selectedDay: LocalDate = LocalDate.now(),
val dailyDataState: List<LocalDate> = emptyList(),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

요 상태가 어떤 역할을 하는지 이해하지 못했어요 ㅜ

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

selectedDay는 현재 달력에서 선택된 날짜이고,
dailyDataState는 달력에 PT 수업 혹은 기록이 있으면 icon을 표시하기 위해 해당하는 날짜들을 담고있습니다..!

Comment on lines 307 to 330
// 시간을 "오후 14:00"의 형식으로 바꿔준다
@Composable
private fun formatTime(isoString: String): String {
val timePart = isoString.substringAfter('T').substring(0, 5)
val hour = timePart.substring(0, 2).toInt()

val amPm = if (hour < 12) {
stringResource(uiResource.string.morning)
} else {
stringResource(uiResource.string.afternoon)
}

return "$amPm $timePart"
}

// 선택된 날짜를 "0월 0일 0요일"의 형식으로 바꿔준다
private fun formatDateWithDay(date: LocalDate): String {
val monthDayFormatter = DateTimeFormatter.ofPattern("M월 d일", Locale.KOREAN)
val monthDay = date.format(monthDayFormatter)

val dayOfWeek = date.dayOfWeek.getDisplayName(TextStyle.FULL, Locale.KOREAN)

return "$monthDay $dayOfWeek"
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

지금도 DateFormatter 를 사용할 수 있을 것처럼 보이는데, 혹시 API 연결 후에 사용해야 하는 이유가 있을까용 ?.?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TNT-179 branch 머지되면 해당 코드 기반으로 구현하려고 했습니다!!
언제 머지될지 모르겠어서 일단 뒤로 미뤘습니다..ㅎ

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아항 머지해두었습니다!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

그렇담 수정해오겠습니다 🏃

@SeonJeongk SeonJeongk requested a review from hoyahozz February 9, 2025 04:48
Copy link
Member

@hoyahozz hoyahozz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니당 ~~~~!!! 👍👍👍

@SeonJeongk SeonJeongk merged commit af280d6 into develop Feb 9, 2025
4 checks passed
@SeonJeongk SeonJeongk deleted the feature/TNT-181 branch February 9, 2025 06:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Feat 기능 구현 🌻 선정 김씨 집안 막내 김선정 🎨 Design UI 및 디자인 작업
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants