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

bookings.tsx: unintended confirmations on rejection

Open github-actions[bot] opened this issue 3 years ago • 4 comments

https://github.com/calcom/cal.com/blob/156f3e5de2697c4dbb7abfbdf2d6f143e19cd9fe/packages/trpc/server/routers/viewer/bookings.tsx#L778



    /** When a booking that requires payment its being confirmed but doesn't have any payment,
     * we shouldn’t save it on DestinationCalendars
     *
     * FIXME: This can cause unintended confirmations on rejection.
     */
    if (booking.payment.length > 0 && !booking.paid) {
      await prisma.booking.update({

github-actions[bot] avatar Feb 09 '23 15:02 github-actions[bot]

I'm interested in fixing this. I think what we can do here is check if there's a success payment in the booking's payment lists. Can you assign me this issue @PeerRich ?

amirfakhrullah avatar Feb 09 '23 17:02 amirfakhrullah

Ops my bad, I didn't understand the the issue previously.

So the fix needed is to update this if statement for the situation where the request coming in is for rejecting a booking. Can you confirm this @emrysal ?

amirfakhrullah avatar Feb 09 '23 18:02 amirfakhrullah

@alannnc is already checking on this. Thanks @amirfakhrullah

zomars avatar Feb 09 '23 18:02 zomars

Related to #6969

zomars avatar Feb 09 '23 18:02 zomars