* feat - Restrict same email to create more than 'n' active bookings at a time
* updated checkbookerbookinglimit function
* type fix
* minor change
* import fix
* minor fixes
* back to null on disable
* back
* type check
* managed edge cases
* chore: name changes
* name changes
* fix
* minor change
* changed name
* use default value for maxactivebookingsperbooker, and some minor changes
* disabling bookerbooking limit for recurring event
* disabling bookerbooking limit for recurring event
* type fix
* ui fix and backend eventtype update check
* Add `maxActiveBookingPerBookerOfferReschedule` to schema
* Create `MaxActiveBookingsPerBookerController` and offer reschedule option
* Add offer reschedule to event type form data
* Pass data through to HttpError
* When checking max bookings, return last booking info if applicable
* removed unused code
* minor changes
* update validation
* chore
* Do not check booking limits if rescheduling
* Add data for reschedule
* Add reschedule specific error code
* On maximum booking error, write to booker store reschedule params
* Add translations for error codes
* Write to error message previous booking time
* minor fix
* Write to error message previous booking time
* Type fixes
* Clean up comment
* Refactor eventType update errors
* Typo fix
* Type fix
* Type fix
* Type fix
* Fix test
* Fix test
* Add migration
* Addressed feedback and missed merges
---------
Co-authored-by: romit <romitgabani@icloud.com>
* feat - Restrict same email to create more than 'n' active bookings at a time
* updated checkbookerbookinglimit function
* type fix
* minor change
* import fix
* minor fixes
* back to null on disable
* back
* type check
* managed edge cases
* chore: name changes
* name changes
* fix
* minor change
* changed name
* use default value for maxactivebookingsperbooker, and some minor changes
* disabling bookerbooking limit for recurring event
* disabling bookerbooking limit for recurring event
* type fix
* ui fix and backend eventtype update check
* removed unused code
* minor changes
* update validation
* chore
* Do not check booking limits if rescheduling
* minor fix
* Refactor eventType update errors
* Typo fix
---------
Co-authored-by: Joe Au-Yeung <j.auyeung419@gmail.com>
* feature eventType specific language or bookingPage language
* chore
* fix type checks
* chore
* chore: remove log
* improvement: this updates in DatePicker is not required with context provider method
* added e2e tests for InterfaceLanguage feature
* corrected prev merge conflict issues
* update to align with hooks usage pattern
* chore
* unrelated auto-formatting changes
* unrelated auto-formatting changes
* unrelated auto-formatting changes
* update to affect interfaceLanguage on success page
* undone prettier changes
* update test for success page translation
* chore
* return null from memo
* fix typecheck error due to atom imports in useLocale
* set default interfaceLanguage as null
* updated to use null instead of constant
* enhancements
* fix latest unit test, use prop instead of useSession hook
* fix build issue
* chore
* fix atom build issue
* fix unit test with reqd mock
* update to use server i18n rendering
* nit
* Move import localeOptions to EventSetupTabWebWrapper
* make sure we only display interface language option in web app
* using customI18nProvider
---------
Co-authored-by: amrit <iamamrit27@gmail.com>
Co-authored-by: Tushar Bhatt <95581504+TusharBhatt1@users.noreply.github.com>
Co-authored-by: Tushar <tusharbhatt0135@gmail.com>
Co-authored-by: Anik Dhabal Babu <81948346+anikdhabal@users.noreply.github.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: Ryukemeister <sahalrajiv6900@gmail.com>
Co-authored-by: Rajiv Sahal <sahalrajiv-extc@atharvacoe.ac.in>
Co-authored-by: Benny Joo <sldisek783@gmail.com>
* Show distribution option for RR scheduling type
* Add `includeNoShowInRRCalculation` to event type schema
* Add `includeNoShowInRRCalculation` initial event type data
* Add FE option for `includeNoShowInRRCalculation`
* Consider `includeNoShowInRRCalculation` when building `where` clause when getting bookings for RR
* Add `includeNoShowInRRCalculation` param to `getAllBookingsForRoundRobin`
* Add `includeNoShow...` param to `GetLuckyUserParams`
* Pass `includeNoShow...` param to `getBookingsOfInterval` calls
* Add FE option for `includeNoShow...` (actual commit)
* Type fixes
* Fix brackets
* Add booking repository test
* Remove unused method
* Add translation
* Type fix
* Type fix
* Test passing
* Fix tests
* Fix tests
* Fix test
* Type fixes
* feat: add option to disable sending transcription emails
* fix: types and tests
* fix: type error
* fix: type err
* fix: type err
---------
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: Keith Williams <keithwillcode@gmail.com>
* migration and init to accept creationSource for new bookings
* V1 create booking
* V1 user creation
* webapp booking + V1 user
* user creation in V1, V2 and webapp
* booking source V2 and fix for v1 user
* fit type
* --fix type
* add test -- WIP
* fix type
* fix type
* ^
* Need more sleep zzz
* -_-
* bump libraries platform
* adds for v2 recurring booking
* fix lint
* instant meetings
* fix: api v2 creation source
* fixup! fix: api v2 creation source
* bump libraries
* add user
* fix test
* fixup! fix test
* add more source
* more source...
* fix type & test --1
* fix type & test --2
* typefix
* fixup test
---------
Co-authored-by: Morgan Vernay <morgan@cal.com>
* Add email domain array
* Create numbered email domain object
* Check email domain
* Rename function
* Add tests
* Frontend enable skip ownership check if free email domain
* Backend ignore adding ownership to return records if free email domain check is enabled
* feat: Only require confirmation for free email domains (#17917)
* Add requiresConfirmationForFreeEmail to db
* Add option to event type settings
* Get requiresConfirmationForFreeEmail for event type page
* Include requiresConfirmationForFreeEmail in fetching event type
* Pass bookerEmail to `getRequiresConfirmationFlags`
* Add free email domain check to `determineRequiresConfirmation`
* Add `requiresConfirmationForFreeEmail` to types
* Add severity to Watchlist table
* Add migration for watchlist severity
* Add `getEmailDomainInWatchlist` method to watchlist repository
* Use watchlist repository to check for free email domain
* Mock watchlist repository in test
* Update test
* Rename method
* Add severity to blocked list
* Move check free email domain to async
* Type checks
* Adjust for promise returned
* Fix tests
* Fix
* Fix tests
* feat: AI description - DB model + frontend + backend (fetch only)
* fix types and add validation to backend
* improve log
* improve
* import type
* fix replexica error
* fix
* fix test
* update replexica type
* Renamed descriptionTranslations to fieldTranslations
* Moved the eventTypeId column to 2nd
---------
Co-authored-by: Keith Williams <keithwillcode@gmail.com>
* feat: Implements maxLeadThreshold which puts a maximum to the amount of lead a given host is allowed to be ahead
* Refactor getLuckyUser + implement in handleNewBooking + move logic to repo
* Decoupled @prisma from findQualifiedHosts
* Fix deep type error
* Add maxLeadThreshold to builder.ts
* Removed a console.log :O + fix handleChildrenEventTypes input
* Add distribution UI to enable balanced distribution/maximize availability
* 0-1-2 instead of 0-1-2-3 (3 bookings instead of 4)
* only fetch bookings of this month for weighted rr
* test set up
* only get bookings of current month
* reverts test setup
* first changes for weight adjustments
* reset booking count + adjust calibration
* depreciate weightAdjustment
* get only bookings created this month
* fix typo
* make sure createdAt for hosts is correct
* use earliest possibel date as fallback
* add missing createdAt date to tests
* fix typo
* clean up changes in tests
* fix typo
* change end date to current date
* fix: Fall back to empty host array when no hosts are found
* fix: Restructure code a little
* fixed test, incorrectly used now outdated var
* perf: remove Dayjs from getLuckyUser
* Refactor getHostsWithCalibration for optimised performance, intentionally break test as findMany is always an array
* Better mock for host.findMany
* Remove team-event-types.test.ts, move to appropriate package
* TypeScript cannot auto-infer that an array is non-empty when assigning to a var
* fix: Type Fixes and DistributionMethod enum add
* Optimise tests
* Added test to show that bookings made before a newHost was added affect the lucky user result
* Throw error when the usersWithHighestPriority is empty, which should never happen
---------
Co-authored-by: CarinaWolli <wollencarina@gmail.com>
Co-authored-by: Alex van Andel <me@alexvanandel.com>
* add reassignedBy and reassign reason to both status
* fix w-full issue in dialog
* fix types
---------
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
* Add `hideCalendarEventDetails` to DB
Co-authored-by: Alex van Andel <emrysal@users.noreply.github.com>
* Add option to hide calendar event details
* Pass `hideCalendarEventDetails` to event object
* Add to API
* Add to CalendarEvent class
* Pass `hideCalendarEventDetails` to calendar services
* Adjust test
* fix: move `hideCalendarEventDetails` to `api/v2/event-types_2024_06_14` and remove from older versions
- Added `hideCalendarEventDetails` to `api/v2/event-types_2024_06_14`
- Removed `hideCalendarEventDetails` from `api/v1` and `api/v2/event-types_2024_04_15`
* fix: calEventRaw is undefined (use event instead)
* chore: Remove debug artifact
* fix: description id + update to copy
* fix: Attempt at fixing type error
* Add hideCalendarEventDetails to test builder
---------
Co-authored-by: Alex van Andel <emrysal@users.noreply.github.com>
Co-authored-by: Somay Chauhan <somaychauhan98@gmail.com>
Co-authored-by: Alex van Andel <me@alexvanandel.com>
* feat: block pending meetings for requires confirmation
* add i18n
* fix:typecheck
* fix(requires-confirmation-block): Fixes type error
* fix(requires-confirmation-block): Fixes type error
* Tweak to set BookingWhereInput as the explicit type instead of as
* fix: type error
---------
Co-authored-by: Alex van Andel <me@alexvanandel.com>
* feat: Add rescheduledBy & canceledBy fields in the DB
* fix: type check
* fix: type check
* fix: use session user email for reschedule
* fix: unit test
* feat: db field email validation
* feat: rescheduledBy and cancelledBy in webhooks
* revert unrelated changes.
* make session user secondary, default to Anonymous
* if condition not required
* Make cancelledBy optional
Co-authored-by: Syed Ali Shahbaz <52925846+alishaz-polymath@users.noreply.github.com>
* update cancel booking type
* fix: update cancelledBy in db when requesting reschedule
* remove default value for fields
* fix: type check
* feat: manage fields via api v1
* fix: add fields in booking read api v1
* test: expand to cover new fields
* fix: use cancelledBy param on booking page
---------
Co-authored-by: Anik Dhabal Babu <81948346+anikdhabal@users.noreply.github.com>
Co-authored-by: Syed Ali Shahbaz <52925846+alishaz-polymath@users.noreply.github.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
* WIP
* add frontend
* backend to update weight
* UI improvements
* WIP weight algorithm
* enable weights switch + algorithm improvements
* fix weightDescription
* clean up code
* remove OOOEntryHost from schema.prisma
* implement logic (not yet tested)
* add tests for weight algorithm
* add test with weight adjustment
* finish unit tests
* fix type error
* fix type error
* add migration
* fix type error
* fix event type update handler
* fix failing test
* UI fixes for saving hosts
* make sure weightAdjustment is not lost on host changes
* fix weightadjustment for new hosts
* add weightAdjustment to availableUsers
* fix type errors
* fix default value for weight
* make weight and weightAdjustment optional
* fix type errors from schema changes
* type fix
* clean up code
* improve comments
* remove comment
* clean up code
* add tests & weight adjustment improvments
* better variable naming
* fixes for weight adjustments
* make weightAdjustments proportional to weights
* fix previous host weight adjustments
* improved tests for weight adjustments
* save weight and priority + sort hosts correctly
* fix type error
* code clean up
* remove console.log
* use BookingRepository to fetch bookings of users
* use BookingRepository to fetch bookings in getLuckyUser
* fix type errors
* fix weightAdjustment if changed from fixed to rr host
* disable weights when 'assign all' is enabled
* typo
* allow 0 weight
* set min (and max) for weight and priority
* use useWatch
* code clean up
* fix type error
* only count accepted bookings for RR
* fix type error
* improve data fetching of bookings
* only filter bookings of availableUsers
* code clean up form feedback
* fix tests
* don't count no show bookings
* code clean up
* choose user with highest weight
* use one reduce instead of two
* use reduce instead of filter and map
* don't show weights toggle when 'assign all' is enabled
* design fixes
* fix type errors
* fix: type check
* Update packages/features/eventtypes/components/AddMembersWithSwitch.tsx
---------
Co-authored-by: CarinaWolli <wollencarina@gmail.com>
Co-authored-by: Alex van Andel <me@alexvanandel.com>
* feat: provide option to allow rescheduling with the same round-robin
host
* update
* fix type error
* fix and update
* fix type error
* update
* remove
* Update getEventTypesFromDB.ts
* add test
* small fix
* fix requested changes
* remove event type requires confirmation
* allow sms sending also for team (frontend)
* allow text to attendee for team (backend)
* add rate limiting for SMS (WIP)
* add functionality to lock and unlock SMS sending (+admin UI view)
* rename to smsLockState
* add ability to lock users and teams
* don't send sms if locked
* add missing imports
* fix rate limit namespace
* add translation
* fix type error
* remove prop from UsersTable
* add smsLockState to buildUser
* code clean up
* create seperate sms rate limit function
* fix type error
* add missing userId and teamId to sendSMS
* code improvements
* add User Team type
* fix marking as reviewed
* check monthly sms limit only for user
* don't lock orgs
* fix type error
* fix avatars
* fix type error
* fix type error
* fix type error
---------
Co-authored-by: CarinaWolli <wollencarina@gmail.com>
Co-authored-by: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com>
Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
* chore: Remove all avatar/logo references
* Updated user profile to only use avatarUrl
* fix: minor style issue
* chore: Remove redundant includeTeamLogo
* fix: Use right avatar default in event type list
* fix: placeholder avatar team profile, target
* chore: Add logoUrl/avatarUrl to JWT
* fix: Bunch of org avatar issues, fix members list
* Fix logoUrl on org pages
* More type fixes
* Hopefully final type fixes
* Another round of type fixes
* fix: UserForm ts
* fix: Handle as return types, not input types
* fix: Remove profile and add avatarUrl
* fix: notFound as const
* fix: Seeder avatarUrl params
* revert: Migration changes for easier recovery
* fix: Add explicit type to builder as avatar is now set
* Add logoUrl to unpublished entity
* Avatar test out of scope here
* fix: Use the new avatarUrl after save
* chore: Removed getOrgAvatarUrl/getTeamAvatarUrl
* fix: Update sidebar image immediately after change
* Unable to safe unnamed user, so default
* fix: Unpublished page, add organization test
* Add more tests
* feat: add isPlatformManaged property to user
* do not allow deleting non managed users
* refactor: rename managed user create and update inputs
* refactor response code
* feat: add isPlatformManaged when creating managed user
* fix TS
* db migration
* adjusted ui to include `platform` in dropdown for admin webhooks
* adjusted webhook/create.handler for platform
* adjusted `edit.handler` so that only ADMIN can update `platform` webhooks
* update `getWebhooks` for platform wide webhooks
* list platform webhooks if admin
* createFunction refactor
* update subscriberUrlReserved for platform webhooks
* fix delete webhook handler
* fix: added readOnly to WebhookListItem
* fix: admin cannot delete its own webhooks
* fix: ts error
---------
Co-authored-by: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com>
* Implement secondary email
* Fix already existing tests failing
* Added tests for secondary email feature
* Skip email verification if user is changing the primary email to a verified secondary email
* Fix type errors in tests
* Fix email becoming unverified when switched between primary and secondary email
* Added a check to prevent prisma error from throwing up due to duplicate records
* Improved error handling when adding a secondary email
* Add test for resend verification email flow for secondary emails and validation of invite link
* Add a new column to link secondary emails with verification tokens
* Fix failing to update email to an unverified secondary email of the same user
* Fix failing tests
* Change text of resend verification email
* Add ability to use the verified secondary emails to get the event details to
* Fix type errors
* Fix failing e2e tests
* Fix failing unit tests
* Fix failing type checks
* Fix secondary verification email subject
* Fix failing e2e tests
---------
Co-authored-by: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
* fix: Prevent duplicate bookings with idempotency key
* Add idempotencyKey to builder.ts type fix
* Add tests for new idempotency key (booking create)
* Add endTime to idempotency key, it should be possible to book different durations
* Move reschedule before the create so the idempotency key is unset
* feat(db): add new col: user appTheme
* feat(event-types page): apply appTheme color
* add appTheme for trpc
* feat: mutate main page theme
* feat: add english translation for app theme update section
* modify keys in common (en)
* add woring
* Revert yarn.lock to its state before unintended changes
* feat(i18n): add back the i18n string (for dark/light mode switching)
* refactor: refactor ThemeLabel
* fix: add new user field "appTheme" to test files
* chore: modify TODO comment
* chore: update common.json (en) for "theme"
since we had appTheme now, I think it's better to update the wording here to avoid confusion
* fix: update button's data-testid to fix e2e test error
* chore: remove comment
* fix: fix brand-color-not-apply bug
* solve type error
* fix: fix type error
* fix: use correct storageKey for booker / dashboard
* fix: tidy up
* fix: skeleton
---------
Co-authored-by: swh00tw <a6140000@gmail.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: Keith Williams <keithwillcode@gmail.com>
Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
Co-authored-by: Udit Takkar <udit222001@gmail.com>