Fix Navbar help button

This commit is contained in:
Julien Nahum 2024-01-15 13:18:02 +01:00
parent 95b34ab680
commit cf499e7274
1 changed files with 5 additions and 4 deletions

View File

@ -31,7 +31,7 @@
</NuxtLink> </NuxtLink>
<a v-if="hasCrisp" href="#" <a v-if="hasCrisp" href="#"
class="text-sm text-gray-600 dark:text-white hover:text-gray-800 cursor-pointer mt-1" class="text-sm text-gray-600 dark:text-white hover:text-gray-800 cursor-pointer mt-1"
@click.prevent="openCrisp" @click.prevent="openHelpdesk"
> >
Help Help
</a> </a>
@ -141,6 +141,7 @@ import {computed} from 'vue'
import Dropdown from '~/components/global/Dropdown.vue' import Dropdown from '~/components/global/Dropdown.vue'
import WorkspaceDropdown from './WorkspaceDropdown.vue' import WorkspaceDropdown from './WorkspaceDropdown.vue'
import opnformConfig from "~/opnform.config.js"; import opnformConfig from "~/opnform.config.js";
import {useRuntimeConfig} from "#app";
export default { export default {
components: { components: {
@ -149,11 +150,11 @@ export default {
}, },
async setup() { async setup() {
const {openCrisp} = useCrisp() const {openHelpdesk} = useCrisp()
const authStore = useAuthStore() const authStore = useAuthStore()
return { return {
authStore, authStore,
openCrisp, openHelpdesk,
opnformConfig, opnformConfig,
appStore: useAppStore(), appStore: useAppStore(),
formsStore: useFormsStore(), formsStore: useFormsStore(),
@ -202,7 +203,7 @@ export default {
return this.user && this.user.has_forms === true return this.user && this.user.has_forms === true
}, },
hasCrisp() { hasCrisp() {
return this.config.crispWebsiteId return this.config.public.crispWebsiteId && this.config.public.crispWebsiteId !== ''
} }
}, },