From 9c7d46b53bf32b7cbb59954fd1d907cd78f76aa6 Mon Sep 17 00:00:00 2001 From: formsdev <136701234+formsdev@users.noreply.github.com> Date: Fri, 5 Jan 2024 15:30:34 +0530 Subject: [PATCH] Templates pages migration (#275) --- client/components/global/Navbar.vue | 2 +- .../templates/FormTemplateModal.vue | 202 ++++++++---------- client/pages/templates/[slug].vue | 12 +- client/pages/templates/industries/[slug].vue | 2 +- client/pages/templates/my-templates.vue | 42 ++-- 5 files changed, 121 insertions(+), 139 deletions(-) diff --git a/client/components/global/Navbar.vue b/client/components/global/Navbar.vue index 4016b69..506cfcb 100644 --- a/client/components/global/Navbar.vue +++ b/client/components/global/Navbar.vue @@ -203,7 +203,7 @@ export default { return !this.appStore.navbarHidden }, userOnboarded() { - return this.user && this.user.workspaces_count > 0 + return this.user && this.user.has_forms === true }, hasCrisp() { return this.config.crispWebsiteId diff --git a/client/components/open/forms/components/templates/FormTemplateModal.vue b/client/components/open/forms/components/templates/FormTemplateModal.vue index c634bc7..b81ce46 100644 --- a/client/components/open/forms/components/templates/FormTemplateModal.vue +++ b/client/components/open/forms/components/templates/FormTemplateModal.vue @@ -1,5 +1,5 @@ - + Delete - + Close @@ -71,118 +71,104 @@ - diff --git a/client/pages/templates/[slug].vue b/client/pages/templates/[slug].vue index 4e768fe..990427c 100644 --- a/client/pages/templates/[slug].vue +++ b/client/pages/templates/[slug].vue @@ -6,9 +6,9 @@ Edit Template - - - + @@ -199,7 +199,8 @@ import {computed} from 'vue' import OpenCompleteForm from '../../components/open/forms/OpenCompleteForm.vue' import Breadcrumb from '~/components/global/Breadcrumb.vue' import SingleTemplate from '../../components/pages/templates/SingleTemplate.vue' -import {fetchTemplate} from "~/stores/templates.js"; +import {fetchTemplate} from "~/stores/templates.js" +import FormTemplateModal from '~/components/open/forms/components/templates/FormTemplateModal.vue' defineRouteRules({ prerender: true @@ -262,7 +263,8 @@ const copyTemplateUrl = () => { useOpnSeoMeta({ title: () => { - return template ? template.value.name : 'Form Template' + if (!template || !template.value) return 'Form Template' + return template.value.name }, description () { if (!template || !template.value) return null diff --git a/client/pages/templates/industries/[slug].vue b/client/pages/templates/industries/[slug].vue index 3adca8c..9ba6b37 100644 --- a/client/pages/templates/industries/[slug].vue +++ b/client/pages/templates/industries/[slug].vue @@ -23,7 +23,7 @@ - + diff --git a/client/pages/templates/my-templates.vue b/client/pages/templates/my-templates.vue index 57f9afa..e8d62a7 100644 --- a/client/pages/templates/my-templates.vue +++ b/client/pages/templates/my-templates.vue @@ -13,34 +13,28 @@ - + -