releasebird-javascript-sdk 1.0.92 → 1.0.93
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.
|
@@ -27,6 +27,7 @@ export class RbirdBookingManager {
|
|
|
27
27
|
/**
|
|
28
28
|
* Show the booking modal
|
|
29
29
|
* @param {Object} options - Optional configuration
|
|
30
|
+
* @param {string} options.appointmentTypeId - Pre-select a specific appointment type
|
|
30
31
|
* @param {Function} options.onSuccess - Callback when booking is completed
|
|
31
32
|
* @param {Function} options.onClose - Callback when modal is closed
|
|
32
33
|
*/
|
|
@@ -56,6 +57,9 @@ export class RbirdBookingManager {
|
|
|
56
57
|
if (sessionManager.anonymousIdentifier) {
|
|
57
58
|
iframeUrl += `&ai=${sessionManager.anonymousIdentifier}`;
|
|
58
59
|
}
|
|
60
|
+
if (options.appointmentTypeId) {
|
|
61
|
+
iframeUrl += `&appointmentTypeId=${encodeURIComponent(options.appointmentTypeId)}`;
|
|
62
|
+
}
|
|
59
63
|
|
|
60
64
|
this.createModal(iframeUrl, options);
|
|
61
65
|
this.isOpen = true;
|
package/src/index.js
CHANGED
|
@@ -211,6 +211,7 @@ class Rbird {
|
|
|
211
211
|
/**
|
|
212
212
|
* Show the booking modal
|
|
213
213
|
* @param {Object} options - Optional configuration
|
|
214
|
+
* @param {string} options.appointmentTypeId - Pre-select a specific appointment type
|
|
214
215
|
* @param {Function} options.onSuccess - Callback when booking is completed
|
|
215
216
|
* @param {Function} options.onClose - Callback when modal is closed
|
|
216
217
|
*/
|