Front-end error fixing

This commit is contained in:
Julien Nahum 2023-10-08 17:49:33 +01:00
parent 9228f92903
commit 32fd9f84a2
3 changed files with 15 additions and 13 deletions

View File

@ -38,15 +38,15 @@
<script>
import Modal from '../Modal.vue'
import { mapGetters } from 'vuex'
import {mapGetters} from 'vuex'
import PricingTable from "../pages/pricing/PricingTable.vue";
export default {
name: 'ProTag',
components: {PricingTable, Modal },
components: {PricingTable, Modal},
props: {},
data () {
data() {
return {
showPremiumModal: false,
checkoutLoading: false
@ -59,17 +59,17 @@ export default {
currentWorkSpace: 'open/workspaces/getCurrent',
}),
shouldDisplayProTag() {
if(!window.config.paid_plans_enabled) return false
if (!this.user) return true
return !(this.currentWorkSpace().is_pro || this.currentWorkSpace().is_enterprise)
if (!window.config.paid_plans_enabled) return false
if (!this.user || !this.currentWorkSpace) return true
return !(this.currentWorkSpace.is_pro)
},
},
mounted () {
mounted() {
},
methods: {
openChat () {
openChat() {
window.$crisp.push(['do', 'chat:show'])
window.$crisp.push(['do', 'chat:open'])
},

View File

@ -67,7 +67,7 @@
</svg>
Duplicate form
</a>
<a href="#" v-if="user.template_editor"
<a href="#" v-if="user && user.template_editor"
class="block block px-4 py-2 text-md text-gray-700 dark:text-white hover:bg-gray-100 hover:text-gray-900 dark:text-gray-100 dark:hover:text-white dark:hover:bg-gray-600 flex items-center"
@click.prevent="showFormTemplateModal=true"
>

View File

@ -131,7 +131,9 @@ export default {
this.isGuest = false
this.loadWorkspaces()
setTimeout(() => {
if (this.$refs.editor) {
this.$refs.editor.saveFormCreate()
}
}, 500)
},
formGenerated(form) {