{"id":28,"date":"2026-05-27T06:31:07","date_gmt":"2026-05-27T06:31:07","guid":{"rendered":"https:\/\/slcstest.com\/?page_id=28"},"modified":"2026-07-10T02:06:01","modified_gmt":"2026-07-10T02:06:01","slug":"sbdc-scheduler-test","status":"publish","type":"page","link":"https:\/\/slcstest.com\/?page_id=28","title":{"rendered":"SBDC Scheduler Test"},"content":{"rendered":"\n\n<div id=\"lightningLocator\" style=\"display:none;\"><\/div>\n\n \n\n<style>\n  .btn-wrapper {\n    text-align: center;\n    margin-bottom: 20px;\n  }\n \n  .book-appointment-btn {\n    display: inline-block;\n    background-color: #185A7D;\n    color: #ffffff;\n    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;\n    font-size: 16px;\n    font-weight: 600;\n    padding: 14px 28px;\n    border: none;\n    border-radius: 6px;\n    cursor: pointer;\n    transition: background-color 0.2s ease, box-shadow 0.2s ease;\n  }\n \n  .book-appointment-btn:hover {\n    background-color: #134e6f;\n    box-shadow: 0 4px 12px rgba(24, 90, 125, 0.35);\n  }\n \n  .book-appointment-btn:active {\n    background-color: #0f3d57;\n  }\n \n  .scheduler-modal {\n  display: none;\n  position: fixed;\n  top: 50%;\n  left: 50%;\n  transform: translate(-50%, -50%);\n  background: #ffffff;\n  border-radius: 10px;\n  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);\n  z-index: 9999;\n  width: 95%;          \/* was 90% *\/\n  max-width: 1100px;   \/* was 860px *\/\n  max-height: 88vh;\n  overflow-y: auto;\n  animation: slideUp 0.25s ease;\n}\n \n  .scheduler-modal.active {\n    display: block;\n  }\n \n  .scheduler-modal-header {\n    display: flex;\n    align-items: center;\n    justify-content: space-between;\n    padding: 16px 24px;\n    border-bottom: 1px solid #e5e7eb;\n    position: sticky;\n    top: 0;\n    background: #fff;\n    z-index: 1;\n  }\n \n  .scheduler-modal-header h2 {\n    margin: 0;\n    font-size: 17px;\n    font-weight: 600;\n    color: #185A7D;\n    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;\n  }\n \n  .scheduler-close-btn {\n    background: none;\n    border: none;\n    cursor: pointer;\n    color: #6b7280;\n    font-size: 22px;\n    line-height: 1;\n    padding: 4px 8px;\n    border-radius: 4px;\n    transition: background 0.15s ease, color 0.15s ease;\n  }\n \n  .scheduler-close-btn:hover {\n    background: #f3f4f6;\n    color: #111827;\n  }\n \n  .scheduler-modal-body {\n    padding: 24px;\n    min-height: 300px;\n  }\n  \n  h2[aria-label=\"Select Service Appointment Time\"] {\n    visibility: hidden !important;\n    position: relative !important;\n  }\n\n  h2[aria-label=\"Select Service Appointment Time\"]::after {\n    content: \"Select a Date & Time\";\n    visibility: visible !important;\n    position: absolute !important;\n    left: 0;\n    right: 0;\n  }\n\n  flowruntime-visual-picker .slds-form-element__control {\n      display: flex !important;\n      flex-wrap: wrap !important;\n      justify-content: center !important;\n  }\n  flowruntime-visual-picker {\n  justify-content: center !important;\n  display: flex !important;\n  flex-wrap: wrap !important;\n  }\n \n  @keyframes slideUp {\n    from { opacity: 0; transform: translate(-50%, -46%); }\n    to   { opacity: 1; transform: translate(-50%, -50%); }\n  }\n<\/style>\n \n<!-- Trigger button -->\n<div class=\"btn-wrapper\">\n<button class=\"book-appointment-btn\" onclick=\"openScheduler()\">\n    Book an online or phone appointment\n<\/button>\n<\/div>\n \n<!-- Modal -->\n<div class=\"scheduler-modal\" id=\"schedulerModal\">\n<div class=\"scheduler-modal-header\">\n<h2>Book an Appointment<\/h2>\n<button class=\"scheduler-close-btn\" onclick=\"closeScheduler()\" aria-label=\"Close\">&#x2715;<\/button>\n<\/div>\n<div class=\"scheduler-modal-body\">\n<!-- THIS is where the flow renders \u2014 inside the modal -->\n<div id=\"lightningLocatorModal\"><\/div>\n<\/div>\n<\/div>\n \n<script src=\"https:\/\/smallbusinesswa--dev2026.sandbox.my.site.com\/scheduler\/lightning\/lightning.out.js\"><\/script>\n<script>\n  var schedulerLoaded = false;\n \n  function openScheduler() {\n    document.getElementById('schedulerModal').classList.add('active');\n    document.body.style.overflow = 'hidden';\n \n    if (!schedulerLoaded) {\n      schedulerLoaded = true;\n      $Lightning.use(\n        \"c:TestFlowApp\",\n        function() {\n          $Lightning.createComponent(\n            \"c:SchedulerWrapper\",\n            {},\n            \"lightningLocatorModal\", \/\/ \u2190 points to the div INSIDE the modal\n            function(cmp) {\n              console.log('Scheduler loaded inside modal');\n            }\n          );\n        },\n        'https:\/\/smallbusinesswa--dev2026.sandbox.my.site.com\/scheduler'\n      );\n    }\n  }\n \n  function closeScheduler() {\n    document.getElementById('schedulerModal').classList.remove('active');\n    document.body.style.overflow = '';\n  }\n \n  document.addEventListener('keydown', function(e) {\n    if (e.key === 'Escape') closeScheduler();\n  });\n<\/script>\n\n","protected":false},"excerpt":{"rendered":"<p>Book an online or phone appointment Book an Appointment &#x2715;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-28","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/slcstest.com\/index.php?rest_route=\/wp\/v2\/pages\/28","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/slcstest.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/slcstest.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/slcstest.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/slcstest.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=28"}],"version-history":[{"count":41,"href":"https:\/\/slcstest.com\/index.php?rest_route=\/wp\/v2\/pages\/28\/revisions"}],"predecessor-version":[{"id":94,"href":"https:\/\/slcstest.com\/index.php?rest_route=\/wp\/v2\/pages\/28\/revisions\/94"}],"wp:attachment":[{"href":"https:\/\/slcstest.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=28"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}