Problem/Motivation

Currently, we are limiting the most amount of spots a user can claim with a single booking, but they could just book it again and claim more spots. They also could book the same time slot every single day forever, which might not be desired.

Proposed resolution

Much like how there is a field for "Max Party Size" we could add a new field to limit max open bookings per user, and you should be able to in theory set different values on that base on user role. If you are not requiring users to be logged in when booking, we can do a quantity check vs the emails supplied.

I would assume we would be limiting this based on openings in the future, not total all time for this calendar, but I guess people might want it that way too, so I'm trying to think if there's a way to handle both situations.

Also with this we probably need to start breaking up the UI for the entity form as it's starting to get a little long, might be nice to reorganize this and maybe split up into different collapsible sections.

Comments

josh.fabean created an issue. See original summary.

  • josh.fabean committed 3c17265 on 2.1.x
    Issue #3317302 by josh.fabean: Add the ability to limit the max amount...
josh.fabean’s picture

Status: Active » Needs review
StatusFileSize
new59.64 KB
new26.88 KB

This is now pushed up to dev.

You can now limit the max bookings a single user can do for any not in the past booking they have. Currently, this will throw the error for everyone, even admins. Might want to throw is a permission check and not do the check for admins, but none of the other validators check user roles to allow bypass either.

checkout form showing error of booking too much.

admin form showing new field to limit max bookings for a user.

josh.fabean’s picture

Version: 2.1.x-dev » 2.2.x-dev
Assigned: josh.fabean » Unassigned
Status: Needs review » Fixed

This is live in the latest release 2.2.0

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.