chore: Add internal feature flags for Chatwoot Cloud (#10902)
This PR introduces internal feature flags for testing purposes. These flags will not be displayed on regular instances to prevent customer confusion. Additionally, a new feature flag, `contact_chatwoot_support_team`, has been added for Chatwoot Cloud. This flag disables contact support for third-party onboarded accounts, as support will be handled by the original affiliate team. Co-authored-by: Pranav <pranav@chatwoot.com>
This commit is contained in:
@@ -5,6 +5,7 @@ import { useMapGetter } from 'dashboard/composables/store';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import Avatar from 'next/avatar/Avatar.vue';
|
||||
import SidebarProfileMenuStatus from './SidebarProfileMenuStatus.vue';
|
||||
import { FEATURE_FLAGS } from 'dashboard/featureFlags';
|
||||
|
||||
import {
|
||||
DropdownContainer,
|
||||
@@ -21,14 +22,27 @@ defineOptions({
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const globalConfig = useMapGetter('globalConfig/get');
|
||||
const currentUser = useMapGetter('getCurrentUser');
|
||||
const currentUserAvailability = useMapGetter('getCurrentUserAvailability');
|
||||
const accountId = useMapGetter('getCurrentAccountId');
|
||||
const globalConfig = useMapGetter('globalConfig/get');
|
||||
const isFeatureEnabledonAccount = useMapGetter(
|
||||
'accounts/isFeatureEnabledonAccount'
|
||||
);
|
||||
|
||||
const showChatSupport = computed(() => {
|
||||
return (
|
||||
isFeatureEnabledonAccount.value(
|
||||
accountId.value,
|
||||
FEATURE_FLAGS.CONTACT_CHATWOOT_SUPPORT_TEAM
|
||||
) && globalConfig.value.chatwootInboxToken
|
||||
);
|
||||
});
|
||||
|
||||
const menuItems = computed(() => {
|
||||
return [
|
||||
{
|
||||
show: !!globalConfig.value.chatwootInboxToken,
|
||||
show: showChatSupport.value,
|
||||
label: t('SIDEBAR_ITEMS.CONTACT_SUPPORT'),
|
||||
icon: 'i-lucide-life-buoy',
|
||||
click: () => {
|
||||
|
||||
Reference in New Issue
Block a user