@bigz-app/booking-widget 1.1.6 → 1.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/booking-widget.js +12 -2
- package/dist/booking-widget.js.map +1 -1
- package/dist/components/booking/BookingForm.d.ts.map +1 -1
- package/dist/components/booking/PaymentForm.d.ts.map +1 -1
- package/dist/index.cjs +12 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +12 -2
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -6484,6 +6484,7 @@ function PaymentForm({ config, eventDetails, formData, totalAmount, discountCode
|
|
|
6484
6484
|
formData.participants,
|
|
6485
6485
|
formData.customerEmail,
|
|
6486
6486
|
formData.customerName,
|
|
6487
|
+
formData.comment,
|
|
6487
6488
|
totalAmount,
|
|
6488
6489
|
discountCode,
|
|
6489
6490
|
giftCards,
|
|
@@ -11045,6 +11046,8 @@ function BookingForm({ config, eventDetails, stripePromise, onSuccess, onError,
|
|
|
11045
11046
|
const watchedParticipants = form.watch("participants");
|
|
11046
11047
|
const watchedCustomerName = form.watch("customerName");
|
|
11047
11048
|
const watchedCustomerEmail = form.watch("customerEmail");
|
|
11049
|
+
const watchedComment = form.watch("comment");
|
|
11050
|
+
const watchedCustomerPhone = form.watch("customerPhone");
|
|
11048
11051
|
const customerNameError = form.formState.errors.customerName;
|
|
11049
11052
|
const customerEmailError = form.formState.errors.customerEmail;
|
|
11050
11053
|
const watchedAcceptTerms = form.watch("acceptTerms");
|
|
@@ -11156,6 +11159,13 @@ function BookingForm({ config, eventDetails, stripePromise, onSuccess, onError,
|
|
|
11156
11159
|
participantIndices,
|
|
11157
11160
|
}));
|
|
11158
11161
|
}, [participantUpsells, watchedParticipants]);
|
|
11162
|
+
const paymentFormData = useMemo(() => ({
|
|
11163
|
+
customerName: watchedCustomerName,
|
|
11164
|
+
customerEmail: watchedCustomerEmail,
|
|
11165
|
+
customerPhone: watchedCustomerPhone,
|
|
11166
|
+
participants: watchedParticipants,
|
|
11167
|
+
comment: watchedComment,
|
|
11168
|
+
}), [watchedCustomerName, watchedCustomerEmail, watchedCustomerPhone, watchedParticipants, watchedComment]);
|
|
11159
11169
|
const appliedDiscountCode = appliedVouchers.find((v) => v.type === "discount");
|
|
11160
11170
|
const appliedGiftCards = appliedVouchers.filter((v) => v.type === "giftCard");
|
|
11161
11171
|
const handleVoucherValidated = useCallback((voucher, _error) => {
|
|
@@ -11545,9 +11555,9 @@ function BookingForm({ config, eventDetails, stripePromise, onSuccess, onError,
|
|
|
11545
11555
|
}
|
|
11546
11556
|
: null;
|
|
11547
11557
|
if (systemConfig?.paymentProvider === "mollie") {
|
|
11548
|
-
return (jsxs("div", { style: cardStyles, children: [jsx("h2", { style: { ...sectionHeaderStyles }, children: t$1("summary.payment") }), jsx(MolliePaymentForm, { config: config, eventDetails: eventDetails, formData:
|
|
11558
|
+
return (jsxs("div", { style: cardStyles, children: [jsx("h2", { style: { ...sectionHeaderStyles }, children: t$1("summary.payment") }), jsx(MolliePaymentForm, { config: config, eventDetails: eventDetails, formData: paymentFormData, totalAmount: paymentAmount, discountCode: discountCodeProp, giftCards: appliedGiftCards, onSuccess: onSuccess, onError: onError, upsellSelections: aggregatedUpsellSelections(), mollieProfileId: systemConfig?.mollieProfileId, mollieTestmode: systemConfig?.mollieTestmode })] }));
|
|
11549
11559
|
}
|
|
11550
|
-
return (jsxs("div", { style: cardStyles, children: [jsx("h2", { style: { ...sectionHeaderStyles }, children: t$1("summary.payment") }), jsx(PaymentForm, { config: config, eventDetails: eventDetails, formData:
|
|
11560
|
+
return (jsxs("div", { style: cardStyles, children: [jsx("h2", { style: { ...sectionHeaderStyles }, children: t$1("summary.payment") }), jsx(PaymentForm, { config: config, eventDetails: eventDetails, formData: paymentFormData, totalAmount: paymentAmount, discountCode: discountCodeProp, giftCards: appliedGiftCards, onSuccess: onSuccess, onError: onError, systemConfig: systemConfig ?? null, stripePromise: stripePromise, stripeAppearance: stripeAppearance, upsellSelections: aggregatedUpsellSelections() })] }));
|
|
11551
11561
|
})() })] })] })] }) }));
|
|
11552
11562
|
}
|
|
11553
11563
|
|