Skip to content

[Fix/#528] 예매 취소·환불 및 관리자 삭제 정책 정합화 - #529

Merged
move-hoon merged 11 commits into
developfrom
fix/#528/booking-status-policy
Aug 3, 2026
Merged

move-hoon merged 11 commits into
developfrom
fix/#528/booking-status-policy

Conversation

@move-hoon

@move-hoon move-hoon commented Aug 3, 2026 •

Copy link
Copy Markdown
Member

📌 관련 이슈번호

🎟️ PR 유형

  • 새 기능 추가
  • 버그 수정
  • CSS 등 사용자 UI 디자인 변경
  • 리팩토링

✅ Key Changes

  1. 취소·환불 분기 정합화
    • 유료 CHECKING_PAYMENT 예매는 사용자가 선택한 입금 여부에 따라 즉시 취소 또는 환불 요청으로 분기합니다.
    • 유료 BOOKING_CONFIRMED 예매는 환불 계좌 입력 후 환불 요청으로 처리합니다.
    • 무료 예매는 환불 계좌 없이 즉시 취소합니다.
  2. 오선택 방지
    • 입금 여부 선택지에 처리 결과를 함께 안내합니다.
    • 최종 확인 모달에서 즉시 취소와 환불 요청을 구분해 다시 확인합니다.
  3. 관리자 삭제 대상 제한
    • 취소·환불 절차가 끝난 BOOKING_CANCELLED만 삭제할 수 있습니다.
    • 진행 중 예매의 오삭제와 좌석 오반환을 방지합니다.
  4. 안전성·접근성 보완
    • 환불 계좌 세 항목이 모두 있을 때만 환불 API로 분기합니다.
    • 입금 여부 선택에 radio 접근성 속성을 추가했습니다.
    • 직접 URL 진입 시 상태값이 없어도 화면이 깨지지 않도록 처리했습니다.
    • 취소 실패와 환불 요청 실패 문구를 구분했습니다.

예매자·관리자 상태 문구는 기존 문구를 그대로 유지합니다.

🧪 검증

  • yarn tsc --noEmit
  • 변경 파일 ESLint
  • git diff --check

📢 To Reviewers

📸 스크린샷

image image image image

🔗 참고 자료

@coderabbitai

coderabbitai Bot commented Aug 3, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 41109d3f-7ab0-4b5e-a7d9-572cb8abb1ab

📥 Commits

Reviewing files that changed from the base of the PR and between 2a0d8bf and ad72f41.

📒 Files selected for processing (4)
  • src/hooks/useCancelBooking.tsx
  • src/pages/cancel/Cancel.tsx
  • src/pages/cancel/components/select/RadioButton.tsx
  • src/pages/cancel/utils/index.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/pages/cancel/components/select/RadioButton.tsx
  • src/hooks/useCancelBooking.tsx

Summary by CodeRabbit

  • 새로운 기능
    • 취소 화면에서 입금 전 취소와 입금 후 환불 요청을 구분해 안내합니다.
    • 환불이 필요한 경우에만 계좌 정보 입력 항목을 표시합니다.
    • 취소 선택 항목에 상세 설명을 제공합니다.
  • 개선
    • 입금 상태에 따른 확인 메시지와 버튼 문구를 개선했습니다.
    • 취소 가능한 예약 상태 필터가 관련 상태를 빠짐없이 반영합니다.
    • 계좌 정보 및 입금 안내 영역의 가독성과 표시 공간을 개선했습니다.

Walkthrough

삭제 가능 상태를 공통 상수로 관리합니다. 취소 화면은 결제 상태와 결제 금액으로 환불 필요 여부를 계산합니다. 취소 요청, 검증, 확인 모달은 요청 유형에 따라 동작합니다. 입금 안내 문구와 라디오 버튼 설명을 추가합니다.

Changes

예매 삭제 및 취소 정합화

Layer / File(s) Summary
삭제 가능 상태 정의 및 필터 적용
src/constants/bookingStatus.ts, src/pages/ticketholderlist/TicketHolderList.tsx
BOOKING_CANCELLED를 삭제 가능 상태에 추가합니다. 관리자 삭제 필터는 상수의 전체 값을 사용합니다.
환불 판단 및 요청 검증
src/pages/cancel/utils/index.ts, src/pages/cancel/Cancel.tsx, src/hooks/useCancelBooking.tsx
결제 상태와 결제 금액으로 환불 필요 여부를 계산합니다. 환불 요청에는 모든 계좌 정보가 필요합니다. 요청, 오류, 성공 메시지, 확인 모달을 요청 유형에 따라 구분합니다.
취소 선택 UI 및 입금 안내
src/pages/cancel/components/select/*, src/pages/cancel/Cancel.tsx, src/pages/test/modalTest/BankAccount.tsx
라디오 버튼에 설명과 접근성 속성을 추가합니다. 환불 조건에서만 계좌 입력 영역을 표시합니다. 계좌 정보 화면에 입금 안내 문구를 표시합니다.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related issues

  • TEAM-BEAT/BEAT-SERVER#571: 예매 취소·환불 흐름과 상태 전이를 서버에서 함께 처리하는 내용과 관련됩니다.

Suggested reviewers: pepperdad, sinji2102, ocahs9

Poem

토끼가 상태를 살펴요
환불 길과 취소 길을 나눠요
계좌 정보는 빠짐없이
안내 문구는 또렷하게
모달도 요청에 맞춰 말해요
깡충, 예매 흐름이 정리됐어요!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed 제목이 예매 취소·환불 처리와 관리자 삭제 정책 변경이라는 주요 내용을 명확하게 요약합니다.
Description check ✅ Passed 관련 이슈, 변경 내용, 검증 항목, 리뷰어 안내, 스크린샷과 참고 자료를 모두 포함합니다.
Linked Issues check ✅ Passed [#528] 취소·환불 분기, 관리자 삭제 상태 제한, 접근성 보완 요구사항이 변경 사항에 반영되었습니다.
Out of Scope Changes check ✅ Passed 모든 변경 사항이 예매 취소·환불 처리 또는 관리자 삭제 정책 정합화와 관련됩니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/#528/booking-status-policy

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added 🐛 BUG 버그를 고친 경우 🚀 API API labels Aug 3, 2026
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

PR 작성하느라 고생 많았어요!! 라벨 잘 지정되었는지 확인 한 번 해 주기 🫶

@move-hoon
move-hoon marked this pull request as ready for review August 3, 2026 13:32
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

@imddoy imddoy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

어푸푸푸푸

Comment on lines 13 to 17

const isRefundRequest = (requestData: CancelRequestProps) =>
Boolean(requestData.bankName || requestData.accountNumber || requestData.accountHolder);

export const useCancelBooking = (name?: string, phone?: string, password?: string) => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

요이~

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/hooks/useCancelBooking.tsx`:
- Around line 14-16: Update isRefundRequest in useCancelBooking so it returns
true only when bankName, accountNumber, and accountHolder are all present, and
false when the account information is entirely absent or partially provided;
preserve the existing refundMutation branching for complete account details.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 192fb4bd-5a37-44b0-afa0-11ffe9bea9b2

📥 Commits

Reviewing files that changed from the base of the PR and between bc09c01 and 2a0d8bf.

📒 Files selected for processing (5)
  • src/constants/bookingStatus.ts
  • src/hooks/useCancelBooking.tsx
  • src/pages/cancel/Cancel.tsx
  • src/pages/cancel/components/select/RadioButton.styled.ts
  • src/pages/cancel/components/select/RadioButton.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/pages/cancel/Cancel.tsx

Comment thread src/hooks/useCancelBooking.tsx Resolved
@move-hoon move-hoon changed the title [Fix/#528] 예매 상태 문구 및 관리자 삭제 정책 정합화 [Fix/#528] 예매 취소·환불 및 관리자 삭제 정책 정합화 Aug 3, 2026
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

@sonarqubecloud

sonarqubecloud Bot commented Aug 3, 2026

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

@move-hoon
move-hoon merged commit a2799c0 into develop Aug 3, 2026
4 of 6 checks passed
@github-project-automation github-project-automation Bot moved this from ✅Todo to 🎉Done in 🌱beat-board Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐛 BUG 버그를 고친 경우 🚀 API API

Projects

Status: 🎉Done

Development

Successfully merging this pull request may close these issues.

[ Fix ] 예매 취소·환불 및 관리자 삭제 정책 정합화

2 participants