* Add payment option to schema
* Add payment option to Stripe zod
* Set payment option on event type
* Create manual payment intent in Stripe
* Set payment option from Stripe app
* Add payment option to DB
* Pass React.ReactNode to checkbox
* Create uncaptured payment intent
* WIP
* Capture card in setup intent
* Show charge card option
* Charge card from booking page
* Bug fixes
* Clean up
* Clean up app card
* Add no-show fee messaging on booking page
* Send payment email on payment & add price
* Fix messaging
* Create no show fee charged email
* Send charge fee collected email
* Disable submit on card failure
* Clean up
* Serverside prevent charging card again if already charged
* Only confirm booking if paid for
* Type fixes
* More type fixes
* More type fixes
* Type fix
* Type fixes
* UI changes
* Payment component rework
* Update apps/web/public/static/locales/en/common.json
Co-authored-by: Alex van Andel <me@alexvanandel.com>
* Update apps/web/public/static/locales/en/common.json
Co-authored-by: Alex van Andel <me@alexvanandel.com>
* Update apps/web/components/dialog/ChargeCardDialog.tsx
Co-authored-by: Alex van Andel <me@alexvanandel.com>
* Update packages/trpc/server/routers/viewer/payments.tsx
Co-authored-by: Alex van Andel <me@alexvanandel.com>
* Revert GTM config
* Adjust payment option dropdown
* Show alert when seats are set
* Small bug fixes
* Create collect card method
* clean up
* Prevent seats & charge no-show fee to be enabled together
* Do not charge no-show fee on unconfirmed bookings
* Add check to collect card method
* Webhook send request emails
* Fix some dark mode colours
* Change awaiting payment language
* Type fixes
* Set height of Select and TextField both to 38px to fix alignment
* Fix message seats & payment error message
* Type fix
* Remove Intl.Provider
* Add percentFeePercentage
* WIP
* Use i18n language
* Type fix
---------
Co-authored-by: Alex van Andel <me@alexvanandel.com>
Co-authored-by: Omar López <zomars@me.com>
* Reserving slot picked up on cache
* change memory-cache to database table to block slots while reservation completes
* remove memory-cache
* update realeaseAt field when same user change te selected Slot
* Change default time to book
Co-authored-by: alannnc <alannnc@gmail.com>
* remove ip field and renews the session when the user remains in the booking form
* Remove duplicate router
* types fixes
* nit picks
* Update turbo.json
* Revert unrelated change
* Uses constant
* Constant already has a fallback
* Update slots.ts
* Unit test fixes
* slot reservation on user level and support seats
* types fixes and reserve slots on click
* Fix nit var name
---------
Co-authored-by: Efraín Rochín <roae.85@gmail.com>
Co-authored-by: zomars <zomars@me.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
* migrate from react-icons to lucide-react
* replace react-icon with lucide-dev: Webhook Icon
* add lucide transformer
* Fix LinkIcon import
* Update yarn.lock to include monorepo deps
* Migrated icons in ChargeCardDialog
* Port Storybook to new icons as well
* Adjust Info & Globe icons size to match react-icons size
---------
Co-authored-by: Alex van Andel <me@alexvanandel.com>
* Add payment option to schema
* Add payment option to Stripe zod
* Set payment option on event type
* Create manual payment intent in Stripe
* Set payment option from Stripe app
* Add payment option to DB
* Pass React.ReactNode to checkbox
* Create uncaptured payment intent
* WIP
* Capture card in setup intent
* Show charge card option
* Charge card from booking page
* Bug fixes
* Clean up
* Clean up app card
* Add no-show fee messaging on booking page
* Send payment email on payment & add price
* Fix messaging
* Create no show fee charged email
* Send charge fee collected email
* Disable submit on card failure
* Clean up
* Serverside prevent charging card again if already charged
* Only confirm booking if paid for
* Type fixes
* More type fixes
* More type fixes
* Type fix
* Type fixes
* UI changes
* Payment component rework
* Update apps/web/public/static/locales/en/common.json
Co-authored-by: Alex van Andel <me@alexvanandel.com>
* Update apps/web/public/static/locales/en/common.json
Co-authored-by: Alex van Andel <me@alexvanandel.com>
* Update apps/web/components/dialog/ChargeCardDialog.tsx
Co-authored-by: Alex van Andel <me@alexvanandel.com>
* Update packages/trpc/server/routers/viewer/payments.tsx
Co-authored-by: Alex van Andel <me@alexvanandel.com>
* Revert GTM config
* Adjust payment option dropdown
* Show alert when seats are set
* Small bug fixes
* Create collect card method
* clean up
* Prevent seats & charge no-show fee to be enabled together
* Do not charge no-show fee on unconfirmed bookings
* Add check to collect card method
* Webhook send request emails
* Fix some dark mode colours
* Change awaiting payment language
* Type fixes
* Set height of Select and TextField both to 38px to fix alignment
* Fix message seats & payment error message
* Type fix
---------
Co-authored-by: Alex van Andel <me@alexvanandel.com>
* deleted orignal booking and fix open seats number on booking page
* fix type error
* Adjust tests
* fix type error
* include fix in e2e test
* fix e2e test
* fixes e2e test
* fix type error in e2e test
* increase timeout time
---------
Co-authored-by: CarinaWolli <wollencarina@gmail.com>
Co-authored-by: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com>
Co-authored-by: Joe Au-Yeung <j.auyeung419@gmail.com>
* Checking package size effects when we remove zod from middleware
* Remove 'crypto' from client code
* Revert "Checking package size effects when we remove zod from middleware"
This reverts commit ecc2038411.
* Adding lodash to dynamicImports + consistent imports
* Remove the locales from the global Dayjs object
* amend logic to calculate DST time on buildSlots
* send start and end date in UTC
* port the logic to calc DST from buildSlots to inWithinAvailableHours
* feat: update badge component
* fix: use the camel cased startIcon prop
* fix: reschedule request badge
* fix: use the camel cased startIcon prop
* fix: remove bold prop
* Removed extra whitespace in HTML
---------
Co-authored-by: Keith Williams <keithwillcode@gmail.com>
* WIP-already-reschedule-success-emails-missing
* WIP now saving bookingSeatsReferences and identifyin on reschedule/book page
* Remove logs and created test
* WIP saving progress
* Select second slot to pass test
* Delete attendee from event
* Clean up
* Update with main changes
* Fix emails not being sent
* Changed test end url from success to booking
* Remove unused pkg
* Fix new booking reschedule
* remove log
* Renable test
* remove unused pkg
* rename table name
* review changes
* Fix and and other test to reschedule with seats
* Fix api for cancel booking
* Typings
* Update [uid].tsx
* Abstracted common pattern
into maybeGetBookingUidFromSeat
* Reverts
* Nitpicks
* Update handleCancelBooking.ts
* Adds missing cascades
* Improve booking seats changes (#6858)
* Create sendCancelledSeatEmails
* Draft attendee cancelled seat email
* Send no longer attendee email to attendee
* Send email to organizer when attendee cancels
* Pass cloned event data to emails
* Send booked email for first seat
* Add seat reference uid from email link
* Query for seatReferenceUId and add to cancel & reschedule links
* WIP
* Display proper attendee when rescheduling seats
* Remove console.logs
* Only check for already invited when not rescheduling
* WIP sending reschedule email to just single attendee and owner
* Merge branch 'main' into send-email-on-seats-attendee-changes
* Remove console.logs
* Add cloned event to seat emails
* Do not show manage link for calendar event
* First seat, have both attendees on calendar
* WIP refactor booking seats reschedule logic
* WIP Refactor handleSeats
* Change relation of attendee & seat reference to a one-to-one
* Migration with relationship change
* Booking page handling unique seat references
* Abstract to handleSeats
* Remove console.logs and clean up
* New migration file, delete on cascade
* Check if attendee is already a part of the booking
* Move deleting booking logic to `handleSeats`
* When owner reschedule, move whole booking
* Prevent owner from rescheduling if not enough seats
* Add owner reschedule
* Send reschedule email when moving to new timeslot
* Add event data to reschedule email for seats
* Remove DB changes from event manager
* When a booking has no attendees then delete
* Update calendar when merging bookings
* Move both attendees and seat references when merging
* Remove guest list from seats booking page
* Update original booking when moving an attendee
* Delete calendar and video events if no more attendees
* Update or delete integrations when attendees cancel
* Show no longer attendee if a single attendee cancels
* Change booking to accepted if an attendee books on an empty booking
* If booking in same slot then just return the booking
* Clean up
* Clean up
* Remove booking select
* Typos
---------
Co-authored-by: zomars <zomars@me.com>
* Fix migration table name
* Add missing trpc import
* Rename bookingSeatReferences to bookingSeat
* Change relationship between Attendee & BookingSeat to one to one
* Fix some merge conflicts
* Minor merge artifact fixup
* Add the right 'Person' type
* Check on email, less (although still) editable than name
* Removed calEvent.attendeeUniqueId
* rename referenceUId -> referenceUid
* Squashes migrations
* Run cached installs
Should still be faster. Ensures prisma client is up to date.
* Solve attendee form on booking page
* Remove unused code
* Some type fixes
* Squash migrations
* Type fixes
* Fix for reschedule/[uid] redirect
* Fix e2e test
* Solve double declaration of host
* Solve lint errors
* Drop constraint only if exists
* Renamed UId to Uid
* Explicit vs. implicit
* Attempt to work around text flakiness by adding a little break between animations
* Various bugfixes
* Persistently apply seatReferenceUid (#7545)
* Persistently apply seatReferenceUid
* Small ts fix
* Setup guards correctly
* Type fixes
* Fix render 0 in conditional
* Test refactoring
* Fix type on handleSeats
* Fix handle seats conditional
* Fix type inference
* Update packages/features/bookings/lib/handleNewBooking.ts
* Update apps/web/components/booking/pages/BookingPage.tsx
* Fix type and missing logic for reschedule
* Fix delete of calendar event and booking
* Add handleSeats return type
* Fix seats booking creation
* Fall through normal booking for initial booking, handleSeats for secondary/reschedule
* Simplification of fetching booking
* Enable seats for round-robin events
* A lot harder than I expected
* ignore-owner-if-seat-reference-given
* Return seatReferenceUid when second seat
* negate userIsOwner
* Fix booking seats with a link without bookingUid
* Needed a time check otherwise the attendee will be in the older booking
* Can't open dialog twice in test..
* Allow passing the booking ID from the server
* Fixed isCancelled check, fixed test
* Delete through cascade instead of multiple deletes
---------
Co-authored-by: Joe Au-Yeung <j.auyeung419@gmail.com>
Co-authored-by: Peer Richelsen <peer@cal.com>
Co-authored-by: zomars <zomars@me.com>
Co-authored-by: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com>
Co-authored-by: Alex van Andel <me@alexvanandel.com>
Co-authored-by: Efraín Rochín <roae.85@gmail.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: Alex van Andel <me@alexvanandel.com>
Co-authored-by: Keith Williams <keithwillcode@gmail.com>
Root cause of the error is that both server and client try to parse date differently due to localStorage. Since server does not know localStorage when render initial HTML it renders page as if there is no value set for time format.
On the other hand, client side know the value of time format when it tries to render.
To fix the issue, we force it to parse date with default format at the initial rendering time.
- Add `withDefaultTimeFormat` argument to `parseDate` function
- Add `withDefaultTimeFormat` argument to `parseRecurringDates` function
- Leverage useEffect to dynamically update `withDefaultTimeFormat` arg passed to function
Co-authored-by: sangboak.lee <sangboak.lee@woowahan.com>
Co-authored-by: zomars <zomars@me.com>
* new error for no available user
* Added cursor-pointer & extra whitespace before 'go back.'
---------
Co-authored-by: Alex van Andel <me@alexvanandel.com>
* fix: event location not translated
* fix: translate
* chore: lowercase trans keys
* fix: label
* feat: snake case labels
* fix: show the link if the user has one
* fix: add translatable keys
* fix:
* chore: fix type error
---------
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
Co-authored-by: Efraín Rochín <roae.85@gmail.com>
Co-authored-by: Alex van Andel <me@alexvanandel.com>
* use the organizer timezone and invitee timezone to show slots
* type fixes
* set start date on selected TZ on booking payload
* add considerations when only the invitee is on DTS
* Apply suggestions from code review
Co-authored-by: alannnc <alannnc@gmail.com>
Co-authored-by: Omar López <zomars@me.com>
* fixes typo
* Apply suggestions from code review
Co-authored-by: alannnc <alannnc@gmail.com>
* cleaning
---------
Co-authored-by: Alex van Andel <me@alexvanandel.com>
Co-authored-by: Omar López <zomars@me.com>
Co-authored-by: alannnc <alannnc@gmail.com>