Skip to content

Commit

Permalink
Add dry-run success apge
Browse files Browse the repository at this point in the history
  • Loading branch information
hariombalhara committed Dec 20, 2024
1 parent 14c3265 commit fa4fa8b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
14 changes: 14 additions & 0 deletions apps/web/app/booking/dry-run-successful/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { useLocale } from "@calcom/lib/hooks/useLocale";

export default function DryRunSuccessful() {
const { t } = useLocale("common");
// TODO: Improve this page to show dry run booking details as a follow-up
return (
<div className="bg-subtle flex h-screen">
<div className="bg-default m-auto rounded-md p-10 text-center">
<h1 className="text-emphasis mb-4 text-2xl font-medium">{t("booking_dry_run_successful")}</h1>
<p className="text-default mb-8 max-w-2xl text-sm">{t("booking_dry_run_successful_description")}</p>
</div>
</div>
);
}
1 change: 1 addition & 0 deletions apps/web/public/static/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -2815,6 +2815,7 @@
"salesforce_owner_name_to_change": "Owner name to change",
"no_filter_set": "No filter set",
"booking_dry_run_successful": "Booking dry run successful",
"booking_dry_run_successful_description": "The dry run was completed successfully.",
"dont_have_access_this_page": "You don't have access to this page",
"you_need_admin_or_owner_privileges_to_access": "In order to view or interact with this page, you must have admin or owner privileges",
"field_type": "Field type",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ export const useBookings = ({ event, hashedLink, bookingForm, metadata, teamMemb
mutationFn: createBooking,
onSuccess: (booking) => {
if (booking.isDryRun) {
showToast(t("booking_dry_run_successful"), "success");
router.push("/booking/dry-run-successful");
return;
}
const { uid, paymentUid } = booking;
Expand Down Expand Up @@ -311,7 +311,7 @@ export const useBookings = ({ event, hashedLink, bookingForm, metadata, teamMemb
const booking = bookings[0] || {};

if (booking.isDryRun) {
showToast(t("booking_dry_run_successful"), "success");
router.push("/booking/dry-run-successful");
return;
}

Expand Down

0 comments on commit fa4fa8b

Please sign in to comment.