Commit Graph
3 Commits
Author SHA1 Message Date
sean-brydonandAlex van Andel 2a5dd9035f Fixing booking limits (#6119)
* Fix logic

* Some performance improvements

* Return early to reduce depth

Co-authored-by: Alex van Andel <[email protected]>
2022-12-20 13:10:54 +00:00
sean-brydonandAlex van Andel 9441a79def Booking Limits checking ALL events not the event the limit is applied too (#5601)
* Fix error message

* Only apply buffer limits to That event type

* Correctly get eventtypeId in source

* Add comment

* Move to i188n strings

* Wrap string to be translated

Co-authored-by: Alex van Andel <[email protected]>
2022-11-22 03:17:54 +00:00
5293db29d9 Feat Booking Limits (#4759)
* Add db relevant stuff

* Basic UI there still buggy

* This UI is hard - some progress

* Fix awful state mangament

* Fix re-ordering

* Working UI logic!

* Partical working minMax function

* Fix min max

* bookingLImits api + tests

* Moved checkBookingLimits to backend only code

* Fix httperror import

* Return busy times

* Remove avaliablity calc

* Working for everything but year

* Remove redundant + fix async forloop

* Add compatible type

* Future proof with evenTypeId filter

* Fix commonjson

* Sorting + validation + tests + passing

* Add empty test

* Move validation check  to backend

* Add bookinglimits in trpc

* Add test for undefined

* Apply suggestions from code review

Co-authored-by: Jeroen Reumkens <[email protected]>

* Update apps/web/components/v2/eventtype/EventLimitsTab.tsx

Co-authored-by: Jeroen Reumkens <[email protected]>

* Rename value for eligiability

* Rename keyof type

* status code

* Fix toggle not toggling off

* Update apps/web/pages/v2/event-types/[type]/index.tsx

Co-authored-by: Omar López <[email protected]>

* Update apps/web/pages/v2/event-types/[type]/index.tsx

Co-authored-by: Omar López <[email protected]>

* Change back to undefined as it is working for sean. See if it fails on testapp

* Fixing test builder

Co-authored-by: Peer Richelsen <[email protected]>
Co-authored-by: Alex van Andel <[email protected]>
Co-authored-by: Jeroen Reumkens <[email protected]>
Co-authored-by: Hariom Balhara <[email protected]>
Co-authored-by: Omar López <[email protected]>
Co-authored-by: Leo Giovanetti <[email protected]>
2022-10-12 05:29:04 +00:00