Skip to content
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

[Feat/#372] 예매 조회 페이지 취소 상태 추가 #376

Merged
merged 9 commits into from
Aug 31, 2024

Conversation

sinji2102
Copy link
Contributor

@sinji2102 sinji2102 commented Aug 29, 2024

📌 관련 이슈번호

🎟️ PR 유형

어떤 변경 사항이 있나요?

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

✅ Key Changes

이번 PR에서 작업한 내용을 간략히 설명해주세요

  • 예매 조회 페이지 내 취소 상태 추가
  • 예매 취소 시 취소하기 버튼 비활성화
  • 예매 취소 시 계좌번호 버튼 비활성화

📢 To Reviewers

  • 딱히 전달 사항은 없구,,, 예매 조회 페이지 내 취소 상태 추가했으며 취소 시에 취소하기 버튼과 계좌번호 버튼 비활성화 했습니다!
  • 기존에 사용하는 색이 두 가지 뿐이었어서 그냥 컴포넌트 두 개 만들었는데 컴포넌트 세 개를 쓰는 건 비효율적인 것 같아서 status에 따라서 색 변하도록 설정했습니다!
  • 코드리뷰 반영 사항 : bookingStatusText 관련해서 공통으로 빼는 게 더 좋을 것 같다는 코드리뷰가 있어 반영했습니다!! bookingStatus API 사용하는 페이지 있다면 저기서 사용하면 좋을 것 같아요~

📸 스크린샷

image
image
image

@sinji2102 sinji2102 linked an issue Aug 29, 2024 that may be closed by this pull request
2 tasks
Copy link

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

@github-actions github-actions bot added the ✨ FEAT 기능 구현 label Aug 29, 2024
Copy link
Member

@pepperdad pepperdad left a comment

Choose a reason for hiding this comment

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

고생하셨습니다 ~. ~

Comment on lines 34 to 40
const bookingStatusText = {
CHECKING_PAYMENT: "입금 확인 예정",
BOOKING_CONFIRMED: "입금 완료",
BOOKING_CANCELLED: "예매 취소",
};
type bookingStatusTypes = keyof typeof bookingStatusText;

Copy link
Member

Choose a reason for hiding this comment

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

p2) 이 부분은 관리 페이지나 다른 페이지에서도 공통적으로 사용될 수 있을 것 같아서 src/constant 아래에서 전역으로 사용할 수 있게 바꾸면 좋겠어용

아래의 아티클에서 그러면 enum 대신 어떤걸 쓰면 좋나요? 이 부분 읽어보시면 좋을 것 같아요!
https://velog.io/@hhhminme/%EB%84%A4-Enum-%EB%88%84%EA%B0%80-Typescript%EC%97%90%EC%84%9C-Enum%EC%9D%84-%EC%93%B0%EB%83%90

Comment on lines 4 to 6
interface DefaultDepositPropTypes {
$status;
}
Copy link
Member

Choose a reason for hiding this comment

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

p3) 여기서도 타입 import 해서 추가해주세요!

Copy link

Copy link
Contributor

@imddoy imddoy left a comment

Choose a reason for hiding this comment

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

최고신지 코딩존잘 인정합니띠예~

Comment on lines +16 to 28
{item.dueDate < 0 || item.bookingStatus === "BOOKING_CANCELLED" ? (
<Button variant="line" disabled={true} size={{ width: "10.8rem", height: "3.6rem" }}>
취소하기
</Button>
) : (
<Button
variant="line"
size={{ width: "10.8rem", height: "3.6rem" }}
onClick={handleBtn}
>
취소하기
</Button>
) : (
<Button variant="line" disabled={true} size={{ width: "10.8rem", height: "3.6rem" }}>
취소하기
</Button>
)}
Copy link
Contributor

Choose a reason for hiding this comment

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

p5) 이 부분 중복 코드가 가독성을 떨어뜨리는 것 같습니다.

<Button
  variant="line"
  disabled={item.dueDate < 0 || item.bookingStatus === "BOOKING_CANCELLED"}
  size={{ width: "10.8rem", height: "3.6rem" }}
  onClick={handleBtn}
>
  취소하기
</Button>

이렇게 줄여보는건 어떤가용?

Copy link
Member

Choose a reason for hiding this comment

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

좋아용
@sinji2102 신지 추후에 반영해주세용 ~
머지할게요!

@pepperdad pepperdad merged commit 2a36f96 into develop Aug 31, 2024
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ FEAT 기능 구현
Projects
Status: 🎉Done
Development

Successfully merging this pull request may close these issues.

[ Feat ] 예매 조회 페이지 취소 상태 추가
3 participants