Repository navigation
[Fix/#528] 예매 취소·환불 및 관리자 삭제 정책 정합화 #529
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
Merged
Merged
Changes from 9 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
6158033
fix: 예매 상태 및 삭제 정책 정합화
move-hoon dd4a1d6
fix: 예매자 결제 상태 문구 명확화
move-hoon 30f7fb3
fix: 입금 확인 전 상태 안내 추가
move-hoon 6bd2df9
fix: 계좌번호 버튼 문구 복구
move-hoon 009885c
fix: 입금 상태 문구 수정
move-hoon 137753e
fix: 관리자 삭제 대상을 취소 완료 예매로 제한
move-hoon bc09c01
fix: 예매 취소 오선택 안내 문구 보완
move-hoon 942477c
fix: 예매 취소 확인 모달 보완
move-hoon 2a0d8bf
fix: 예매 상태 문구 기존 정책으로 복구
move-hoon aeaab1f
fix: 확정 예매 환불 흐름 보완
move-hoon ad72f41
chore: 취소 정책 테스트 제거
move-hoon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,6 +11,9 @@ interface CancelRequestProps { | |
| accountHolder?: string; | ||
| } | ||
|
|
||
| const isRefundRequest = (requestData: CancelRequestProps) => | ||
| Boolean(requestData.bankName || requestData.accountNumber || requestData.accountHolder); | ||
|
|
||
| export const useCancelBooking = (name?: string, phone?: string, password?: string) => { | ||
|
Comment on lines
13
to
17
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 요이~ |
||
| const { openAlert, openConfirm, closeConfirm } = useModal(); | ||
| const [toastMessage, setToastMessage] = useState<string | null>(null); | ||
|
|
@@ -28,15 +31,12 @@ export const useCancelBooking = (name?: string, phone?: string, password?: strin | |
| phone?: string, | ||
| password?: string | ||
| ) => { | ||
| const mutation = | ||
| requestData.bankName || requestData.accountNumber || requestData.accountHolder | ||
| ? refundMutation | ||
| : cancelMutation; | ||
| const shouldRequestRefund = isRefundRequest(requestData); | ||
| const mutation = shouldRequestRefund ? refundMutation : cancelMutation; | ||
|
|
||
| const toastMessage = | ||
| requestData.bankName || requestData.accountNumber || requestData.accountHolder | ||
| ? "메이커에게 환불을 요청했어요." | ||
| : "예매 취소가 완료됐어요."; | ||
| const toastMessage = shouldRequestRefund | ||
| ? "메이커에게 환불을 요청했어요." | ||
| : "예매 취소가 완료됐어요."; | ||
|
|
||
| mutation.mutate(requestData, { | ||
| onSuccess: () => { | ||
|
|
@@ -61,14 +61,18 @@ export const useCancelBooking = (name?: string, phone?: string, password?: strin | |
| }; | ||
|
|
||
| const confirmCancelAction = (requestData: CancelRequestProps) => { | ||
| const shouldRequestRefund = isRefundRequest(requestData); | ||
|
|
||
| openConfirm({ | ||
| title: "예매를 정말 취소하시겠어요?", | ||
| subTitle: "취소한 예매내역은 복구할 수 없어요.", | ||
| okText: "취소할게요", | ||
| title: shouldRequestRefund ? "환불을 요청할까요?" : "예매를 취소할까요?", | ||
| subTitle: shouldRequestRefund | ||
| ? "관리자가 확인한 후 환불을 진행해요." | ||
| : "예매가 바로 취소되고 좌석이 반환돼요.", | ||
| okText: shouldRequestRefund ? "환불 요청" : "예매 취소", | ||
| okCallback: () => { | ||
| handleCancelRequest(requestData, name, phone, password); | ||
| }, | ||
| noText: "아니요", | ||
| noText: "돌아가기", | ||
| noCallback: closeConfirm, | ||
| }); | ||
| }; | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.