Commit Graph

10 Commits (3e5987abec9d9f01e84df84d197d294dfa259e7c)

Author SHA1 Message Date
Omar López 7bc7b241ac
Zomars/cal 794 normalize emails in db (#1361)
* Email input UX improvements

* Makes email queries case insensitive

* Lowercases all emails

* Type fixes

* Re adds lowercase email to login

* Removes citext dependency

* Updates schema

* Migration fixes

* Added failsafes to team invites

* Team invite improvements

* Deleting the index, lowercasing 

```
calendso=> UPDATE users SET email=LOWER(email);
ERROR:  duplicate key value violates unique constraint "users.email_unique"
DETAIL:  Key (email)=(free@example.com) already exists.
```

vs.

```
calendso=> CREATE UNIQUE INDEX "users.email_unique" ON "users" (email);
ERROR:  could not create unique index "users.email_unique"
DETAIL:  Key (email)=(Free@example.com) is duplicated.
```

I think it'll be easier to rectify for users if they try to run the migrations if the index stays in place.

Co-authored-by: Alex van Andel <me@alexvanandel.com>
2021-12-21 00:59:06 +00:00
Mihai C 8322e5c8d1
Emails Revamp (#1201)
* refactor: emails (WIP)

* wip

* wip

* refactor: calendarClient

* chore: remove comment

* feat: new templates

* feat: more templates (wip)

* feat: email templates wip

* feat: email templates wip

* feat: prepare for testing

* For testing stripe integration

* Uses imported BASE_URL

* Fixes types

* use BASE_URL

Co-authored-by: Omar López <zomars@me.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-11-26 11:03:43 +00:00
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
Anton Podviaznikov c62e1a0eeb
Add more typescript types (#867) 2021-10-07 09:47:33 +01:00
Omar López d194878bb2
Suggestion: let prettier sort imports order (#673)
* Suggestion: let prettier sort imports order

# Conflicts:
#	yarn.lock

* AUTO SORT ALL THE IMPORTS

* Linting

* Fixes test
2021-09-22 13:52:38 -06:00
Alex Johansson 2f1ede9bcd
use `getSession()` from `@lib/auth` everywhere (#563) 2021-09-03 21:51:21 +01:00
Alex Johansson f63aa5d550
add linting in CI + fix lint errors (#473)
* run `yarn lint --fix`

* Revert "Revert "add linting to ci""

This reverts commit 0bbbbee4be.

* Fixed some errors

* remove unused code - not sure why this was here?

* assert env var

* more type fixes

* fix typings og gcal callback - needs testing

* rename `md5.ts` to `md5.js`

it is js.

* fix types

* fix types

* fix lint errors

* fix last lint error

Co-authored-by: Alex van Andel <me@alexvanandel.com>
2021-08-19 14:27:01 +02:00
Alex van Andel 40eb9036f4 Implements inviting external users to teams 2021-06-09 21:43:37 +00:00
Alex van Andel 5d3e39ea6e Better error handling during team member invitation
Now tells you if you have already added this member / invite is pending.
Behaviour a little bit more predictable during team editting.
2021-06-07 15:12:00 +00:00
Alex van Andel 7a31cb0f6a Implemented the API, split the teams page up into multiple components 2021-06-05 22:53:33 +00:00