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

feat: 현재 출석 상태 조회 기능 구현 #29

Merged
merged 3 commits into from
May 16, 2024
Merged

Conversation

ddingmin
Copy link
Member

💡 기능

  • 현재 출석 상태 조회에 대한 기능 구현
    • 아래 이미지에 해당하는 플로팅, 팝업창을 띄우기 위한 상태값 반환입니다.
    • 프론트단에서 1분단위 폴링 예정입니다.
    @Schema(name = "generation", description = "기수")
    val generation: Int,

    @Schema(name = "week", description = "주차")
    val week: Int,

    @Schema(name = "isBeforeSession15minutes", description = "팝업 메시지를 띄울지 여부 (세션 시작 15분 전 ~ 세션 시작 시간 사이인 경우)")
    val isBeforeSession15minutes: Boolean,

    @Schema(name = "needFloatingButton", description = "플로팅 버튼 노출 여부 (현재 시간이 출석 요청 가능 시간 && 멤버의 출석 상태가 ATTENDANCE_ON_HOLD 인 경우)")
    val needFloatingButton: Boolean,

    @Schema(name = "expectAttendanceStatus", description = "출석 시 예상하는 상태")
    val expectAttendanceStatus: AttendanceStatus,
image image

🔎 기타

  • 한 주차에 여러 세션이 존재할 경우 방어로직 추가했습니다.

Close #28

@ddingmin ddingmin requested a review from CChuYong as a code owner May 16, 2024 12:29
Copy link

Auto labels applied based on the title of the PR.


val monday = input.now.getMonday()
val thisWeekSession = sessionGateway.findByStartTimeBetween(
monday,
Copy link
Member

Choose a reason for hiding this comment

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

이거 당일이 아니라 그 주 range로 찾는 이유가 따로 있나용?

Copy link
Member Author

Choose a reason for hiding this comment

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

원래 있던 로직 가져온거긴한데 당일 아니면 시간체크 다르게 먹어서 크게 상관없을것 같긴 합니다!

}

private fun LocalDateTime.getMonday(): LocalDateTime {
val dayOfWeek = this.dayOfWeek
Copy link
Member

Choose a reason for hiding this comment

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

요거 LocalDate#withDayOfWeek(MONDAY) 형태로도 꺼낼 수 있었던거같아요

Copy link
Member

@CChuYong CChuYong left a comment

Choose a reason for hiding this comment

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

수고하셨습니다!

@ddingmin ddingmin merged commit 4e1656f into develop May 16, 2024
@ddingmin ddingmin deleted the feature/#29 branch May 16, 2024 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: 현재 출석 상태 조회 기능 구현
2 participants