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

Block delete reservation after its start time #94

Merged
merged 9 commits into from
Feb 18, 2024

Conversation

khkim6040
Copy link
Member

@khkim6040 khkim6040 commented Jan 21, 2024

#90 If start time of equipment or place passed current time, then block delete function

If start time of equipment or place passed current time, then block delete function
@khkim6040 khkim6040 requested a review from BlueHorn07 January 21, 2024 14:48
BlueHorn07 and others added 3 commits January 22, 2024 12:26
Comment on lines 173 to 175
if(reservation.start_time < new Date().toISOString()) {
throw new BadRequestException('Cannot delete past reservation');
}
Copy link
Member

@BlueHorn07 BlueHorn07 Feb 9, 2024

Choose a reason for hiding this comment

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

요렇게 바꿔보시죵

const reservation_start_time = reservation.date + reservation.start_time;
const current_time = moment().format('YYYYMMDDHHmm')
if(reservation_start_time < current_time) {
    throw new BadRequestException('Cannot delete past reservation');
}

그 아래 place reservation도 마찬가지!

Copy link
Member Author

Choose a reason for hiding this comment

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

이런게 있었네요.. 해보겠습니다

@khkim6040
Copy link
Member Author

khkim6040 commented Feb 11, 2024

dev에서 place와 equip 잘 되는 것 확인했습니다.
이미 지난 예약은 삭제하지 못한다는 안내문구를 보여주면 좋을 것 같아요
image

Copy link
Member

@BlueHorn07 BlueHorn07 left a comment

Choose a reason for hiding this comment

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

lgtm

@BlueHorn07 BlueHorn07 merged commit d2e25c4 into main Feb 18, 2024
2 checks passed
@BlueHorn07 BlueHorn07 deleted the disable-delete-booking branch February 18, 2024 08:35
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