diff --git a/.github/workflows/deploy-frontend-dev.yml b/.github/workflows/deploy-frontend-dev.yml index 93d8bd434..3f0eb402b 100644 --- a/.github/workflows/deploy-frontend-dev.yml +++ b/.github/workflows/deploy-frontend-dev.yml @@ -1,12 +1,9 @@ name: DeployFrontendServerlessDev on: - workflow_run: - workflows: ["DeployBackendDev"] - types: - - completed + push: branches: - - "master" + - "change-schedule-meeting-flow" jobs: deploy-frontend-dev: diff --git a/nuxt-frontend/components/contact/CalendlyIframe.vue b/nuxt-frontend/components/contact/CalendlyIframe.vue index ad5293f15..e3593552c 100644 --- a/nuxt-frontend/components/contact/CalendlyIframe.vue +++ b/nuxt-frontend/components/contact/CalendlyIframe.vue @@ -1,5 +1,5 @@ @@ -29,5 +29,60 @@ export default { isLoading: true, }; }, + mounted() { + this.loadCalendlyWidget(); + this.initializeCalendlyEventListeners(); + }, + beforeDestroy() { + window.removeEventListener("message", this.handleCalendlyEvent); + }, + methods: { + loadCalendlyWidget() { + if (window.Calendly) { + this.initCalendlyWidget(); + } else { + const script = document.createElement("script"); + script.src = "https://assets.calendly.com/assets/external/widget.js"; + script.async = true; + script.onload = this.initCalendlyWidget; + document.head.appendChild(script); + } + }, + initCalendlyWidget() { + Calendly.initInlineWidget({ + url: this.calendlyUrl, + parentElement: document.getElementById("calendly-embed"), + }); + }, + initializeCalendlyEventListeners() { + setTimeout(() => { + this.isLoading = false; + }, 1000); + window.addEventListener("message", this.handleCalendlyEvent); + }, + handleCalendlyEvent(e) { + if ( + e.data.event && + e.data.event.indexOf("calendly") === 0 && + e.data.event === "calendly.event_scheduled" + ) { + setTimeout(() => { + this.$emit("close"); + }, 2000); + } + }, + }, }; + + diff --git a/nuxt-frontend/components/contact/NewContactForm.vue b/nuxt-frontend/components/contact/NewContactForm.vue index 4fa7a7c9c..df61684ef 100755 --- a/nuxt-frontend/components/contact/NewContactForm.vue +++ b/nuxt-frontend/components/contact/NewContactForm.vue @@ -219,8 +219,8 @@ diff --git a/nuxt-frontend/public/images/clients/thank-you/finger-hand.svg b/nuxt-frontend/public/images/clients/thank-you/finger-hand.svg new file mode 100644 index 000000000..f80414b87 --- /dev/null +++ b/nuxt-frontend/public/images/clients/thank-you/finger-hand.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/nuxt-frontend/stores/author/index.js b/nuxt-frontend/stores/author/index.js index 3e0323599..200cbe223 100644 --- a/nuxt-frontend/stores/author/index.js +++ b/nuxt-frontend/stores/author/index.js @@ -35,7 +35,7 @@ export const useAuthorListStore = defineStore("authors", { .get(url) .then((response) => { let posts = []; - response.data.posts.forEach((post) => { + response.data.posts?.forEach((post) => { posts.push(setPostFields(post)); }); this.items = posts; diff --git a/nuxt-frontend/stores/tags/index.js b/nuxt-frontend/stores/tags/index.js index cba48cd6f..888ab1fb0 100644 --- a/nuxt-frontend/stores/tags/index.js +++ b/nuxt-frontend/stores/tags/index.js @@ -13,13 +13,14 @@ export const useTagListStore = defineStore("tag-list", { }; }, actions: { - async loadTagBlogs(slug) { + async loadTagBlogs(showDrafts, slug) { return new Promise((resolve, reject) => { this.isLoading = true; this.error = null; - let url = - config.API_BASE + "/api/posts/tags/" + slug + "?is_published=true"; + let published = showDrafts ? "is_published=false" : "is_published=true"; + + let url = config.API_BASE + "/api/posts/tags/" + slug + "?" + published; axios .get(url)