-
Notifications
You must be signed in to change notification settings - Fork 32
⚗️ [Frontend] Integrate the 3rd party Appointment Booking tool #8391
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
odeimaiz
merged 7 commits into
ITISFoundation:master
from
odeimaiz:enh/integrate-book-a-call
Sep 19, 2025
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
5702811
BookACallIframe
odeimaiz 2670478
set background color
odeimaiz bb07919
Finish BookACallIframe
odeimaiz ac741b6
minor
odeimaiz c165228
3rd button
odeimaiz 596e938
minor
odeimaiz b590079
Merge branch 'master' into enh/integrate-book-a-call
odeimaiz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 73 additions & 0 deletions
73
services/static-webserver/client/source/class/osparc/wrapper/BookACallIframe.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| /* ************************************************************************ | ||
|
|
||
| osparc - the simcore frontend | ||
|
|
||
| https://osparc.io | ||
|
|
||
| Copyright: | ||
| 2025 IT'IS Foundation, https://itis.swiss | ||
|
|
||
| License: | ||
| MIT: https://opensource.org/licenses/MIT | ||
|
|
||
| Authors: | ||
| * Odei Maiz (odeimaiz) | ||
|
|
||
| ************************************************************************ */ | ||
|
|
||
| qx.Class.define("osparc.wrapper.BookACallIframe", { | ||
| extend: qx.ui.embed.Iframe, | ||
|
|
||
| construct: function() { | ||
| // Build base URL | ||
| let url = osparc.wrapper.BookACallIframe.SERVICE_URL; | ||
|
|
||
| const params = []; | ||
| const myAuthData = osparc.auth.Data.getInstance(); | ||
| const firstName = myAuthData.getFirstName(); | ||
| if (firstName) { | ||
| params.push("first_name=" + encodeURIComponent(firstName)); | ||
| } | ||
| const lastName = myAuthData.getLastName(); | ||
| if (lastName) { | ||
| params.push("last_name=" + encodeURIComponent(lastName)); | ||
| } | ||
| const email = myAuthData.getEmail(); | ||
| if (email) { | ||
| params.push("email=" + encodeURIComponent(email)); | ||
| } | ||
|
|
||
| if (params.length > 0) { | ||
| url += "?" + params.join("&"); | ||
| } | ||
|
|
||
| // Call parent constructor | ||
| this.base(arguments, url); | ||
|
|
||
| this.setAppearance("iframe-no-border"); | ||
|
|
||
| // not only once, every time there is a load (e.g. when navigating in the iframe) | ||
| this.addListener("load", () => this.__updateStyles(), this); | ||
| }, | ||
|
|
||
| statics: { | ||
| SERVICE_URL: "http://localhost:8000/booking", | ||
| }, | ||
|
|
||
| members: { | ||
| __updateStyles: function() { | ||
| const colorManager = qx.theme.manager.Color.getInstance(); | ||
| const iframe = this.getContentElement().getDomElement(); | ||
| const theme = { | ||
| '--bs-body-bg': colorManager.resolve("background-main-1"), | ||
| '--osparc-text-color': colorManager.resolve("text"), | ||
| '--osparc-primary': colorManager.resolve("product-color"), | ||
| }; | ||
| const url = new URL(this.self().SERVICE_URL); | ||
| iframe.contentWindow.postMessage({ | ||
| type: 'osparc-theme', | ||
| theme | ||
| }, url.origin); // targetOrigin = iframe origin | ||
odeimaiz marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| }, | ||
| } | ||
| }); | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.