fix: Reschedule URL for an org migrated/moved user's booking. (#15736)

* Fix reschedule URl

* Add e2e for org

* Add team booking reschedule test

* Add unit tests

* Remove unnecessary select

---------

Co-authored-by: Udit Takkar <[email protected]>
This commit is contained in:
Hariom BalharaandUdit Takkar authored and GitHub committed 2024-07-31 14:25:46 +02:00
1 parent 63c7e4b55a
commit 5b7f2a6ffc
9 files changed
+442 -31

No files matched your search

+3 -2
View File
@@ -311,10 +311,11 @@ export class UserRepository {
}
/**
* Use this method if you don't directly has the profileId.
* It can happen in two cases:
* Use this method instead of `enrichUserWithTheProfile` if you don't directly have the profileId.
* It can happen in following cases:
* 1. While dealing with a User that hasn't been added to any organization yet and thus have no Profile entries.
* 2. While dealing with a User that has been moved to a Profile i.e. he was invited to an organization when he was an existing user.
* 3. We haven't added profileId to all the entities, so they aren't aware of which profile they belong to. So, we still mostly use this function to enrich the user with its profile.
*/
static async enrichUserWithItsProfile<T extends { id: number; username: string | null }>({
user,