fix/error-while-confirm-booking (#4834)

* Add try/catch on workflows while confirming a booking

* Revert "added ?tabName=setup to event-type detail link to give it active status (#4830)"

This reverts commit 11c44db609.

Co-authored-by: Omar López <[email protected]>
This commit is contained in:
alannncandOmar López authored and GitHub committed 2022-10-04 14:46:17 -05:00
1 parent 8e369d3fb5
commit f01058e073
4 files changed
+44 -26

No files matched your search

@@ -44,6 +44,11 @@ function BookingListItem(booking: BookingItemProps) {
const mutation = trpc.useMutation(["viewer.bookings.confirm"], {
onSuccess: () => {
setRejectionDialogIsOpen(false);
showToast(t("booking_confirmation_success"), "success");
utils.invalidateQueries("viewer.bookings");
},
onError: () => {
showToast(t("booking_confirmation_failed"), "error");
utils.invalidateQueries("viewer.bookings");
},
});
+1 -1
View File
@@ -52,7 +52,7 @@ const Item = ({ type, group, readOnly }: { type: EventType; group: EventTypeGrou
const { t } = useLocale();
return (
<Link href={`/event-types/${type.id}?tabName=setup`}>
<Link href={`/event-types/${type.id}`}>
<a
className="flex-grow truncate text-sm"
title={`${type.title} ${type.description ? `– ${type.description}` : ""}`}>
@@ -1275,5 +1275,7 @@
"ignore_special_characters": "Ignore special characters in your Additional Input label. Use only letters and numbers",
"retry": "Retry",
"fetching_calendars_error": "There was a problem fetching your calendars. Please <1>try again</1> or reach out to customer support.",
"calendar_connection_fail": "Calendar connection failed"
"calendar_connection_fail": "Calendar connection failed",
"booking_confirmation_success": "Booking confirmation succeeded",
"booking_confirmation_fail": "Booking confirmation failed"
}