* init bookings endpoint
* abstracting functions
* e2e tests for bookings
* hooks for bookings endpoint
* bookings respository fixtures
* typings for booking input
* fixup
* abstract booking info code and use it as handler
* import handlers for bookings endpoint
* add cancel booking input
* add handleCancelBooking handler in platform libraries
* cancel booking endpoint
* abstract call into its own separate fn
* cancel booking hook
* e2e test for cancel booking endpoint
* fix import
* export getBookings function
* move getAllUserBookings into lib
* add bookings folder to package exports
* use getAllUserBookings from lib
* fix import path
* fix: hooks, endpoint and example for cancel / reschedule / list / booking success page
* fix: unit test mock classNames import from lib
* fix: unit test mock classNames import from lib
---------
Co-authored-by: Morgan Vernay <morgan@cal.com>
Co-authored-by: Morgan <33722304+ThyMinimalDev@users.noreply.github.com>
* refactor: extract getEventTypeByViewer for private user dashboard event types
* refactor: extract getEventTypesPublic for public event types to book
* refactor: group event-types lib functions in single folder
* refactor: rename getEventTypeByViewer to getEventTypesByViewer
* feat: add event type helpers from lib to platform libraries
* feat: v2 endpoint for private event types
* driveby:fix: fixed date in docs instead of being re-generated
* feature: endpoint to fetch public endpoints
* fix: getting private event types
* tests: fetch private event types
* tests: fetch private event types
* feat: hooks for public and private events
* fix: yarn test
* tests: IMO better mocking
* refactor: track dynamic prop in react query
* fix: distinct query key for public events
* fix: username in query key and example app demo
* fix: swagger for endpoint get public event input
---------
Co-authored-by: Morgan Vernay <morgan@cal.com>
Co-authored-by: Morgan <33722304+ThyMinimalDev@users.noreply.github.com>
* 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 <hello@jeroenreumkens.nl>
* Update apps/web/components/v2/eventtype/EventLimitsTab.tsx
Co-authored-by: Jeroen Reumkens <hello@jeroenreumkens.nl>
* 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 <zomars@me.com>
* Update apps/web/pages/v2/event-types/[type]/index.tsx
Co-authored-by: Omar López <zomars@me.com>
* Change back to undefined as it is working for sean. See if it fails on testapp
* Fixing test builder
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: Alex van Andel <me@alexvanandel.com>
Co-authored-by: Jeroen Reumkens <hello@jeroenreumkens.nl>
Co-authored-by: Hariom Balhara <hariombalhara@gmail.com>
Co-authored-by: Omar López <zomars@me.com>
Co-authored-by: Leo Giovanetti <hello@leog.me>
* wip commit
* Finished new algorithm for fetching the least recently booked user
* ROUND_ROBIN fix
* Removed redundant import
* Prisma dependency turned getLuckyUser into a server-only function
* DRY avatars
* Properly passThrough
* name can be undefined.
* Remove debug artefact
* Incorporates recurringEvent into calEvent
* Recurrent event fixes
* Update event.ts
* type fixes
* Update zod-utils.ts
* Adding more recurringEvent to calEvent and other fixes
* Moving away from heavy 3rd party enum
* Fixing test
* Renaming as suggested and fixes
Co-authored-by: Leo Giovanetti <hello@leog.me>