Skip to content

[Feature] 정산 상세 내역 화면 구현 및 정산 계산 로직 고도화 #51

Merged
Peter1119 merged 11 commits intomainfrom
feature/settlement_detail_view
Dec 11, 2025
Merged

[Feature] 정산 상세 내역 화면 구현 및 정산 계산 로직 고도화 #51
Peter1119 merged 11 commits intomainfrom
feature/settlement_detail_view

Conversation

@Peter1119
Copy link
Contributor

🔗 관련 이슈

  • 관련 이슈: #

✨ 작업 내용

  • SettlementDetailFeature 모듈 구현: 멤버별 정산 상세 내역을 확인할 수 있는 새로운 Feature와 화면을 구현했습니다.
  • 정산 계산 로직 고도화: CalculateSettlementUseCase를 확장하여 단순히 총액만 계산하는 것이 아니라, 각 멤버가 '어떤 지출에 참여하여 얼마를 부담해야 하는지' 상세 내역(ExpenseDetail)까지 산출하도록 변경했습니다.
  • UI 컴포넌트 구현:
    • MemberDetailCard: 멤버별 요약 정보를 보여주는 카드
    • ExpenseBreakdownSection: 지출 내역 및 부담 내역을 펼쳐서 볼 수 있는 Expandable List
  • 화면 전환 연결: 정산 결과 화면(SettlementResultView)에서 상세 화면으로 이동하는 네비게이션을 연결했습니다.
  • UX 개선: ExpenseListView에 항목 추가/삭제 시 부드러운 애니메이션(transition, spring)을 적용했습니다.

📸 Showcase

변경 전 변경 후
- (정산 상세 화면 스크린샷 / 리스트 애니메이션 GIF)
image

📌 정산 결과 화면에서 '상세 보기' 진입 시 멤버별 카드가 나오고, 카드를 탭하면 상세 내역이 펼쳐집니다.


📝 참고 사항

  • 데이터 구조 변경: 기존에는 단순 Double 값이었던 정산 결과를 MemberSettlementDetail 구조체로 확장하여, 결제 내역(Paid)과 분담 내역(Shared)을 모두 들고 있도록 했습니다.
  • 애니메이션: 지출 내역화면(ExpenseListView)에서 아이템이 추가될 때 스케일과 투명도가 함께 변하는 애니메이션을 적용해 자연스러움을 더했습니다.

Motivation 🥳 (코드를 추가/변경하게 된 이유)

  • 사용자가 "내가 왜 이 금액을 내야 하지?"라는 의문을 가질 때, 구체적인 계산 근거(참여한 지출 내역)를 보여주기 위함입니다.
  • 정산 결과의 투명성을 높이고 앱의 신뢰도를 향상시키기 위해 상세 화면을 기획했습니다.

Key Changes 🔥 (주요 구현/변경 사항)

  • Features/SettlementDetail/...: 신규 모듈 및 View, Reducer 구현
  • Domain/Sources/UseCase/Settlement/CalculateSettlementUseCase.swift: 상세 정산 계산 알고리즘 추가
  • Features/ExpenseList/Sources/ExpenseListView.swift: .transition, .animation 추가

To Reviewers 🙏 (리뷰어에게 전달하고 싶은 말)

  • 상세 계산 로직에서 1/N 처리 시 소수점 처리가 적절한지 확인 부탁드립니다.
  • Expandable Card UI의 인터랙션이 자연스러운지 봐주시면 감사하겠습니다.

Reference 🔗

Close Issues 🔒 (닫을 Issue)

Close #No.

Checklist

  • 브랜치를 가져와 작업한 경우 이전 브랜치에 PR을 보냈는지 확인
  • 빌드를 위해 SceneDelegate 수정한 것 PR로 올리지 않았는지 확인
  • 필요없는 주석, 프린트문 제거했는지 확인
  • 컨벤션 지켰는지 확인
  • final, private 제대로 넣었는지 확인
  • 다양한 디바이스에 레이아웃이 대응되는지 확인
    • iPhone SE
    • iPhone 13
    • iPhone 13 Pro Max

@Peter1119 Peter1119 self-assigned this Dec 11, 2025
@Peter1119 Peter1119 added ⚒️ 테스트 테스트 코드 작성 ✨ 기능추가 새로운 기능 추가 labels Dec 11, 2025
Copy link
Contributor

@Roy-wonji Roy-wonji left a comment

Choose a reason for hiding this comment

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

@Peter1119 수고 하셨습니다 로직이 복잡했을텐데 ..

}
}
}
.padding(16)
Copy link
Contributor

Choose a reason for hiding this comment

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

@Peter1119 scroll indicator 없애는 건 어떨까요 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

오 좋은 것 같습니다.

}
}

private func formatDate(_ date: Date) -> String {
Copy link
Contributor

Choose a reason for hiding this comment

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

@Peter1119 이것도 분리 할수 있지 않을까요 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

넵 ~!

Copy link
Contributor

@minneee minneee left a comment

Choose a reason for hiding this comment

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

수고하셨습니다

@Peter1119 Peter1119 merged commit 4488b52 into main Dec 11, 2025
@Peter1119 Peter1119 deleted the feature/settlement_detail_view branch December 11, 2025 05:56
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.

3 participants