Commit Graph

30 Commits

Author SHA1 Message Date
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
Mihai C debef8119e
Rejected bookings should be displayed in cancelled bookings tab (#1100)
* fix: rejected bookings should be displayed in cancelled bookings tab

* fix: add migration to update status of rejected bookings

* unrelated fix

Co-authored-by: Alex van Andel <me@alexvanandel.com>
2021-11-04 22:24:15 +00:00
Alex Johansson d4b70162e8
fix locale being empty string (#1112) 2021-11-02 17:09:22 +00:00
Alex Johansson a0c2e57891
suspense follow-up fixes (#1080) 2021-10-30 17:03:49 +01:00
Alex Johansson 1790aeb577
refactor `/integrations` with `<Suspense />` (#1078)
* suspense

* iframe embeds

* calendar list container

* rename things as a container

* use list container on onboarding

* fix

* rm code

* newer alpha

* make it work in react 17

* fix

* fix

* make components handle error state through `QueryCell`

* fix constant

* fix type error

* type error

* type fixes

* fix package.lock

* fix webhook invalidate

* fix mt

* fix typo

* pr comment
2021-10-30 15:54:21 +00:00
Omar López cc25a772a1
Adds missing webhook user relationship (#1070) 2021-10-29 08:13:51 -06:00
Alex Johansson dddb494071
rewrite webhooks to trpc (#1065) 2021-10-28 22:52:39 +00:00
Mihai C f91de82daf
feat: add infinite scroll on bookings tabs (#1059)
* feat: add infinite scroll on bookings tabs

* bookings page infinite scroll PR comments (#1060)

* check if `InteractionObserver` is supported

* revert query cell and use bespoke behaviour

* Update pages/bookings/[status].tsx

Co-authored-by: Mihai C <34626017+mihaic195@users.noreply.github.com>

* load more button

* make inview as a callback

Co-authored-by: Mihai C <34626017+mihaic195@users.noreply.github.com>

* mt-6

* fix: translation strings and remove unnecessary stuff

Co-authored-by: Alex Johansson <alexander@n1s.se>
2021-10-28 15:02:22 +00:00
Syed Ali Shahbaz baba307a9f
Feature/cal 605 add webhook test check during webhook (#1035)
* starting point

* lint fix

* add mock placeholder

* simplified a bit

* add some placeholder ui

* err handling

* multiple fixes

* post rebase fixes

* removed extra webhook enabled button

* finishing touches

* added translations

* removed debug remnants

* requested changes

Co-authored-by: KATT <alexander@n1s.se>
2021-10-25 21:45:52 +05:30
Mihai C 8d6fec79d3
feat: add translations for emails and type error fixes overall (#994)
* feat: add translations for forgot password email and misc

* fix: type fixes

* feat: translate invitation email

* fix: e2e tests

* fix: lint

* feat: type fixes and i18n for emails

* Merge main

* fix: jest import on server path

* Merge

* fix: playwright tests

* fix: lint

Co-authored-by: Bailey Pumfleet <pumfleet@hey.com>
2021-10-25 14:05:21 +01:00
Alex Johansson c28d800aa9
fix i18n flicker on booking pages (#1013) 2021-10-20 16:00:11 +00:00
Omar López 85d7122e43
Fixes Apple Calendar onboarding and type fixes (#988)
* Type fixes

* Type fixes

* Attemp to prevent unknown error in prod

* Type fixes

* Type fixes for onboarding

* Extracts ConnectIntegration

* Extracts IntegrationListItem

* Extracts CalendarsList

* Uses CalendarList on onboarding

* Removes deprecated Alert

* Extracts DisconnectIntegration

* Extracts CalendarSwitch

* Extracts ConnectedCalendarsList

* Extracted connectedCalendar logic for reuse

* Extracted SubHeadingTitleWithConnections

* Type fixes

* Fetched connected calendars in onboarding

* Refreshes data on when adding/removing calendars on onboarding

* Removed testing code

* Type fixes

* Feedback

* Moved integration helpers

* I was sleepy

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-10-20 15:42:40 +00:00
Alex Johansson d8dac426eb
refactor webhooks UI (#982) 2021-10-18 08:02:25 +01:00
Omar López 3641d5e46e
[CAL-493] Implements tRCP on event types (#923)
* Removes unused component

* Refactors useLocale

We don't need to pass the locale prop everywhere

* Event type fixes

* Extracts CreateNewEventDialog

* Implements tRCP for event types
2021-10-15 20:07:00 +01:00
Omar López c2c37b701e
Zomars/fixes trpc typo (#957) 2021-10-14 19:22:01 +00:00
Omar López 0861d7cc61
Ends the war between tRPC and next-i18next (#939)
* Ends the war between tRPC and next-i18next

* Locale fixes

* Linting

* Linting

* trpc i18n (not working) (#942)

* simplify i18n handler and remove redundant(?) fn check

* split up viewer to a "logged in only" and "public"

* wip -- skip first render

Co-authored-by: Omar López <zomars@me.com>

* Linting

* I18n fixes

* We don't need serverSideTranslations in every page anymore

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: Alex Johansson <alexander@n1s.se>
2021-10-14 13:57:49 +03:00
Alex Johansson ec6b897191
integration page follow ups (#912)
### Internals

- Replace `lodash.*` packages with plain `lodash` & replace `lodash.*` imports with `lodash/` - should have no impact on bundle size and opens up for us to use all of lodash
- Update `viewer.me` to cherry-pick what we actually need on that query to avoid leaking extra context info
- Update `getIntegrations` to never include `.key`-property to avoid leaking 

### Visual

- Update calendars so `primary` is displayed last
- Update connected calendars so they are in ascending order in which you connected them
2021-10-13 13:35:25 +02:00
Alex Johansson c3dc18643e
`/integrations` facelift (#858) 2021-10-12 11:35:44 +02:00
Alex Johansson 8cbf880af6
add locale to trpc context (#897) 2021-10-11 12:03:50 +00:00
Mihai C 35dd3f088c
fix: move cancelled upcoming booking to cancelled tab (#883)
* fix: move cancelled upcoming booking to cancelled tab

* fix: lint

* Update server/routers/viewer.tsx

Co-authored-by: Mihai Colceriu <colceriumi@gmail.com>

* fix: also for past bookings

Co-authored-by: Alex Johansson <alexander@n1s.se>
2021-10-08 18:58:37 +03:00
Mihai C 2c9b301b77
Feat/i18n crowdin (#752)
* feat: add crowdin and supported languages

* fix: main branch name

* feat: test crowdin integration

* feat: add crowdin config skeleton

* feat: update crowdin.yml

* fix: remove ro translation

* test: en translation

* test: en translation

* New Crowdin translations by Github Action (#735)

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>

* test: en translation

* fix: separate upload/download workflows

* wip

* New Crowdin translations by Github Action (#738)

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>

* wip

* wip

* wip

* wip

* wip

* typo

* wip

* wip

* update crowdin config

* update

* chore: support i18n de,es,fr,it,pt,ru,ro,en

* chore: extract i18n strings

* chore: extract booking components strings for i18n

* wip

* extract more strings

* wip

* fallback to getServerSideProps for now

* New Crowdin translations by Github Action (#874)

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>

* fix: minor fixes on the datepicker

* fix: add dutch lang

* fix: linting issues

* fix: string

* fix: update GHA

* cleanup trpc

* fix linting

Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: Bailey Pumfleet <pumfleet@hey.com>
2021-10-08 14:43:48 +03:00
Omar López 58de920951
Refactors custom input form & dialog (#853) 2021-10-07 15:43:20 +00:00
Alex van Andel 89e5da15df
Fixes weekStart & automatic theme adjust checkbox (#847) 2021-10-02 20:16:51 +00:00
Alex Johansson eb93e778bd
simplify `/bookings/[status]` logic (#845) 2021-10-02 13:29:26 +00:00
Alex Johansson 60298f6eeb
resize image before storing (#831)
* resize image fn

* wip

* simplify transform

* comment

* fix

* rm log

* allow pass-through for non-base-64

Co-authored-by: Alex van Andel <me@alexvanandel.com>
2021-09-30 21:37:29 +01:00
Omar López dc6841e761
Bookings UI improvements (#826) 2021-09-30 11:46:39 +01:00
Alex van Andel a30381f229
Lowercase username try #3 (#821)
3 times is a charm.. can't believe this took 3 tries.
2021-09-29 15:58:25 +01:00
Omar López dd9f801872
cal 485 prevent users from changing their username to premium ones (#799)
* Makes userRequired middleware

* Prevent users from changing usernames to premium ones

* refactor on zomars' branch (#801)

* rename `profile` -> `mutation`

* `createProtectedRouter()` helper

* move profile mutation to `viewer.`

* simplify checkUsername

* Auto scrolls to error when there is one

* Renames username helpers

* Follows db convention

Co-authored-by: Alex Johansson <alexander@n1s.se>
Co-authored-by: Bailey Pumfleet <pumfleet@hey.com>
2021-09-28 09:57:30 +01:00
Alex Johansson 649e79bdc7
statically render profile pages (#615) 2021-09-27 17:09:19 +01:00
Alex Johansson 34300650e4
add tRPC (#614)
* add trpc

* trpc specific

* fix deps

* lint fix

* upgrade prisma

* nativeTypes

* nope, not needed

* fix app propviders

* Revert "upgrade prisma"

This reverts commit e6f2d2542a.

* rev

* up trpc

* simplify

* wip - bookings page with trpc

* bookings using trpc

* fix `Shell` props

* call it viewerRouter instead

* cleanuop

* ssg helper

* fix lint

* fix types

* skip

* add `useRedirectToLoginIfUnauthenticated`

* exhaustive-deps

* fix callbackUrl

* rewrite `/availability` using trpc

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-09-27 14:47:55 +00:00