cal.com icon indicating copy to clipboard operation
cal.com copied to clipboard

feat: Enable CRM apps on a per event type basis

Open joeauyeung opened this issue 1 year ago • 5 comments

This PR is stacked on #14272

What does this PR do?

This PR transitions CRM apps from being applied to every event type to now being able to choose which CRM apps are applied. This allows us to build upon our CRM apps in the future.

BREAKING : This means users will have to go in and choose which event types they want their CRM apps to be enabled on.

Fixes #14449

Requirement/Documentation

  • If there is a requirement document, please, share it here.
  • If there is a UI/UX design document, please, share it here.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Chore (refactoring code, technical debt, workflow improvements)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

How should this be tested?

  • Do this for teams and individual credentials
  • Install a CRM app from the app store
  • Go to an event type
  • Under the "Apps" tab you should see the CRM app. Enable it
  • Create a booking
    • The CRM app action should trigger
  • Disable the CRM app.
    • The CRM app action should not trigger

Mandatory Tasks

  • [x] Make sure you have self-reviewed the code. A decent size PR without self-review might be rejected.

Checklist

  • I haven't added tests that prove my fix is effective or that my feature works
  • I haven't checked if new and existing unit tests pass locally with my changes

joeauyeung avatar Apr 07 '24 22:04 joeauyeung

Thank you for following the naming conventions! 🙏 Feel free to join our discord and post your PR link.

github-actions[bot] avatar Apr 07 '24 22:04 github-actions[bot]

Graphite Automations

"Add foundation team as reviewer" took an action on this PR • (04/07/24)

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

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

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

graphite-app[bot] avatar Apr 07 '24 22:04 graphite-app[bot]

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

Name Status Preview Comments Updated (UTC)
ai ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 22, 2024 8:55pm
platform-starter-kit ❌ Failed (Inspect) Apr 22, 2024 8:55pm
4 Ignored Deployments
Name Status Preview Comments Updated (UTC)
cal ⬜️ Ignored (Inspect) Visit Preview Apr 22, 2024 8:55pm
calcom-web-canary ⬜️ Ignored (Inspect) Visit Preview Apr 22, 2024 8:55pm
qa ⬜️ Ignored (Inspect) Visit Preview Apr 22, 2024 8:55pm
qa-not-in-use ⬜️ Ignored (Inspect) Visit Preview Apr 22, 2024 8:55pm

vercel[bot] avatar Apr 07 '24 22:04 vercel[bot]

📦 Next.js Bundle Analysis for @calcom/web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

🎉 Global Bundle Size Decreased

Page Size (compressed)
global 189.74 KB (🟢 -38.49 KB)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

New Page Added

The following page was added to the bundle from the code in this PR:

Page Size (compressed) First Load % of Budget (350 KB)
/settings/organizations/[id]/set-password 152.87 KB 342.61 KB 97.89%

One Hundred Ten Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load % of Budget (350 KB)
/404 96.24 KB 285.98 KB 81.71% (🟡 +0.22%)
/500 90.92 KB 280.66 KB 80.19% (🟡 +0.18%)
/[user]/[type] 412.26 KB 602 KB 172.00% (🟡 +0.70%)
/[user]/[type]/embed 412.26 KB 602 KB 172.00% (🟡 +0.70%)
/apps 283.22 KB 472.96 KB 135.13% (🟡 +1.73%)
/apps/[slug] 301.25 KB 490.99 KB 140.28% (🟡 +1.81%)
/apps/[slug]/[...pages] 590.75 KB 780.49 KB 223.00% (🟡 +1.87%)
/apps/categories 260.86 KB 450.6 KB 128.74% (🟡 +1.63%)
/apps/categories/[category] 265.4 KB 455.14 KB 130.04% (🟡 +1.69%)
/apps/installed/[category] 285.4 KB 475.14 KB 135.75% (🟡 +1.96%)
/auth/forgot-password 103.15 KB 292.89 KB 83.68% (🟡 +0.32%)
/auth/login 120.28 KB 310.03 KB 88.58% (🟡 +0.61%)
/auth/oauth2/authorize 118.79 KB 308.53 KB 88.15% (🟡 +0.39%)
/auth/setup 152.32 KB 342.06 KB 97.73% (🟡 +0.82%)
/auth/verify 143.91 KB 333.65 KB 95.33% (🟡 +0.15%)
/auth/verify-email 90.84 KB 280.58 KB 80.17% (🟡 +0.19%)
/auth/verify-email-change 90.49 KB 280.23 KB 80.07% (🟡 +0.15%)
/availability 468.73 KB 658.47 KB 188.13% (🟡 +1.88%)
/availability/[schedule] 415.08 KB 604.82 KB 172.81% (🟡 +1.73%)
/availability/troubleshoot 201.86 KB 391.6 KB 111.89% (🟡 +0.22%)
/booking/[uid] 222.19 KB 411.93 KB 117.69% (🟢 -0.79%)
/booking/[uid]/embed 222.19 KB 411.93 KB 117.69% (🟢 -0.79%)
/bookings/[status] 329.15 KB 518.89 KB 148.25% (🟡 +1.79%)
/connect-and-join 87.69 KB 277.43 KB 79.27% (🟡 +0.22%)
/d/[link]/[slug] 412.07 KB 601.81 KB 171.95% (🟡 +0.70%)
/enterprise 261.36 KB 451.1 KB 128.89% (🟡 +1.75%)
/event-types 561.87 KB 751.61 KB 214.75% (🟡 +2.29%)
/event-types/[type] 440.16 KB 629.91 KB 179.97% (🟡 +2.11%)
/getting-started/[[...step]] 407.4 KB 597.14 KB 170.61% (🟡 +0.90%)
/insights 479.99 KB 669.74 KB 191.35% (🟡 +1.82%)
/more 260.44 KB 450.18 KB 128.62% (🟡 +1.63%)
/org/[orgSlug] 266.86 KB 456.6 KB 130.46% (🟡 +0.53%)
/org/[orgSlug]/[user] 273.23 KB 462.97 KB 132.28% (🟡 +0.54%)
/org/[orgSlug]/[user]/[type] 412.46 KB 602.2 KB 172.06% (🟡 +0.70%)
/org/[orgSlug]/[user]/[type]/embed 412.48 KB 602.22 KB 172.06% (🟡 +0.71%)
/org/[orgSlug]/[user]/embed 273.25 KB 462.99 KB 132.28% (🟡 +0.55%)
/org/[orgSlug]/embed 266.88 KB 456.62 KB 130.46% (🟡 +0.54%)
/org/[orgSlug]/instant-meeting/team/[slug]/[type] 412.08 KB 601.83 KB 171.95% (🟡 +0.70%)
/org/[orgSlug]/team/[slug] 266.87 KB 456.61 KB 130.46% (🟡 +0.53%)
/org/[orgSlug]/team/[slug]/[type] 412.28 KB 602.02 KB 172.01% (🟡 +0.70%)
/payment/[uid] 120 KB 309.74 KB 88.50% (🟡 +0.26%)
/settings/admin 267.41 KB 457.15 KB 130.62% (🟡 +1.82%)
/settings/admin/apps 281.32 KB 471.06 KB 134.59% (🟡 +2.06%)
/settings/admin/apps/[category] 281.3 KB 471.05 KB 134.58% (🟡 +2.07%)
/settings/admin/flags 271.23 KB 460.97 KB 131.71% (🟡 +1.83%)
/settings/admin/impersonation 267.71 KB 457.45 KB 130.70% (🟡 +1.83%)
/settings/admin/oAuth 279.46 KB 469.2 KB 134.06% (🟡 +1.84%)
/settings/admin/oAuth/oAuthView 92.66 KB 282.4 KB 80.68% (🟢 -0.57%)
/settings/admin/orgMigrations/_OrgMigrationLayout 256.03 KB 445.77 KB 127.36% (🟡 +1.84%)
/settings/admin/orgMigrations/moveTeamToOrg 305.34 KB 495.09 KB 141.45% (🟡 +1.79%)
/settings/admin/orgMigrations/moveUserToOrg 324.37 KB 514.11 KB 146.89% (🟡 +1.78%)
/settings/admin/orgMigrations/removeTeamFromOrg 305.11 KB 494.85 KB 141.39% (🟡 +1.79%)
/settings/admin/orgMigrations/removeUserFromOrg 305.13 KB 494.87 KB 141.39% (🟡 +1.79%)
/settings/admin/organizations 269.49 KB 459.23 KB 131.21% (🟡 +1.88%)
/settings/admin/organizations/[id]/edit 267.98 KB 457.72 KB 130.78% (🟡 +1.83%)
/settings/admin/users 270.31 KB 460.05 KB 131.44% (🟡 +1.90%)
/settings/admin/users/[id]/edit 398.1 KB 587.84 KB 167.96% (🟡 +1.77%)
/settings/admin/users/add 397.85 KB 587.59 KB 167.88% (🟡 +1.80%)
/settings/billing 267.62 KB 457.36 KB 130.67% (🟡 +1.83%)
/settings/developer/api-keys 272.09 KB 461.84 KB 131.95% (🟡 +1.86%)
/settings/developer/webhooks 272.15 KB 461.89 KB 131.97% (🟡 +1.83%)
/settings/developer/webhooks/[id] 273.11 KB 462.85 KB 132.24% (🟡 +1.85%)
/settings/developer/webhooks/new 273.15 KB 462.89 KB 132.25% (🟡 +1.85%)
/settings/my-account/appearance 319.91 KB 509.65 KB 145.62% (🟡 +1.81%)
/settings/my-account/calendars 279.14 KB 468.88 KB 133.97% (🟡 +1.98%)
/settings/my-account/conferencing 279.85 KB 469.6 KB 134.17% (🟡 +1.94%)
/settings/my-account/general 355.93 KB 545.67 KB 155.91% (🟡 +1.94%)
/settings/my-account/out-of-office 271.86 KB 461.6 KB 131.89% (🟡 +1.86%)
/settings/my-account/profile 410.69 KB 600.43 KB 171.55% (🟡 +1.85%)
/settings/organizations/[id]/about 152.89 KB 342.63 KB 97.89% (🟢 -0.90%)
/settings/organizations/[id]/add-teams 152.94 KB 342.68 KB 97.91% (🟢 -0.89%)
/settings/organizations/[id]/onboard-members 174.29 KB 364.03 KB 104.01% (🟡 +0.81%)
/settings/organizations/appearance 291.18 KB 480.92 KB 137.41% (🟡 +1.83%)
/settings/organizations/billing 267.66 KB 457.4 KB 130.68% (🟡 +1.83%)
/settings/organizations/dsync 337.53 KB 527.27 KB 150.65% (🟡 +1.88%)
/settings/organizations/general 355.5 KB 545.24 KB 155.78% (🟡 +1.82%)
/settings/organizations/members 436.71 KB 626.45 KB 178.99% (🟡 +2.15%)
/settings/organizations/new 152.89 KB 342.64 KB 97.90% (🟢 -0.91%)
/settings/organizations/platform/oauth-clients 269.38 KB 459.13 KB 131.18% (🟡 +1.85%)
/settings/organizations/platform/oauth-clients/create 268.77 KB 458.51 KB 131.00% (🟡 +1.82%)
/settings/organizations/privacy 273.01 KB 462.76 KB 132.22% (🟡 +1.83%)
/settings/organizations/profile 402.38 KB 592.12 KB 169.18% (🟡 +1.85%)
/settings/organizations/sso 278.32 KB 468.06 KB 133.73% (🟡 +1.84%)
/settings/organizations/teams/other 268.49 KB 458.23 KB 130.92% (🟡 +1.83%)
/settings/organizations/teams/other/[id]/appearance 280.22 KB 469.96 KB 134.27% (🟡 +1.85%)
/settings/organizations/teams/other/[id]/members 274.96 KB 464.7 KB 132.77% (🟡 +1.83%)
/settings/organizations/teams/other/[id]/profile 473.67 KB 663.42 KB 189.55% (🟡 +1.85%)
/settings/security/impersonation 272.82 KB 462.56 KB 132.16% (🟡 +1.83%)
/settings/security/password 310.16 KB 499.9 KB 142.83% (🟡 +1.80%)
/settings/security/sso 277.72 KB 467.46 KB 133.56% (🟡 +1.84%)
/settings/security/two-factor-auth 276.62 KB 466.36 KB 133.25% (🟡 +1.93%)
/settings/teams 267.16 KB 456.9 KB 130.54% (🟡 +1.83%)
/settings/teams/[id]/appearance 280.2 KB 469.94 KB 134.27% (🟡 +1.85%)
/settings/teams/[id]/billing 267.66 KB 457.4 KB 130.69% (🟡 +1.82%)
/settings/teams/[id]/members 387.1 KB 576.84 KB 164.81% (🟡 +1.91%)
/settings/teams/[id]/onboard-members 173.47 KB 363.21 KB 103.77% (🟡 +0.82%)
/settings/teams/[id]/profile 474.51 KB 664.25 KB 189.79% (🟡 +1.85%)
/settings/teams/new 201.42 KB 391.16 KB 111.76% (🟡 +0.96%)
/signup 179.14 KB 368.88 KB 105.39% (🟡 +0.17%)
/team/[slug] 266.82 KB 456.56 KB 130.45% (🟡 +0.54%)
/team/[slug]/[type] 412.25 KB 601.99 KB 172.00% (🟡 +0.70%)
/team/[slug]/[type]/embed 412.28 KB 602.02 KB 172.01% (🟡 +0.70%)
/team/[slug]/embed 266.86 KB 456.6 KB 130.46% (🟡 +0.53%)
/teams 260.66 KB 450.4 KB 128.69% (🟡 +1.63%)
/upgrade 260.98 KB 450.72 KB 128.78% (🟡 +1.68%)
/video/meeting-ended/[uid] 96.17 KB 285.92 KB 81.69% (🟡 +0.17%)
/video/meeting-not-started/[uid] 95.85 KB 285.59 KB 81.60% (🟡 +0.18%)
/video/no-meeting-found 86.58 KB 276.32 KB 78.95% (🟡 +0.16%)
/workflows 292.52 KB 482.26 KB 137.79% (🟡 +1.81%)
/workflows/[workflow] 413.75 KB 603.49 KB 172.43% (🟡 +1.54%)
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/-

github-actions[bot] avatar Apr 07 '24 22:04 github-actions[bot]

Current Playwright Test Results Summary

✅ 272 Passing - ❌ 4 Failing - ⚠️ 5 Flaky

Run may still be in progress, this comment will be updated as current testing workflow or job completes...

(Last updated on 04/07/2024 10:40:34pm UTC)

Run Details

Running Workflow PR Update on Github Actions

Commit: ef63be6b15ee2028665ac23d2573287f1013e2b2

Started: 04/07/2024 10:37:17pm UTC

❌ Failures

📄   apps/web/playwright/out-of-office.e2e.ts • 2 Failures

Top 1 Common Error Messages

Timed out 30000ms waiting for expect(received).toBeVisible()

2 Test Cases Affected

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Out of office User can create out of office entry
Retry 2Retry 1Initial Attempt
Error: Timed out 30000ms waiting for expect(received).toBeVisible()...
Timed out 30000ms waiting for expect(received).toBeVisible()
Call log:
  - expect.toBeVisible with timeout 30000ms
  - waiting for locator('data-testid=table-redirect-n-a')
  - waiting for locator('data-testid=table-redirect-n-a')

91.53% (54) 54 / 59 runs
failed over last 7 days
0% (0) 0 / 59 runs
flaked over last 7 days
Out of office User can configure booking redirect
Retry 2Retry 1Initial Attempt
Error: Timed out 30000ms waiting for expect(received).toBeVisible()...
Timed out 30000ms waiting for expect(received).toBeVisible()
Call log:
  - expect.toBeVisible with timeout 30000ms
  - waiting for locator('data-testid=table-redirect-user-9-1712529572049')
  - waiting for locator('data-testid=table-redirect-user-9-1712529572049')

91.53% (54) 54 / 59 runs
failed over last 7 days
0% (0) 0 / 59 runs
flaked over last 7 days

📄   apps/web/playwright/payment-apps.e2e.ts • 1 Failure

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Payment app Should be able to edit alby price, currency
Retry 1Initial Attempt
Error: Test timeout of 60000ms exceeded.
Test timeout of 60000ms exceeded.
2.04% (6) 6 / 294 runs
failed over last 7 days
0% (0) 0 / 294 runs
flaked over last 7 days

📄   apps/web/playwright/dynamic-booking-pages.e2e.ts • 1 Failure

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
dynamic booking
Retry 2Retry 1Initial Attempt
Error: Timed out 30000ms waiting for expect(received).toBeVisible()...
Timed out 30000ms waiting for expect(received).toBeVisible()
Call log:
  - expect.toBeVisible with timeout 30000ms
  - waiting for locator('[data-testid="cancelled-headline"]')
  - waiting for locator('[data-testid="cancelled-headline"]')

0.36% (1) 1 / 281 run
failed over last 7 days
0% (0) 0 / 281 runs
flaked over last 7 days

⚠️ Flakes

📄   apps/web/playwright/organization/organization-invitation.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Organization Email matching orgAutoAcceptEmail and a Verified Organization nonexisting user is invited to a team inside organization
Retry 2Retry 1Initial Attempt
1.03% (1) 1 / 97 run
failed over last 7 days
16.49% (16) 16 / 97 runs
flaked over last 7 days

📄   apps/web/playwright/booking-pages.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
pro user -- legacy Time slots should be reserved when selected
Retry 1Initial Attempt
0% (0) 0 / 278 runs
failed over last 7 days
9.71% (27) 27 / 278 runs
flaked over last 7 days

📄   apps/web/playwright/impersonation.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Users can impersonate App Admin can impersonate users with impersonation enabled
Retry 1Initial Attempt
0% (0) 0 / 275 runs
failed over last 7 days
6.18% (17) 17 / 275 runs
flaked over last 7 days

📄   packages/embeds/embed-core/playwright/tests/preview.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Preview Preview - embed-core should load
Retry 1Initial Attempt
0% (0) 0 / 279 runs
failed over last 7 days
36.56% (102) 102 / 279 runs
flaked over last 7 days

📄   packages/embeds/embed-core/playwright/tests/inline.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Inline Iframe Inline Iframe - Configured with Dark Theme
Retry 1Initial Attempt
0% (0) 0 / 279 runs
failed over last 7 days
55.20% (154) 154 / 279 runs
flaked over last 7 days

View Detailed Build Results


deploysentinel[bot] avatar Apr 07 '24 22:04 deploysentinel[bot]