Hide invite warning for AppSumo users

This commit is contained in:
Julien Nahum 2024-07-26 13:24:34 +02:00
parent 90a53b4d0d
commit 2f497d93c1
3 changed files with 4 additions and 3 deletions

View File

@ -21,7 +21,7 @@
Invite a new user and collaborate on building forms Invite a new user and collaborate on building forms
</h4> </h4>
<template v-if="paidPlansEnabled"> <template v-if="paidPlansEnabled && !hasActiveLicense">
<UAlert <UAlert
v-if="workspace.is_pro" v-if="workspace.is_pro"
icon="i-heroicons-credit-card" icon="i-heroicons-credit-card"
@ -206,7 +206,7 @@ const paidPlansEnabled = computed(() => useRuntimeConfig().public.paidPlansEnabl
const canInviteUser = computed(() => { const canInviteUser = computed(() => {
return paidPlansEnabled.value ? workspace.value.is_pro : true return paidPlansEnabled.value ? workspace.value.is_pro : true
}) })
const hasActiveLicense = computed(() => authStore.has_active_license)
onMounted(() => { onMounted(() => {
getWorkspaceUsers() getWorkspaceUsers()

View File

@ -95,7 +95,7 @@ export default {
form_quantity: "Unlimited", form_quantity: "Unlimited",
file_upload_size: "75mb", file_upload_size: "75mb",
domain_names: "Unlimited", domain_names: "Unlimited",
users: 10 users: 20
}, },
}[this.licenseTier] }[this.licenseTier]
}, },

View File

@ -10,6 +10,7 @@ export const useAuthStore = defineStore("auth", {
}, },
getters: { getters: {
check: (state) => state.user !== null && state.user !== undefined, check: (state) => state.user !== null && state.user !== undefined,
has_active_license: (state) => state.user !== null && state.user !== undefined && state.user.active_license !== null,
isImpersonating: (state) => isImpersonating: (state) =>
state.admin_token !== null && state.admin_token !== undefined, state.admin_token !== null && state.admin_token !== undefined,
}, },