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:
@@ -4,6 +4,7 @@ import Auth from '../../../api/auth';
|
||||
import WootDropdownItem from 'shared/components/ui/dropdown/DropdownItem.vue';
|
||||
import WootDropdownMenu from 'shared/components/ui/dropdown/DropdownMenu.vue';
|
||||
import AvailabilityStatus from 'dashboard/components/layout/AvailabilityStatus.vue';
|
||||
import { FEATURE_FLAGS } from '../../../featureFlags';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -28,6 +29,7 @@ export default {
|
||||
currentUser: 'getCurrentUser',
|
||||
globalConfig: 'globalConfig/get',
|
||||
accountId: 'getCurrentAccountId',
|
||||
isFeatureEnabledonAccount: 'accounts/isFeatureEnabledonAccount',
|
||||
}),
|
||||
showChangeAccountOption() {
|
||||
if (this.globalConfig.createNewAccountFromDashboard) {
|
||||
@@ -37,6 +39,14 @@ export default {
|
||||
const { accounts = [] } = this.currentUser;
|
||||
return accounts.length > 1;
|
||||
},
|
||||
showChatSupport() {
|
||||
return (
|
||||
this.isFeatureEnabledonAccount(
|
||||
this.accountId,
|
||||
FEATURE_FLAGS.CONTACT_CHATWOOT_SUPPORT_TEAM
|
||||
) && this.globalConfig.chatwootInboxToken
|
||||
);
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
handleProfileSettingClick(e, navigate) {
|
||||
@@ -82,7 +92,7 @@ export default {
|
||||
{{ $t('SIDEBAR_ITEMS.CHANGE_ACCOUNTS') }}
|
||||
</woot-button>
|
||||
</WootDropdownItem>
|
||||
<WootDropdownItem v-if="globalConfig.chatwootInboxToken">
|
||||
<WootDropdownItem v-if="showChatSupport">
|
||||
<woot-button
|
||||
variant="clear"
|
||||
color-scheme="secondary"
|
||||
|
||||
Reference in New Issue
Block a user