fix: only show Invite Member settings page if manager

This commit is contained in:
Shariq Ansari 2024-10-25 17:56:42 +05:30
parent fb6246e1f2
commit 6dc2199a81

View File

@ -53,6 +53,7 @@ import WhatsAppSettings from '@/components/Settings/WhatsAppSettings.vue'
import ERPNextSettings from '@/components/Settings/ERPNextSettings.vue'
import TwilioSettings from '@/components/Settings/TwilioSettings.vue'
import SidebarLink from '@/components/SidebarLink.vue'
import { usersStore } from '@/stores/users'
import {
isWhatsappInstalled,
showSettings,
@ -61,6 +62,8 @@ import {
import { Dialog, Plans, Billing } from 'frappe-ui'
import { ref, markRaw, computed, watch } from 'vue'
const { isManager } = usersStore()
const tabs = computed(() => {
let _tabs = [
{
@ -76,6 +79,7 @@ const tabs = computed(() => {
label: __('Invite Members'),
icon: 'user-plus',
component: markRaw(InviteMemberPage),
condition: () => isManager(),
},
],
},