Skip to content

feat: refactor handleCancelBooking to not have next request#20241

Merged
supalarry merged 12 commits intomainfrom
feat/cancel-new-booking-extract-req
Apr 1, 2025
Merged

feat: refactor handleCancelBooking to not have next request#20241
supalarry merged 12 commits intomainfrom
feat/cancel-new-booking-extract-req

Conversation

@sean-brydon
Copy link
Copy Markdown
Member

@sean-brydon sean-brydon commented Mar 20, 2025

What does this PR do?

Removes the next request from a code function that is used in other frameworks outside of next

Fixes: #20374

Visual Demo (For contributors especially)

A visual demonstration is strongly recommended, for both the original and new change (video / image - any one).

Video Demo (if applicable):

  • Show screen recordings of the issue or feature.
  • Demonstrate how to reproduce the issue, the behavior before and after the change.

Image Demo (if applicable):

  • Add side-by-side screenshots of the original and updated change.
  • Highlight any significant change(s).

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

  • Are there environment variables that should be set?
  • What are the minimal test data to have?
  • What is expected (happy path) to have (input and output)?
  • Any other important info that could help to test that PR

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

@sean-brydon sean-brydon requested a review from a team as a code owner March 20, 2025 09:06
@sean-brydon sean-brydon requested a review from a team March 20, 2025 09:06
@graphite-app graphite-app Bot requested a review from a team March 20, 2025 09:06
@keithwillcode keithwillcode added consumer core area: core, team members only labels Mar 20, 2025
@dosubot dosubot Bot added bookings area: bookings, availability, timezones, double booking 💻 refactor labels Mar 20, 2025
@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 20, 2025

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 Apr 1, 2025 2:24pm
calcom-web-canary ⬜️ Ignored (Inspect) Visit Preview Apr 1, 2025 2:24pm

@graphite-app
Copy link
Copy Markdown

graphite-app Bot commented Mar 20, 2025

Graphite Automations

"Add consumer team as reviewer" took an action on this PR • (03/20/25)

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 20, 2025

E2E results are ready!

Copy link
Copy Markdown
Contributor

@joeauyeung joeauyeung left a comment

Choose a reason for hiding this comment

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

Awesome refactor and the changes look good. Looks like API V2 tests need to be updated.

@dosubot dosubot Bot added this to the v5.2 milestone Mar 26, 2025
@socket-security
Copy link
Copy Markdown

socket-security Bot commented Apr 1, 2025

New dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher

View full report↗︎

supalarry
supalarry previously approved these changes Apr 1, 2025
supalarry
supalarry previously approved these changes Apr 1, 2025
joeauyeung
joeauyeung previously approved these changes Apr 1, 2025
const result = await handleCancelBooking({
appDirRequestBody,
bookingData,
userId: session?.user?.id || -1,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Our of scope, but we should return early when there's no logged in user or not care.

const seatReference = bookingToDelete.seatsReferences.find(
(reference) => reference.referenceUid === seatReferenceUid
);
console.log("seatReference", seatReference);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Oopsy!

Comment thread packages/features/bookings/lib/handleSeats/cancel/cancelAttendeeSeat.ts Outdated
@emrysal emrysal dismissed stale reviews from joeauyeung and supalarry via d2d2b73 April 1, 2025 14:19
Copy link
Copy Markdown
Contributor

@emrysal emrysal left a comment

Choose a reason for hiding this comment

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

LGTM 🚀 - nice one

@supalarry supalarry merged commit f94e805 into main Apr 1, 2025
37 of 38 checks passed
@supalarry supalarry deleted the feat/cancel-new-booking-extract-req branch April 1, 2025 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bookings area: bookings, availability, timezones, double booking consumer core area: core, team members only ready-for-e2e 💻 refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CAL-5362] Refactor handleCancelBooking to not have next request

6 participants