Skip to content

fix: move team availability search to serverside#17549

Merged
Udit-takkar merged 2 commits intomainfrom
fix/team-availability-search-serverside
Nov 8, 2024
Merged

fix: move team availability search to serverside#17549
Udit-takkar merged 2 commits intomainfrom
fix/team-availability-search-serverside

Conversation

@sean-brydon
Copy link
Copy Markdown
Member

What does this PR do?

This PR faces an issue when people were searching team availability by user but the search was handled client side.

How should this be tested?

Load an organisation
Goto availability/teams page
Search for a user that is not visible in the list

Checklist

  • I haven't read the contributing guide
  • My code doesn't follow the style guidelines of this project
  • I haven't commented my code, particularly in hard-to-understand areas
  • I haven't checked if my changes generate no new warnings

@graphite-app graphite-app bot requested a review from a team November 8, 2024 09:05
@dosubot dosubot bot added teams area: teams, round robin, collective, managed event-types 🐛 bug Something isn't working labels Nov 8, 2024
@keithwillcode keithwillcode added consumer core area: core, team members only labels Nov 8, 2024

const members = await Promise.all(buildMembers);

let belongsToTeam = true;
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do this logic to not show the upgrade tip if the filters return no users

@graphite-app
Copy link
Copy Markdown

graphite-app bot commented Nov 8, 2024

Graphite Automations

"Add consumer team as reviewer" took an action on this PR • (11/08/24)

1 reviewer was added to this PR based on Keith Williams's automation.

"Add ready-for-e2e label" took an action on this PR • (11/08/24)

1 label was added to this PR based on Keith Williams's automation.

Copy link
Copy Markdown
Contributor

@Udit-takkar Udit-takkar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another issue in listTeamAvailability.handler(Not due to this PR) is we are executing UserRepository.enrichUserWithItsProfile sequentially. we can use Promise.all here

  const membershipWithUserProfile = [];
  for (const membership of memberships) {
    membershipWithUserProfile.push({
      ...membership,
      user: await UserRepository.enrichUserWithItsProfile({
        user: membership.user,
      }),
    });
  }

  return membershipWithUserProfile;

This can be fixed in a follow up PR

@vercel
Copy link
Copy Markdown

vercel bot commented Nov 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
cal ⬜️ Ignored (Inspect) Visit Preview Nov 8, 2024 9:23am
calcom-web-canary ⬜️ Ignored (Inspect) Visit Preview Nov 8, 2024 9:23am

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Nov 8, 2024

E2E results are ready!

@Udit-takkar Udit-takkar merged commit 4976e24 into main Nov 8, 2024
@Udit-takkar Udit-takkar deleted the fix/team-availability-search-serverside branch November 8, 2024 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐛 bug Something isn't working consumer core area: core, team members only ready-for-e2e teams area: teams, round robin, collective, managed event-types

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants