fix: #10789 Prevent Double Booking (for requests that require confirmation) (#10882)

Co-authored-by: Peer Richelsen <[email protected]>
Co-authored-by: alannnc <[email protected]>
Co-authored-by: zomars <[email protected]>
This commit is contained in:
authored and GitHub committed 2023-09-27 20:54:22 +00:00
1 parent a2df323cf8
commit d7c3132fa5
3 files changed
+71 -4

No files matched your search

@@ -26,11 +26,11 @@ import {
DialogFooter,
MeetingTimeInTimezones,
showToast,
Tooltip,
TableActions,
TextAreaField,
Tooltip,
} from "@calcom/ui";
import { Check, Clock, MapPin, RefreshCcw, Send, Ban, X, CreditCard } from "@calcom/ui/components/icon";
import { Ban, Check, Clock, CreditCard, MapPin, RefreshCcw, Send, X } from "@calcom/ui/components/icon";
import useMeQuery from "@lib/hooks/useMeQuery";
@@ -74,8 +74,10 @@ function BookingListItem(booking: BookingItemProps) {
}
utils.viewer.bookings.invalidate();
},
onError: () => {
showToast(t("booking_confirmation_failed"), "error");
onError: (e) => {
let message = t("booking_confirmation_failed");
if ("message" in e) message = e.message;
showToast(message, "error");
utils.viewer.bookings.invalidate();
},
});