Allow non-admin team members also to reroute (#17234)
This commit is contained in:
1 parent
2f4dd328c3
commit
86af6bd626
4 files changed
+35
-11
No files matched your search
@@ -696,13 +696,13 @@ const RerouteDialogContentAndFooter = ({
|
||||
}: Pick<RerouteDialogProps, "isOpenDialog" | "setIsOpenDialog"> & {
|
||||
booking: TeamEventTypeBookingToReroute;
|
||||
}) => {
|
||||
const { data: responseWithForm, isPending: isRoutingFormLoading } =
|
||||
const { data: responseWithForm, isPending: isRoutingFormLoading, error: formResponseFetchError } =
|
||||
trpc.viewer.appRoutingForms.getResponseWithFormFields.useQuery({
|
||||
formResponseId: booking.routedFromRoutingFormReponse.id,
|
||||
});
|
||||
|
||||
const { t } = useLocale();
|
||||
// useUpdateIsReroutingQueryParam({ isOpenDialog });
|
||||
|
||||
if (isRoutingFormLoading)
|
||||
return (
|
||||
<>
|
||||
@@ -718,7 +718,11 @@ const RerouteDialogContentAndFooter = ({
|
||||
</>
|
||||
);
|
||||
|
||||
if (!responseWithForm) return <div>{t("something_went_wrong")}</div>;
|
||||
if (formResponseFetchError) {
|
||||
return <div className="mb-8">{formResponseFetchError.message}</div>;
|
||||
}
|
||||
|
||||
if (!responseWithForm) return <div className="mb-8">{t("something_went_wrong")}</div>;
|
||||
|
||||
return (
|
||||
<RerouteDialogContentAndFooterWithFormResponse
|
||||
|
||||
@@ -2685,5 +2685,7 @@
|
||||
"reschedule_with_different_timeslot": "Reschedule with different timeslot",
|
||||
"we_dont_have_id_for_the_new_event": "We don't have ID for the new event. Please go to the Routing Form and save it again.",
|
||||
"rerouted_booking_successfully_redirecting_to_booking_page": "Rerouted booking successfully. Redirecting to booking page",
|
||||
"you_dont_have_access_to_reroute_this_booking": "You don't have access to reroute this booking",
|
||||
"form_response_not_found": "Form response not found",
|
||||
"ADD_NEW_STRINGS_ABOVE_THIS_LINE_TO_PREVENT_MERGE_CONFLICTS": "↑↑↑↑↑↑↑↑↑↑↑↑↑ Add your new strings above here ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑"
|
||||
}
|
||||
Reference in new issue
Block a user