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

添加对单日预约时长和同时段预约的限制 #867

Closed

Conversation

HelloWorldZTR
Copy link
Contributor

#866 添加对单日预约时长和同时段预约的限制,修改前端的提示信息

配置文件 Appointment/config.py

    # 单人单日预约总时长上限
    max_appoint_time = timedelta(hours=6)
    # 是否允许单人同一时段预约两个房间
    allow_overlap = False

image
image
image

@Deophius Deophius self-requested a review January 17, 2025 04:34
@Deophius Deophius linked an issue Jan 17, 2025 that may be closed by this pull request
Copy link
Collaborator

@Deophius Deophius left a comment

Choose a reason for hiding this comment

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

在测试过程中,发现“选择预约时间”页面会检查单次预约时间:

image

可能可以把这次新实现的检查在这里也做一次(让用户体验更统一一些),checkout_appoint里面的检查也保留(防止用户直接构造请求)。

另外还要和产品确认一下组织用户是否受到这个限制(?)


# 获取预约者同时进行的预约,不含长期预约和面试
def get_overlap_appoints(appointer: Participant, start_time: datetime, finish_time: datetime) -> QuerySet[Appoint]:
parrallel_appoints = appointer.appoint_list.exclude(
Copy link
Collaborator

Choose a reason for hiding this comment

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

parallel似乎typo了

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