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-210] 트레이너 마이페이지, 홈 캘린더 화면 작성 #54

Merged
merged 5 commits into from
Feb 4, 2025

Conversation

syss220211
Copy link
Member

@syss220211 syss220211 commented Feb 3, 2025

📌 What is the PR?

  • 트레이너 마이페이지 화면 작성
  • 트레이너 홈 화면 작성

🪄 Changes

  • 트레이너 마이페이지 화면을 작성하였습니다.
  • 트레이너 홈 화면을 작성하였습니다.
  • 트레이너 관련 usecase, dto 추가하였습니다.

📸 Screenshot

기능 스크린샷
IMG
IMG
IMG
IMG

🙆🏻 To Reviewers

  • �팝업 사용법이 제가 이해한대로 작성했는데 맞는지 확인 부탁드립니다!
  • 탭바는 아직 추가하지 못했습니다. 참고해서 사진 확인해주세요!
  • 디자인 시스템의 IcnPlus? 색상이 어두운 버전이어서 해당 뷰에서 svg로 다운받아서 사용했는데.. 음.. 투명하게 뽑아지더라구요. 해당 부분 디자이너분께 디자인 시스템에 추가 요청해야하는지 아니면 제가 잘못 뽑은건지.. 싶긴합니다.

💭 Related Issues

@syss220211 syss220211 self-assigned this Feb 3, 2025
@syss220211 syss220211 requested a review from FpRaArNkK February 3, 2025 17:26
@syss220211 syss220211 changed the title [Feat] 트레이너 마이페이지 화면 작성 [Feat] 트레이너 마이페이지, 홈 캘린더 화면 작성 Feb 4, 2025
Copy link
Contributor

@FpRaArNkK FpRaArNkK left a comment

Choose a reason for hiding this comment

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

고생 많으셨습니다!
트랜지션 막는 아이디어 가지고 계속 고민했었는데, 깔끔하게 해결하셨네요 굳ㄱㄷㄱ둑ㄷ
저 플러스 아이콘의 경우 저는 기존의 플러스 아이콘 template으로 따서 틴트 컬러만 바꿔줬어요!

Image(.icnPlus)
    .renderingMode(.template)
    .resizable()
    .tint(Color.common0)
                    ...

Comment on lines 72 to +79
case .getVerifyInvitationCode:
return ["Content-Type": "application/json"]
case .getFirstInvitationCode:
return nil
case .getDateLessionList:
return ["Content-Type": "application/json"]
case .getReissuanceInvitationCode:
return ["Content-Type": "application/json"]
Copy link
Contributor

Choose a reason for hiding this comment

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

참고용으로 올려드립니다! 아래와 같이 작성하면 조금? 더 편합니다 갠취인것 같아요.

case .getVerifyInvitationCode, .getDateLessionList, .getReissuanceInvitationCode:
    return ["Content-Type": "application/json"]

Comment on lines +73 to +75
public struct SessonEntity: Equatable, Encodable {
public let id = UUID().uuidString
public let ptLessonId: String
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
Member Author

Choose a reason for hiding this comment

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

Foreach에서 id값을 활용하기 위해서입니다!

@ViewBuilder
    private func RecordList() -> some View {
        VStack {
            if let record = store.tappedsessionInfo {
                ForEach(record.lessons, id: \.id) { record in
                    SessionCellView(session: record) {
                        send(.tapSessionCompleted(id: record.ptLessonId))
                    }
                }
            } else {
                RecordEmptyView()
            }
        }
        .padding(.horizontal, 20)
    }

Copy link
Contributor

@FpRaArNkK FpRaArNkK Feb 4, 2025

Choose a reason for hiding this comment

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

아하 그런거라면 API에서 ResponseDTO -> SessionEntity로 Mapping할 때
DTO에서 받아오는 id를 entity로 가져올 수 있게
init에 추가해주시면 좋을 것 같아요! 기본값은 UUID 넣어주는 방향으로요.

Copy link
Member Author

Choose a reason for hiding this comment

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

😮 그렇네요. 수정해서 반영하고 머지하겠습니다!


}

/// 수업 리스트 상단 타이틀
Copy link
Contributor

Choose a reason for hiding this comment

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

섹션마다 설명 주석이 있으니 훨씬 좋은데요? 👍👍

Comment on lines +139 to +149
state.view_isPopUpPresented = false
state.view_popUp = .logoutCompleted
state.view_isPopUpPresented = true

case .logoutCompleted:
state.view_isPopUpPresented = false

case .withdraw:
state.view_isPopUpPresented = false
state.view_popUp = .withdrawCompleted
state.view_isPopUpPresented = true
Copy link
Contributor

Choose a reason for hiding this comment

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

아 컨텐츠 트랜지션을 막으려면 걍 꺼버리고 다시 키면 됐었네요..!
아 좋습니다 🔥🔥

@syss220211 syss220211 added the ✨Feat 새로운 기능 구현 (새로운 로직 추가, UI 구현 등) label Feb 4, 2025
@syss220211 syss220211 merged commit e21c38f into develop Feb 4, 2025
@FpRaArNkK FpRaArNkK changed the title [Feat] 트레이너 마이페이지, 홈 캘린더 화면 작성 [TNT-210] 트레이너 마이페이지, 홈 캘린더 화면 작성 Feb 5, 2025
@FpRaArNkK FpRaArNkK deleted the TNT-210-TrainerHome branch February 12, 2025 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨Feat 새로운 기능 구현 (새로운 로직 추가, UI 구현 등)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[TNT-209] 트레이너 마이페이지 작성
2 participants