generated from pricelees/issue-pr-template
refactor: 예약 취소 로직 수정
- 일단 await 으로 결제 취소 -> 예약 취소 순으로 진행 - 추후 개선 예정
This commit is contained in:
parent
b3ac4a2da2
commit
407d7e9a5e
@ -168,7 +168,7 @@ const ReservationDetailView: React.FC<{
|
||||
)}
|
||||
<p><strong>카드사 / 구분:</strong> {detail.issuerCode}({detail.ownerType}) / {detail.cardType}</p>
|
||||
<p><strong>카드 번호:</strong> {detail.cardNumber}</p>
|
||||
<p><strong>할부 방식:</strong> {detail.installmentPlanMonths === 0 ? '일시불' : `${detail.installmentPlanMonths}개월`}</p>
|
||||
<p><strong>할부:</strong> {detail.installmentPlanMonths === 0 ? '일시불' : `${detail.installmentPlanMonths}개월`}</p>
|
||||
<p><strong>승인 번호:</strong> {detail.approvalNumber}</p>
|
||||
</>
|
||||
);
|
||||
@ -310,8 +310,8 @@ const MyReservationPage: React.FC = () => {
|
||||
try {
|
||||
setIsCancelling(true);
|
||||
setDetailError(null);
|
||||
await cancelPayment({ reservationId: selectedReservation.id, cancelReason: reason });
|
||||
await cancelReservation(selectedReservation.id, reason);
|
||||
cancelPayment({ reservationId: selectedReservation.id, cancelReason: reason });
|
||||
alert('예약을 취소했어요. 결제 취소까지는 3-5일 정도 소요될 수 있어요.');
|
||||
handleCloseModal();
|
||||
await loadReservations(); // Refresh the list
|
||||
|
||||
@ -175,7 +175,7 @@ class ReservationService(
|
||||
canceledBy = user.id,
|
||||
cancelReason = cancelReason,
|
||||
canceledAt = LocalDateTime.now(),
|
||||
status = CanceledReservationStatus.PROCESSING
|
||||
status = CanceledReservationStatus.COMPLETED
|
||||
).also {
|
||||
canceledReservationRepository.save(it)
|
||||
}
|
||||
|
||||
@ -19,7 +19,7 @@ import roomescape.reservation.web.*
|
||||
interface ReservationAPI {
|
||||
|
||||
@Public
|
||||
@Operation(summary = "결제 대기 예약 저장", tags = ["로그인이 필요한 API"])
|
||||
@Operation(summary = "가장 많이 예약된 테마 조회")
|
||||
@ApiResponses(ApiResponse(responseCode = "200", description = "성공", useReturnTypeSchema = true))
|
||||
fun findMostReservedThemeIds(
|
||||
@RequestParam count: Int
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user