Skip to content

Conversation

@thxx132
Copy link
Contributor

@thxx132 thxx132 commented Aug 12, 2025

It closes #628

@thxx132 thxx132 self-assigned this Aug 12, 2025
@thxx132 thxx132 linked an issue Aug 12, 2025 that may be closed by this pull request
@kmc7468 kmc7468 requested review from Mun09, Copilot and kmc7468 September 2, 2025 14:23
Comment on lines 701 to 705
? (() => {
const total = settlementAmount;
const perPerson = Math.floor(total / participantCount);
return { total, perPerson, participantCount };
})()
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.

이거 그냥 함수 형식 버리고
image
이런 형식으로 바꿨는데 어떤가요?

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds settlement amount functionality to the room settlement process, allowing users to specify a total amount that gets divided among participants and displayed in chat messages.

  • Added optional settlementAmount parameter to the settlement API
  • Implemented settlement metadata calculation (total, per-person amount, participant count)
  • Enhanced chat content to include settlement details for both settlement and payment events

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
src/services/rooms.ts Added settlement amount processing and enhanced chat content generation
src/routes/docs/schemas/roomsSchema.ts Added optional settlementAmount parameter to API schema
src/modules/socket.ts Enhanced chat transformation to include settlement metadata
src/modules/settlement.ts New module with settlement metadata types and utility functions

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@thxx132 thxx132 requested a review from kmc7468 September 13, 2025 14:28
);
}

const settlementMeta: SettlementMeta | undefined =
Copy link
Member

Choose a reason for hiding this comment

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

여기에는 Type Notation이 필요 없을 것 같습니다..! 자동으로 추론이 될 것 같아요

Copy link
Contributor Author

Choose a reason for hiding this comment

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

없애보니
image
이렇게 되어서 그냥 유지하겠습니다 ㅠㅠ

Copy link
Contributor Author

@thxx132 thxx132 left a comment

Choose a reason for hiding this comment

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

이거 덜한 줄 알고 draft라고 커밋 올렸었는데 알고보니깐 리뷰 받은 내용 다 고쳐놓은 것 같아요

@thxx132 thxx132 merged commit 41df2fa into dev Jan 7, 2026
1 check passed
@thxx132 thxx132 deleted the 628-add-settlement-amount-when-settling branch January 7, 2026 17:12
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