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] 방문 인원 모달 api 연동 #25

Merged
merged 13 commits into from
Dec 1, 2023

Conversation

jihyunniiii
Copy link
Contributor

@jihyunniiii jihyunniiii commented Nov 29, 2023

Related issue 🛠

Work Description ✏️

  • 방문 인원 모달의 api를 연동했습니다.
  • 방문 인원 모달의 api response 값을 바탕으로 대기 신청 완료 팝업을 보여주는 기능을 구현했습니다.
  • 방문 인원 모달의 최대 값 제한을 걸어주었습니다.
  • 대기 신청 완료 팝업에 BindingDialogFragment를 적용하였고, 뷰를 조금 수정하였습니다.

Screenshot 📸

Screen_recording_20231130_032148.mp4

Uncompleted Tasks 😅

  • N/A

To Reviewers 📢

칭찬해주면 안 졸고 열심히 할 수 있을 것 가타,,,
칭찬해조,, 나 너무 졸려 z.z

Copy link
Contributor

@HAJIEUN02 HAJIEUN02 left a comment

Choose a reason for hiding this comment

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

새벽까지ㅜㅜ 너무너무 고생많았습니당 많이 가르쳐줘서 고마와~~🧡

@SerialName("order_status")
val orderStatus: String
) {
fun toReserve() = Reserve(
Copy link
Contributor

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.

클린 아키텍처를 적용하기 위해 구현한 매퍼입니당!!
data 계층에 있는 data class를 domain 계층의 data class로 바꿔주어요

suspend fun postReserve(
shopId: Long,
personCount: Int
): Result<Reserve?>
Copy link
Contributor

Choose a reason for hiding this comment

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

Reserve뒤에 ?는 null 처리 때문인가용?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

넹 맞습니당
BaseResponse를 사용하였는데 BaseResponse의 data 값이 null이 될 수 있어서 저렇게 선언했어용

}

private fun collectData() {
reserveViewModel.personCount.flowWithLifecycle(viewLifecycleOwner.lifecycle)
Copy link
Contributor

Choose a reason for hiding this comment

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

이것이 flow군용.... 어려버라

Copy link
Contributor Author

Choose a reason for hiding this comment

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

키킼 라이브 데이터 마스터하구 플로우 공부해보세영

binding.ivReservePlus.load(
when (reserveViewModel.personCount.value) {
PERSON_LAST_VALUE.toString() -> R.drawable.ic_plus_gray_100_24
else -> R.drawable.ic_plus_black_24
Copy link
Contributor

Choose a reason for hiding this comment

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

이런 식으로 drawable 교체해주는 방법 좋은 것 같숨다.. 이번 학교 프젝에서 쓸 일이 많아서 참고하겠슴당 헤헤

Copy link
Contributor Author

Choose a reason for hiding this comment

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

when문을 적절히 잘 쓰면 가독성이 조아지는 것 가타요

android:text="@string/tv_waiting_number"
android:textAppearance="@style/TextAppearance.H0"
android:textColor="@color/white"
app:layout_constraintBottom_toBottomOf="@+id/tv_waiting_number_text"
Copy link
Contributor

Choose a reason for hiding this comment

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

우하하 @+id 발견 자동완성 금지~~~~~

Copy link
Contributor Author

Choose a reason for hiding this comment

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

넵 ㅠ

@jihyunniiii jihyunniiii merged commit 31b6360 into develop Dec 1, 2023
1 check failed
@jihyunniiii jihyunniiii deleted the feat-reserve-api-connection branch December 1, 2023 07:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[feat] 방문 인원 모달 api 연동
2 participants