Allow for "Max Open Bookings Per User" to be site wide

Created on 12 January 2023, over 1 year ago
Updated 27 January 2023, over 1 year ago

Currently, that limits the amount of bookings a single user can do, but only for the current calendar they're booking. I think this will need to be a setting on the module settings page, so it doesn't need to be set on every single calendar, and this global setting overrides calendar settings and puts a hard limit on the site as a whole.

That would allow of you to say each calendar can only have 5 bookings per user, but a single user cannot have more than 10 across the site.

One potential issue would just be if you set that globally but not on a calendar you might be confused why people are limited as the setting lives someplace else, but I think that's a very minor potential confusion.

This will require adding extra checks into src/Plugin/Validation/Constraint/CalendarOpeningMaxBookingsClaimedByUserValidator.php I think just with a check remove this line:

$query->condition('opening.bookable_calendar', $parent_calendar->id());
✨ Feature request
Status

Fixed

Version

2.2

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States josh.fabean

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024