-
Notifications
You must be signed in to change notification settings - Fork 1
#628 정산 시 정산 금액 추가 #632
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
#628 정산 시 정산 금액 추가 #632
Conversation
src/services/rooms.ts
Outdated
| ? (() => { | ||
| const total = settlementAmount; | ||
| const perPerson = Math.floor(total / participantCount); | ||
| return { total, perPerson, participantCount }; | ||
| })() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이 함수 자체를 별도로 분리해서 호출하면 더 깔끔할 것 같습니다. 같은 파일 안에서 새로 함수 정의해서 불러다 쓰면 될 것 같아요!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this 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
settlementAmountparameter 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.
| ); | ||
| } | ||
|
|
||
| const settlementMeta: SettlementMeta | undefined = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
여기에는 Type Notation이 필요 없을 것 같습니다..! 자동으로 추론이 될 것 같아요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thxx132
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이거 덜한 줄 알고 draft라고 커밋 올렸었는데 알고보니깐 리뷰 받은 내용 다 고쳐놓은 것 같아요


It closes #628