Commit Graph

66 Commits

Author SHA1 Message Date
Alex Johansson 05fa1feab0
Migrate availability schedule for everyone (#1179)
* wip

* tmp mig

* add cron api key to header

* feels safer

* Revert "wip"

This reverts commit 15a8358661.

* test

* add name

* normalize dates

* maybe works

* test

* fixz

* maybe fix ci

* deprecated

* step 1 -- raw sql

* seems to work

* migration seems to work

* br

* fix comment

* timouet

* disconnect prisma test

* test order

* maybs

* seems to work

* tz

* tweak

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: Alex van Andel <me@alexvanandel.com>
2021-12-08 12:08:57 +00:00
Alex van Andel 5b3dd02747
Webhook tweaks + Support added for "Custom payload templates" / x-www-form-urlencoded / json (#1193)
* Changed styling of webhook test & updated <Form> component

* Implements custom webhook formats

Co-authored-by: Bailey Pumfleet <pumfleet@hey.com>
2021-11-22 11:37:07 +00:00
Alex van Andel ffdf0b9217
Fixes user availability to be contextual to the user timezone (#1166)
* WIP, WIP, WIP, WIP

* Adds missing types

* Type fixes for useSlots

* Type fixes

* Fixes periodType 500 error when updating

* Adds missing dayjs plugin and type fixes

* An attempt was made to fix tests

* Save work in progress

* Added UTC overflow to days

* Update lib/availability.ts

Co-authored-by: Alex Johansson <alexander@n1s.se>

* No more magic numbers

* Fixed slots.test & added getWorkingHours.test

* Tests pass, simpler logic, profit?

* Timezone shifting!

* Forgot to unskip tests

* Updated the user page

* Added American seed user, some fixes

* tmp fix so to continue testing availability

* Removed timeZone parameter, fix defaultValue auto-scroll

Co-authored-by: Omar López <zomars@me.com>
Co-authored-by: Alex Johansson <alexander@n1s.se>
2021-11-18 01:03:19 +00:00
Syed Ali Shahbaz 4e01b13133
Feature/cal 677 brand color in settingsprofile (#1158)
* added CSS variable --brand-color

* added CustomBranding component

* prisma update for brand color

* added brandcolor to user context in viewer.me

* conflict resolution

* added brandColor input and mutation

* custom brand color to availability

* brandColor added to BookingPage

* fixed availability, booking for team and added customBranding to success

* brandColor added to cancel/uid

* requested changes

* lint fix

* further changes

* lint fix
2021-11-16 14:21:46 +05:30
Bailey Pumfleet 6b171a6f87
Manually reorder event types (#1142)
* Add event type reordering

* Add migration for position field

* hack on a hack

* can edit

* fix ordering

* Remove console.log

Co-authored-by: Alex Johansson <alexander@n1s.se>

Co-authored-by: KATT <alexander@n1s.se>
2021-11-15 12:25:49 +00:00
Alex van Andel 8664d217c9
Feature/availability page revamp (#1032)
* Refactored Schedule component

* Merge branch 'main' into feature/availability-page-revamp

* wip

* Turned value into number, many other TS tweaks

* NodeJS 16x works 100% on my local, but out of scope for this already massive PR

* Fixed TS errors in viewer.tsx and schedule/index.ts

* Reverted next.config.js

* Fixed minor remnant from moving types to @lib/types

* schema comment

* some changes to form handling

* add comments

* Turned ConfigType into number; which seems to be the value preferred by tRPC

* Fixed localized time display during onboarding

* Update components/ui/form/Schedule.tsx

Co-authored-by: Alex Johansson <alexander@n1s.se>

* Added showToast to indicate save success

* Converted number to Date, and also always establish time based on current date

* prevent height flickering of availability

by removing mb-2 of input field

* availabilty: re-added mb-2 but added min-height

* Quite a few bugs discovered, but this seems functional

Co-authored-by: KATT <alexander@n1s.se>
Co-authored-by: Bailey Pumfleet <pumfleet@hey.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
2021-11-10 11:16:32 +00:00
Omar López cc25a772a1
Adds missing webhook user relationship (#1070) 2021-10-29 08:13:51 -06:00
Omar López a73187d46b
Makes fields with default values not null (#903)
* Makes fields with default values non-optional

* Removes PeriodType enum for now

* Adds missing migrations

Co-authored-by: Bailey Pumfleet <pumfleet@hey.com>
2021-10-12 11:09:39 +01:00
Alex Johansson 0927b86831
Revert "Makes fields with default values non-optional (#892)" (#899)
This reverts commit bcf20914d3.
2021-10-11 10:30:09 +01:00
Omar López bcf20914d3
Makes fields with default values non-optional (#892) 2021-10-10 17:48:21 +00:00
Lola adee3fd211
Daily video calls (#542)
* ⬆️ Bump tailwindcss from 2.2.14 to 2.2.15

Bumps [tailwindcss](https://github.com/tailwindlabs/tailwindcss) from 2.2.14 to 2.2.15.
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/compare/v2.2.14...v2.2.15)

---
updated-dependencies:
- dependency-name: tailwindcss
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* updating cal will provide a zoom meeting url

* updating cal will provide a zoom meeting url

* modifying how daily emails send

* modifying how daily emails send

* daily table

* migration updates

* daily table

* rebasing updates

* updating Daily references to a new table

* updating internal notes

* merge updates, adding Daily references to book/events.ts

* updated video email templates to remove Daily specific references

* updating the events.ts and refactoring in the event manager

* removing the package-lock

* changing calendso video powered by Daily.co to cal video powered by Daily.co

* updating some of the internal Daily notes

* added a modal for when the call/ link is invalid

* removing handle errors raw from the Daily video client

* prettier formatting fixes

* Added the Daily location to calendar events and updated Cal video references to Daily.co video

* updating references to create in event manager to check for Daily video

* fixing spacing on the cancel booking modal and adding Daily references in the event manager

* formatting fixes

* updating the readme file

* adding a daily interface in the event manager

* adding daily to the location labels

* added a note to cal event parser

* resolving yarn merge conflicts

* updating dailyReturn to DailyReturnType

* removing prettier auto and refactoring integrations: daily in the event manager

* removing changes to estlintrc.json

* updating read me formatting

* indent space for Daily ReadMe section

* resolving the merge conflicts in the yarn file

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Lola-Ojabowale <lola.ojabowale@gmail.com>
2021-10-07 17:12:39 +01:00
Omar López 30f97117e8
Revert "Revert "Feature/cal 274 add webhooks (#628)" (#854)" (#876)
This reverts commit 6868474c92.

Co-authored-by: Bailey Pumfleet <pumfleet@hey.com>
2021-10-07 15:14:47 +00:00
Omar López 6868474c92
Revert "Feature/cal 274 add webhooks (#628)" (#854)
This reverts commit 4c07faefe7.
2021-10-05 02:30:00 +01:00
Syed Ali Shahbaz 4c07faefe7
Feature/cal 274 add webhooks (#628)
* added prisma models and migration, minor webhook init --WIP

* --WIP

* --WIP

* added radix-checkbox and other webhook additions --WIP

* added API connections and other modifications --WIP

* --WIP

* replaced checkbox with toggle --WIP

* updated to use Dialog instead of modal --WIP

* fixed API and other small fixes -WIP

* created a dummy hook for test --WIP

* replaced static hook with dynamic hooks

* yarn lock conflict quickfix

* added cancel event hook and other minor additions --WIP

* minor improvements --WIP

* added more add-webhook flow items--WIP

* updated migration to have alter table for eventType

* many ui/ux fixes, logic fixes and action fixes --WIP

* bugfix for incorrect webhook filtering

* some more fixes, edit webhook --WIP

* removed redundant checkbox

* more bugfixes and edit-webhook flow --WIP

* more build and lint fixes

* --WIP

* more fixes and added toast notif --WIP

* --updated iconButton

* clean-up

* fixed enabled check in edit webhook

* another fix

* fixed edit webhook bug

* added await to payload lambda

* wrapped payload call in promise

* fixed cancel/uid CTA alignment

* --requested changes --removed eventType relationship

* Adds missing migration

* Fixes missing daysjs plugin and type fixes

* Adds failsafe for webhooks

* Adds missing dayjs utc plugins

* Fixed schema and migrations

* Updates webhooks query

Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: Omar López <zomars@me.com>
2021-10-04 17:40:52 -06:00
Mihai C 82e7e51fca
Setup i18n and locale detection (#712)
* feat: setup translations

* feat: i18n setup

* Update pages/settings/profile.tsx

Co-authored-by: Alex Johansson <alexander@n1s.se>

* fix: abstract locale hook

* fix: set default locale if preferred locale is not supported

* Revert "fix: set default locale if preferred locale is not supported"

This reverts commit e2a3d81371.

* fix: set default locale if preferred locale is not supported

* fix: use 1 namespace and remove unnecessary logs

* fix: yarn.lock

* fix: linting errors

Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: Alex Johansson <alexander@n1s.se>
2021-09-23 09:49:17 +01:00
Nico 3764a9d462
Bugfix/include zoom location (#715)
* Store video data in event location; fixed several types

* fixed malformed id

* Insert Zoom data when updating as well

* Add columns to store (video) meetings

* Store meeting data

* fixed type

* Use stored videoCallData

* Store location in field as well

* Use meta field for booking reference

* Introduced meta field in code

* Revert "Introduced meta field in code"

This reverts commit 535baccee3.

* Revert "Use meta field for booking reference"

This reverts commit 174c252f67.

* Linting fixes

Co-authored-by: nicolas <privat@nicolasjessen.de>
Co-authored-by: Peer_Rich <peeroke@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: Bailey Pumfleet <pumfleet@hey.com>
2021-09-22 23:43:10 +01:00
Omar López 3add84a279
Adds Stripe integration (#717)
* Adds Stripe integration

* Moves Stripe instrucctions to ee

* Adds NEXT_PUBLIC_APP_URL variable

* Adds fallback for NEXT_PUBLIC_APP_URL

* Throws error objects instead

* Improved error handling

* Removes deprecated method

* Bug fixing

* Payment refactoring

* PaymentPage fixes

* Fixes preview links

* More preview link fixes

* Fixes client links

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
2021-09-22 19:36:13 +01:00
Omar López e1f1386332
Feat disable guests for events (#719)
* Abstracts CheckboxField

* Allows disabling the guests field while booking

Co-authored-by: Bailey Pumfleet <pumfleet@hey.com>
2021-09-22 12:04:32 +01:00
Chris c0330acd83
Add two-factor authentication (#692)
Co-authored-by: Bailey Pumfleet <pumfleet@hey.com>
2021-09-21 10:29:20 +01:00
Alex van Andel 6ab741b927
Feature/round robin (#613)
* Heavy WIP

* More WIP

* Playing with backwards compat

* Moar wip

* wip

* Email changes for group feature

* Committing in redundant migrations for reference

* Combine all WIP migrations into a single feature migration

* Make backup of current version of radio area pending refactor

* Improved accessibility through keyboard

* Cleanup in seperate commit so I can cherrypick later

* Added RadioArea component

* wip

* Ignore .yarn file

* Kinda stable

* Getting closer...

* Hide header when there are only personal events

* Added uid to event create, updated EventTypeDescription

* Delete redundant migration

* Committing new team related migrations

* Optimising & implemented backwards compatibility

* Removed now redundant pages

* Undid prototyping to calendarClient I did not end up using

* Properly typed Select & fixed lint throughout

* How'd that get here, removed.

* TODO: investigate why userData is not compatible with passed type

* This likely matches the event type that is created for a user

* Few bugfixes

* Adding datepicker optimisations

* Fixed new event type spacing, initial profile should always be there

* Gave NEXT_PUBLIC_BASE_URL a try but I think it's not the right solution

* Updated EventTypeDescription to account for long titles, added logo to team page.

* Added logo to team query

* Added cancel Cypress test because an upcoming merge contains changes

* Fix for when the event type description is long

* Turned Theme into the useTheme hook, and made it fully compatible with teams pages

* Built AvatarGroup ui component + moved Avatar to ui

* Give the avatar some space fom the description

* Fixed timeZone selector

* Disabled tooltip +1-...

Co-authored-by: Bailey Pumfleet <pumfleet@hey.com>
2021-09-14 09:45:28 +01:00
Alex van Andel 8ee68e2ace
Converts booking deletion to soft-delete + more robust cancellation (#581)
* Converts booking deletion to soft-delete + more robust cancellation

* Update pages/api/cancel.ts

infer type :)

Co-authored-by: Alex Johansson <alexander@n1s.se>

Co-authored-by: Alex Johansson <alexander@n1s.se>
Co-authored-by: Bailey Pumfleet <pumfleet@hey.com>
2021-09-13 09:57:56 +01:00
Alex Johansson 7e6e935ed3
add free plan (#549)
- add new fields to support this
- when free:
  - fade out all event types after first
  - hide events after first on booking page
  - make booking page after the first one 404 if accessed directly
- add e2e tests
2021-09-06 13:51:15 +00:00
Syed Ali Shahbaz fa35af7bd8
Cal 262 refactor edit teams according to the design reference (#516)
* refactored settings/team landing page

* changed team edit flow, WIP

* merge conflict fix for teams.tsx

* minor fixes to edit team, WIP

* invite-member and disband team APIs attached inside edit-team page

* added remove-member API in edit-team page, minor fixes

* minor code fix, WIP

* WIP

* add logo, bio, branding to team schema

* bio, logo, branding, slug patch API and minor code fix-- WIP

* fn to Disband team directly from the dropdown menu in settings/teams page, removed debug remnants --WIP

* Pull latest data after an action in settings/teams-edit page

* added slug conflict check at Patch time

* code clean-up

* initial change request fixes --WIP

* prop type fix and add warn button color theme --WIP

* added warn Button to Dialog

* remaining change request fixes

* added noop from react-query

* updated invited team-list design

* prettier fix for api/teams/profile

* removed noop import and added custom noop

* minor Button fix

* requested changes addressed
2021-09-06 14:22:22 +01:00
Femi Odugbesan 2d23a8b7db
Onboarding Flow (#503)
* wip

* wip

* db: schedule schema

* fix adding time goes into new day

fix adding new time not keeping updating ranges

fix updating ranges not maintaining changed values

* remove photo upload

* remove unused code

* remove more unused code

* undo time lib

* didnt actually change this

* dont show onboardi
ng flow for users created before sept 1 2021

* use more consistent max-widths

* align all inputs in scheduler component

* allow overriding of default styles

* match figma designs

implement goto previous step

* add more types, match figma

Co-authored-by: Bailey Pumfleet <pumfleet@hey.com>
2021-09-02 13:13:19 +01:00
Mihai C 3894ee12d1
feat: CustomEventType placeholder and API fixes (#446)
* feat: add optional placeholder for text/multi-line text custom inputs on event types

* fix: delete associations of event type first

* fix: remove unneeded check

* fix: minor tweak

Co-authored-by: mihaic195 <mihai@sortlist.com>
Co-authored-by: Bailey Pumfleet <pumfleet@hey.com>
2021-08-22 14:06:26 +01:00
Bailey Pumfleet 06dce130b2
Merge pull request #450 from emrysal/bugfix/custom-inputs 2021-08-16 10:35:28 +01:00
Alex van Andel 252a329f09 Fixed issues relating to custom-inputs
* Don't duplicate custom input when editing before db persist
* Remove correct custom input during delete pre db persist (id undefined)
* Moved typings to prisma, keeping backwards compatibility with @map
* Updated all usages of the enum
2021-08-14 17:03:50 +00:00
femyeda 917431f4e8 db: add slug to team schema 2021-08-13 14:44:55 -05:00
nicolas bd28636af5 Merge branch 'main' into bugfix/unify-email-sending 2021-07-28 22:01:58 +02:00
nicolas df161d5498 Added location to bookings table 2021-07-25 14:37:22 +02:00
Alex van Andel 4368ad0289 Implement minimum booking notice 2021-07-22 22:52:27 +00:00
Malte Delfs f5516ed427 added reminder emails for opt-in bookings 2021-07-18 21:12:35 +02:00
Malte Delfs a2bf242c9e opt in booking 2021-07-18 20:28:54 +02:00
Femi Odugbesan 45689059c7
Feat/cal 95/date range on event types (#353)
* add edit links to events on dashboard

* fit elements on screen for mobile

* initialize components for consistent text styles

* add more fine grained width/height settings

* add higher level setting for when an event is available

- db: add supporting values to period allow setting an amount of days,
 a range, or unlimited number days an event is available

* fix issue where periodDates are null

* return minimal required data, handle date parsing

* [ui] limit booking days based on user period settings

* api: validate user period settings

* [db] migration for event type period settings
2021-07-15 09:10:26 -05:00
Alex van Andel 5206fb4f88 Implemented theme through user preferences 2021-07-09 23:13:34 +00:00
Alex van Andel f7f5e2cc17 Re-instated ResetPasswordRequest, almost oops 2021-06-30 02:05:24 +00:00
Alex van Andel 8c589b9dc1 Merge branch 'main' into feature/scheduling 2021-06-30 01:45:24 +00:00
Bailey Pumfleet 51c0556d30 Hide Calendso branding 2021-06-29 17:08:55 +01:00
Alex van Andel 575747bcd3 Final thing to check is timezones, currently if I am in Kuala Lumpur the time is correct, but it jumps 8 hours due to being out of bound on Seoul. 2021-06-29 01:45:58 +00:00
Alex van Andel 52e68b682c Removed isOverride boolean, renamed 'Schedule' to 'Availability' 2021-06-28 04:24:15 +00:00
Alex van Andel 7030851efb Merged with main, fixed issue that caused multiple AvailableTimes refreshes. 2021-06-27 21:34:38 +00:00
femyeda ab1298e2ca Allow user to reset password 2021-06-24 11:01:41 -05:00
Alex van Andel b2812deeff Merge branch 'main' into feature/scheduling 2021-06-21 20:37:19 +00:00
Alex van Andel f99729c392 Merged with main 2021-06-20 17:52:18 +00:00
Malte Delfs 50d325d20a added schema for EventTypeCustomInput 2021-06-19 20:55:40 +02:00
Bailey Pumfleet 1b1c712c89
Merge branch 'main' into feature/add-buffer-times-for-appointments 2021-06-18 17:04:05 +01:00
Bailey Pumfleet 90c1ff25bf
Merge branch 'main' into feature/customise-event-names 2021-06-18 17:00:52 +01:00
Alex van Andel 9d5186f1e3 Functionality works, only thing left is a bit of cleaning up and all done 2021-06-16 22:27:27 +00:00
Malte Delfs 68bca9e703 Implemented a configurable buffer between events 2021-06-15 18:19:00 +02:00
Malte Delfs 4fb0fbfe07 Made event name customizable 2021-06-15 17:26:16 +02:00