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

CB-Admins Buchungen in weiter Zukunft ermöglichen #1418

Open
hansmorb opened this issue Nov 21, 2023 · 0 comments · May be fixed by #1422
Open

CB-Admins Buchungen in weiter Zukunft ermöglichen #1418

hansmorb opened this issue Nov 21, 2023 · 0 comments · May be fixed by #1422
Assignees
Labels
enhancement New feature or request

Comments

@hansmorb
Copy link
Contributor

Die CB-Admins sollen nicht von der Einstellung timeframe-advance-booking-days betroffen sein, dh. wenn nur maximal einen MOnat im Vorraus buchbar ist sollen CB-Admins mehr Freiheiten genießen.

@hansmorb hansmorb added the enhancement New feature or request label Nov 21, 2023
@hansmorb hansmorb self-assigned this Nov 21, 2023
@hansmorb hansmorb linked a pull request Nov 21, 2023 that will close this issue
1 task
hansmorb added a commit that referenced this issue Nov 21, 2023
hansmorb added a commit that referenced this issue Nov 21, 2023
hansmorb added a commit that referenced this issue Feb 22, 2024
* added support for terms in optionsArray

* added renderingErrors during booking process to frontend

* added bookingRules classes with test rules

* added bookingRule options to frontend

* moved booking form request to run after taxonomy registration

* bookingRules: now support roles & terms

* bookingRule: added on save validation

* can now define postStatus of bookings to get for user

* added check booking for privileged users

* bookingRule: added unit tests

* function for retrieving adjacent bookings for Booking

* timeframe: getter for max-days

* BookingRule: new rule against chain-booking

* BookingRule: implemented maxBookingDays

* fixed exception not caught to delete booking after failing

* reworked exception handling for booking form

* booking model: added ability to test for applicable terms

* booking rule: moved lambdas to separate functions

* removed union types again (PHP 8 feature)

* clarified exception handling

* added list of conflicting bookings to user display

* BookingRule: restructured class

* BookingRule: added ability to only apply BookingRule to specific role

* refactored functions

* added additional rule functions

* added tests for rule functions

* add new maxBookingPerWeek to frontend

* switched logic around, you can now select roles that the user will be excluded from

* reverted change in wrong place, made change in right one

* BookingRule: added select as param functionality

* changed ID in OptionsArray to select

* added ability to fetch JSON object for BookingRuleApplied

* set rule from JSON object

* ran grunt

* additional value safety

* WIP

* fix booking per week

* extracted function

* moved each unit test to separate function

* fix getting of month range

* added frontend selector

* removed debug rule

* better test coverage

* re-added old function to get DT object

* fixed february tests

* added title for parameters

* removed doubled function and fixed tests

* fixed tests executed twice due to inheritance

* test pipeline wo pullrequest

* wip fix order problem in array equals test

* update docblock

* Set ascending order

* added different behaviour for getLength and basic tests

* changed behaviour of getLength: one hour tolerance until a day counts as started

* more specific tests for getLength

* BookingRule: implemented option to count cancelled bookings during period

* added tests for counting of cancelled bookings

* additional type safety

* fixed issue from changed constant

* fixed unit tests (stupid mistake already fixed in PR #1173)

* fixed slightly broken chain-booking detection

* re-factoring & type safety

* fixed js

* added catching for cases where booking is not yet created

* documentation & string fixes

* added support to have closure function as error message (-> more detailed error messages)

* also add unit tests for weird edge cases

* add test for terms apply

* fixed that bookings cancelled before start date were counted

* fixes after merge

* fixed double validation after merge

* undone unwanted changes

* fixed changes after merge

* extra unit tests

* fixed paramtest & docs

* additional tests for term application

* use correct parameters for maxBookingDays

* style fixes

* added link to documentation

* fixed type issue

* fixed issue with invalid rules breaking backend settings

* removed not working type definition

* made better rule title

* made rule selector more readable

* grunt after merge

* refactored excluded user roles

* added tests for excluded user roles

* added tests for filterTermsApply

* better name for function

* more unit tests

* revert unnecessary changes

* grunt after merge

* added cancellation-time to frontend cancel request

* refactored unit tests

* re-added tests to different folder

* minor re-factoring

* exempt priviledged users from advance booking days setting

* added test for role type ID

* more finely granulated control over custom caches for user roles

* added extra test for isUserPrivileged

* fixed broken unit tests

* added class annotations

* fixed inconsistencies /w weekday reset

* grunt after merge

* remove cosmetic changes that pollute change overview

* fix test

* grunt after merge

* remove #1418 (moved to separate PR)

* removed function from #1418

* added own hook for privileged roles

* added direct links to affected bookings

* fix error message containing cancelled bookings

* added extra checks

* use existing translations wherever possible

* added better error handling for unset rules

* bookings will now save amount of overbooked days

* overbooked days now set according to location settings

* make booking length respect overbooked days

* removed accidental double-rendering of error message (wasn't visible because transient is deleted after first time)

* introduced new rule, refactoring & renaming

* pre-pend error message to post instead of append

* added error handling for unset select parameter

* fixed backend crashing when deleting booking rule

* fix select param checking - again

* fixed issues with select argument not properly saving

* added error for non-numeric parameter inputs

* remove doubled implementation

* compile minified js

* Improve english wording

* bookingrule: indent js

* BookingRule: document usage and types more clearly

* spelling typo in comment

* refactored adjacent method

* litepicker.js: add comment and indent code

* fix documentation

* renamed length method

* fixed redundant null-safety

* pick roleID instead of translation for excluding admins from user roles

* fixed method access for getForCurrentUser

* fixed documentation

* fixed documentation

* refactored userHasRoles

* Booking: refactor duration names

* doc: adds @SInCE annotation to phpdoc

* refactors unreachable statement and indent

---------

Co-authored-by: Chris <[email protected]>
Co-authored-by: Chris <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Todo Review DEV
Development

Successfully merging a pull request may close this issue.

1 participant