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

Fix/validate current reservation date #116

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

khkim6040
Copy link
Member

@khkim6040 khkim6040 self-assigned this Feb 2, 2025
@khkim6040 khkim6040 marked this pull request as draft February 2, 2025 07:00
@khkim6040 khkim6040 marked this pull request as ready for review February 8, 2025 13:06
@khkim6040 khkim6040 requested a review from BlueHorn07 February 8, 2025 13:06
@khkim6040
Copy link
Member Author

  • 지난 날짜를 선택하고 예약하기를 누른 경우
  • 예약하기 모달 안에서 selectedDate 쿼리 파라미터를 조작하여 이전 날짜로 가는 경우
    두 경우에 대해 예약을 막습니다.
    image

Comment on lines +55 to +61
const today = moment().format('YYYYMMDD');
if (moment(selectedDate).isBefore(today)) {
setTimeout(() => {
alert('오늘 이후의 날짜를 선택해주세요.');
router.push(`/reservation/equipment/${association}`);
}, 100);
}
Copy link
Member

Choose a reason for hiding this comment

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

음... 요것 useEffect 바깥으로 빼거나 요 PopoAxios Promise 밖으로 뺄 수 있을가요?

Comment on lines +60 to +67
const today = moment().format('YYYYMMDD');
if (moment(selectedDate).isBefore(today)) {
setTimeout(() => {
alert('오늘 이후의 날짜를 선택해주세요.');
router.push(
`/reservation/place/${placeInfo.region}/${placeName}`,
);
}, 100);
Copy link
Member

Choose a reason for hiding this comment

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

이하 동문

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants