🐛 (calCom) Fix book callback not working on second attempt
This commit is contained in:
@ -49,14 +49,20 @@ export const bookEvent = createAction({
|
|||||||
parseFunction: () => {
|
parseFunction: () => {
|
||||||
return {
|
return {
|
||||||
args: {},
|
args: {},
|
||||||
content: `Cal("on", {
|
content: `{
|
||||||
action: "bookingSuccessful",
|
const callback = (e) => {
|
||||||
callback: (e) => {
|
|
||||||
if(window.calComBooked) return
|
|
||||||
continueFlow(e.detail.data.date)
|
continueFlow(e.detail.data.date)
|
||||||
window.calComBooked = true
|
Cal("off", {
|
||||||
|
action: "bookingSuccessful",
|
||||||
|
callback
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})`,
|
|
||||||
|
Cal("on", {
|
||||||
|
action: "bookingSuccessful",
|
||||||
|
callback
|
||||||
|
})
|
||||||
|
}`,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -107,8 +113,6 @@ export const bookEvent = createAction({
|
|||||||
};
|
};
|
||||||
})(window, baseUrl + "/embed/embed.js", "init");
|
})(window, baseUrl + "/embed/embed.js", "init");
|
||||||
|
|
||||||
window.calComBooked = false;
|
|
||||||
|
|
||||||
Cal("init", { origin: baseUrl });
|
Cal("init", { origin: baseUrl });
|
||||||
|
|
||||||
const location = phone ? JSON.stringify({
|
const location = phone ? JSON.stringify({
|
||||||
|
Reference in New Issue
Block a user