Skip to content

Commit 3d9361d

Browse files
Merge branch 'main' into steps-storybook
2 parents e501fa9 + 053da1e commit 3d9361d

3 files changed

Lines changed: 23 additions & 3 deletions

File tree

apps/web/pages/booking/[uid].tsx

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ const querySchema = z.object({
9393
});
9494

9595
export default function Success(props: SuccessProps) {
96-
const { t } = useLocale();
96+
const { t, i18n } = useLocale();
9797
const router = useRouter();
9898
const routerQuery = useRouterQuery();
9999
const pathname = usePathname();
@@ -478,6 +478,21 @@ export default function Success(props: SuccessProps) {
478478
</div>
479479
</>
480480
)}
481+
{props.paymentStatus && (
482+
<>
483+
<div className="mt-3 font-medium">
484+
{props.paymentStatus.paymentOption === "HOLD"
485+
? t("complete_your_booking")
486+
: t("payment")}
487+
</div>
488+
<div className="col-span-2 mb-2 mt-3">
489+
{new Intl.NumberFormat(i18n.language, {
490+
style: "currency",
491+
currency: props.paymentStatus.currency,
492+
}).format(props.paymentStatus.amount / 100.0)}
493+
</div>
494+
</>
495+
)}
481496
{bookingInfo?.description && (
482497
<>
483498
<div className="mt-9 font-medium">{t("additional_notes")}</div>
@@ -1115,6 +1130,9 @@ export async function getServerSideProps(context: GetServerSidePropsContext) {
11151130
select: {
11161131
success: true,
11171132
refunded: true,
1133+
currency: true,
1134+
amount: true,
1135+
paymentOption: true,
11181136
},
11191137
});
11201138

packages/app-store/_utils/getEventTypeAppData.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,14 @@ export const getEventTypeAppData = <T extends EventTypeAppsList>(
1818
return allowDataGet
1919
? {
2020
...appMetadata,
21+
// We should favor eventType's price and currency over appMetadata's price and currency
22+
price: eventType.price || appMetadata.price,
23+
currency: eventType.currency || appMetadata.currency,
2124
// trackingId is legacy way to store value for TRACKING_ID. So, we need to support both.
2225
TRACKING_ID: appMetadata.TRACKING_ID || appMetadata.trackingId,
2326
}
2427
: null;
2528
}
26-
2729
// Backward compatibility for existing event types.
2830
// TODO: After the new AppStore EventType App flow is stable, write a migration to migrate metadata to new format which will let us remove this compatibility code
2931
// Migration isn't being done right now, to allow a revert if needed

packages/lib/getEventTypeById.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ export default async function getEventTypeById({
227227
app: {
228228
enabled: true,
229229
categories: {
230-
hasSome: [AppCategories.conferencing, AppCategories.video],
230+
hasSome: [AppCategories.conferencing, AppCategories.video, AppCategories.payment],
231231
},
232232
},
233233
},

0 commit comments

Comments
 (0)