* feat(web): improve session retrieval performance
Switch to using `getServerSession` which avoids a HTTP round trip to retrieve session details.
Additionally, migrate deprecated `app/lib/auth` calls to to `@calcom/lib` package.
* fix: update failing test and lint
* Consolidates auth code in features
* Update yarn.lock
* Update packages/trpc/server/createContext.ts
* Oopsie
---------
Co-authored-by: zomars <zomars@me.com>
* WIP
* Create Booking Questions builder
* Renaming things
* wip
* wip
* Implement Add Guests and other fixes
* Fixes after testing
* Fix wrong status code 404
* Fixes
* Lint fixes
* Self review comments addressed
* More self review comments addressed
* Feedback from zomars
* BugFixes after testing
* More fixes discovered during review
* Update packages/lib/hooks/useHasPaidPlan.ts
Co-authored-by: Omar López <zomars@me.com>
* More fixes discovered during review
* Update packages/ui/components/form/inputs/Input.tsx
Co-authored-by: Omar López <zomars@me.com>
* More fixes discovered during review
* Update packages/features/bookings/lib/getBookingFields.ts
Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com>
* More PR review fixes
* Hide label using labelSrOnly
* Fix Carinas feedback and implement 2 workflows thingy
* Misc fixes
* Fixes from Loom comments and PR
* Fix a lint errr
* Fix cancellation reason
* Fix regression in edit due to name conflict check
* Update packages/features/form-builder/FormBuilder.tsx
Co-authored-by: Carina Wollendorfer <30310907+CarinaWolli@users.noreply.github.com>
* Fix options not set when default value is used
* Restoring reqBody to avoid uneeded conflicts with main
* Type fix
* Update apps/web/components/booking/pages/BookingPage.tsx
Co-authored-by: Omar López <zomars@me.com>
* Update packages/features/form-builder/FormBuilder.tsx
Co-authored-by: Omar López <zomars@me.com>
* Update apps/web/components/booking/pages/BookingPage.tsx
Co-authored-by: Omar López <zomars@me.com>
* Apply suggestions from code review
Co-authored-by: Omar López <zomars@me.com>
* Show fields but mark them disabled
* Apply suggestions from code review
Co-authored-by: Omar López <zomars@me.com>
* More comments
* Fix booking success page crash when a booking doesnt have newly added required fields response
* Dark theme asterisk not visible
* Make location required in zodSchema as was there in production
* Linting
* Remove _metadata.ts files for apps that have config.json
* Revert "Remove _metadata.ts files for apps that have config.json"
This reverts commit d79bdd336c.
* Fix lint error
* Fix missing condition for samlSPConfig
* Delete unexpectedly added file
* yarn.lock change not required
* fix types
* Make checkboxes rounded
* Fix defaultLabel being stored as label due to SSR rendering
* Shaved 16kb from booking page
* Explicit types for profile
* Show payment value only if price is greater than 0
* Fix type error
* Add back inferred types as they are failing
* Fix duplicate label on number
---------
Co-authored-by: zomars <zomars@me.com>
Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com>
Co-authored-by: Carina Wollendorfer <30310907+CarinaWolli@users.noreply.github.com>
Co-authored-by: Efraín Rochín <roae.85@gmail.com>
* Moved booking logic to calcom/features
Needed to reuse on public API
* Type fixes
* Cleanup
* Cleanup
* Cleanup
* Restored still needed V1 pages
This reverts commit 790a304a6a.
Co-authored-by: Alex van Andel <me@alexvanandel.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>
* fix: pass recurring count value
* fix: show dates for pending booking
* Restoring recurringEventId on reschedule
* Reverting other changes from a different PR
Co-authored-by: Udit Takkar <udit.07814802719@cse.mait.ac.in>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: Alex van Andel <me@alexvanandel.com>
* add new trigger with first simple job scheduling
* fix DB update
* use array to save scheduled jobs in booking
* cancel scheduled jobs when zap disabled or zapier disconnected
* schedule jobs only for confirmed bookings
* schedule jobs for already existing bookings
* fix bug to create workflow reminders when confirming recurring events
* delete remove all zapier webhooks when api key is deleted
* schedule job for all confirmed recurring bookings
* fix zapier trigger and workflow reminders when cancelling recurring events
* code clean up
* code clean up
* add migration
* add type package for node-schedule
* remove nodescheduler
* add updated nodescheduler
* move code to app-store
* add meeting ended to webhook constants
* udpate zapier README.md
* implement QA suggestions
* add default handler and fix imports
* Type fix
Co-authored-by: CarinaWolli <wollencarina@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: Omar López <zomars@me.com>
* 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
* -re init dynamic links
* typing fix 001
* added missing div closing tag
* added necessary DB column pull to satisfy Type errors
* further type fixes
* WIP
* removed console logs
* some revert
* WIP
* another approach
* enabled dynamic links availability fetch
* Added users to eventTypeObject for consistency
* WIP: Moving user and changing map item name
* Fix user list call
* Removed explicit User type in map
* modify default user attributes
* adds explicit users to EventTypeObject in teams
* Updated availability page
* Updates Availability
* Futher availability change
* Remove explicit user type from slot router
* more fixes
* more fixes WIP
* cleaning up more errors WIP
* object assign used for typesafety
* added check if dynamic booking is allowed by all users
* cleaned up console logs
* clean up
* Improvement
* resolving suggestions by alex
* changes requested by Omar
* Filter out empty usernames instead of accepting null
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: zomars <zomars@me.com>
* Fix bug for reschedule on opt-in bookings
* Fix a missing query parameter being removed when changing month, useRouterQuery
* Added test for rescheduling user type condition
* Fix conditional that triggers input disabling when rescheduling
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: Bailey Pumfleet <pumfleet@hey.com>
* build basic database structure and basic design
* create simple workflow list
* add editing dots to list
* add mutation to create workflows
* add createMutation on submit + redirect to editing page
* redirect to edit page when clicking on row
* add functionality to delete workflow
* add timeUnit + input validation
* add empty screen view
* add time before it triggers to description
* add multi select with checkboxes
* remove getServerSideProps
* set default time period to 24
* fetch eventypes and display in dropdown
* add functionality to update workflows + many-to-many relationship
* fix all checked event types
* add SMS reminders
* fix bug with trigger + relocate sms template
* clean code
* add model for unscheduled reminders
* fix selected eventTypes
* fixing value to show how many event types selected
* fix plural of event types in select
* add onDelete cascade for all relations
* fix errors
* add functionality to send SMS to specific number
* fix type error for timeUnit
* set default value for time unit + fix type issues
* remove console.logs
* fix error in checking if scheduled date is more than 1h in advance
* fix build errors
* add migration for workflows
* add basic UI for editing workflow steps
* add formSchema
* improve functionality to update a step
* remove console logs
* fix issue with active event types
* allow null value for time and timeUnit
* sort steps asc step number
* add action to workflow (frontend)
* add phone number input for SMS to specific number
* use PhoneInput for number input + input validation
* improve invalid input for phone number
* improve UI of phoneInput
* Improve design and validation
* fix undefined error
* set default action when adding action
* include all team event types
* fix phone number input for editing steps
* fix update muation to add steps
* remove console logs
* fix order of steps
* functionality to delete steps
* add trigger when event is cancelled
* add custom email body
* sms and email reminder updates
* add custom emails
* add custom email subject
* send reminder email to all attendees
* update migration
* fix default value for time and timeUnit
* save email reminders to database
* clean code
* add custom template to SMS actions
* schedule emails with sendgrid
* clean code
* add workflow templates
* keep custom template saved when changing templates
* create reminder template for email
* add dot at the end of sentace for email template
* fix merge error
* fix issue that template was not saved
* include sending emails for when event is cancelled
* fix bug that email was always sent
* add templates to sms reminders
* add info that sending sms to attendees won't trigger for already exisitng bookings
* only schedule sms for attendees when smsReminderNumber exists
* only schedule sms for attendees when smsReminderNumber exists
* set scheduled of workflow reminder to false when longer than 72 hours
* add cron for email scheduling + fixes for for sms an email scheduling
* adjust step number when deleting a step
* cast to boolean with !!
* update cron job for email reminders
* update sms template
* send reminder email not to guests
* remove sendTo from workflow reminder
* fixes sending sms without name + removing sendTo everywhere
* fix undefined name in sms template
* set user name to undefined for sending sms to a specific number
* fix singular and plural for time unit
* set to edit mode when changing action and custom template is selected
* delete reminders when booking cancelled or not active anymore
* fix type errors
* fix error that deleted reminders twice
* create booking reminders for existing bookings when eventType is set active
* improve email and sms templates
* use BookingInfo type instead of calendarEvent for reminder emails
* schedule emails for already existing bookings
* add and remove reminders for new active event types and cancelled events
* connect add action button with last step
* fix step container width for mobile view
* helper functions that return options for select
* fix typo and remove comment
* clean code
* add/improve error messages for forms
* fix typo
* clean code
* improve email template
* clean code
* fix missing prop
* save reference id when scheduling reminder
* fix step not added because of changed id for new steps
* small fixes + code cleanup
* code cleanup
* show error message when number is invalid
* fix typo
* fix phone number input when location is already phone
* set multi select checkbox to read only
* change email scheduling in cron job from 7 days to 72 hours
* show active event types in workflow list
* fix trigger information for workflow list
* improve layout for small screens in workflow list
* remove optional from zod type for workflow name
* order workflows by id
* use link icon to show active event types
* fix plural and add translation for showing nr of active eventtypes
* fix text for sms reminder template
* add reminders for added steps
* remove optional for activeOn
* improve reminder templates
* improve design of custom input fields
* set edit mode to false when phone number isn't needed anymore
* set sendTo in workflow step only for SMS_NUMBER action
* set email body and subject only when custom template
* only delete reminders that belong to workflow steps
* improve text for new event book trigger
* move reminders folder to workflows
* fix issue that save button was sometimes enabled in edit mode
* fix form issues for send to
* delete all scheduled reminders when workflow is deleted
* use enum for method
* fix imports for workflow methods
* add missing import
* fix edit mode
* create reminders when event is confirmed
* add reminderScheduler to reduce duplicate code
* make workflow enterprise and pro only feature
* move all files to /ee/ folder
* move package.json change to /ee/ folder
* add pro badge to shell
* set to edit mode to true if email subject is missing when action changes
* fix loading bug
* add migration
* fix old imports
* don't schedule reminders for opt-ins
* fix style of email body
* code clean up
* Update yarn.lock
* fix isLoading for active on dropdown
* update import for prisma
Co-authored-by: Omar López <zomars@me.com>
* update imports
* remove console
* use session to check if user has valid license
* use defaultHandler
* clean up code
* Create db-staging-snapshot.yml
* move LisenceRequired inside shell
* update import for FormValues
* fix phone input design
* fix disabled save button for edit mode
* squah all migration into a single one
* use isAfter and isBefore instead of isBetween
* import dayjs from @calcom
* validate phone number for sms reminders when booking event
* Allows auto approvals for crowdin
Co-authored-by: CarinaWolli <wollencarina@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: zomars <zomars@me.com>
* As Google Meet is always installed, this fixes the doubling
* Make entire Google link clickable, fix extraData
* Attempt at type fixing :)
* AdditionalInformation for the booking page?
* Update packages/emails/src/components/LocationInfo.tsx
Being explicit :)
* Exclude AdditionalInformation as it is irrelevant here
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: Omar López <zomars@me.com>
* Extracted UI related logic on the DatePicker, stripped out all logic
* wip
* fixed small regression due to merge
* Fix alignment of the chevrons
* Added isToday dot, added onMonthChange so we can fetch this month slots
* Added includedDates to inverse excludedDates
* removed trpcState
* Improvements to the state
* All params are now dynamic
* This builds the flat map so not all paths block on every new build
* Added requiresConfirmation
* Correctly take into account getFilteredTimes to make the calendar function
* Rewritten team availability, seems to work
* Circumvent i18n flicker by showing the loader instead
* 'You can remove this code. Its not being used now' - Hariom
* Nailed a persistent little bug, new Date() caused the current day to flicker on and off
* TS fixes
* Fix some eventType details in AvailableTimes
* '5 / 6 Seats Available' instead of '6 / Seats Available'
* More type fixes
* Removed unrelated merge artifact
* Use WEBAPP_URL instead of hardcoded
* Next round of TS fixes
* I believe this was mistyped
* Temporarily disabled rescheduling 'this is when you originally scheduled', so removed dep
* Sorting some dead code
* This page has a lot of red, not all related to this PR
* A PR to your PR (#3067)
* Cleanup
* Cleanup
* Uses zod to parse params
* Type fixes
* Fixes ISR
* E2E fixes
* Disabled dynamic bookings until post v1.7
* More test fixes
* Fixed border position (transparent border) to prevent dot from jumping - and possibly fix spacing
* Disabled style nitpicks
* Delete useSlots.ts
Removed early design artifact
* Unlock DatePicker locale
* Adds mini spinner to DatePicker
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: zomars <zomars@me.com>
* 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>