fix: Disable AI Assist CTA if not required (#8375)

- Show CTAs only on production
This commit is contained in:
Pranav Raj S
2023-11-17 20:10:46 -08:00
committed by GitHub
parent 0af27a2387
commit 146e46d79f
2 changed files with 4 additions and 1 deletions

View File

@@ -61,6 +61,7 @@ export default {
computed: { computed: {
...mapGetters({ ...mapGetters({
currentChat: 'getSelectedChat', currentChat: 'getSelectedChat',
isAChatwootInstance: 'globalConfig/isAChatwootInstance',
}), }),
isAICTAModalDismissed() { isAICTAModalDismissed() {
return this.uiSettings.is_open_ai_cta_modal_dismissed; return this.uiSettings.is_open_ai_cta_modal_dismissed;
@@ -70,7 +71,8 @@ export default {
return ( return (
this.isAdmin && this.isAdmin &&
!this.isAIIntegrationEnabled && !this.isAIIntegrationEnabled &&
!this.isAICTAModalDismissed !this.isAICTAModalDismissed &&
this.isAChatwootInstance
); );
}, },
// Display a AI CTA button for agents and other admins who have not yet opened the AI assistance modal. // Display a AI CTA button for agents and other admins who have not yet opened the AI assistance modal.

View File

@@ -50,6 +50,7 @@ export const getters = {
get: $state => $state, get: $state => $state,
isOnChatwootCloud: $state => $state.deploymentEnv === 'cloud', isOnChatwootCloud: $state => $state.deploymentEnv === 'cloud',
isACustomBrandedInstance: $state => $state.installationName !== 'Chatwoot', isACustomBrandedInstance: $state => $state.installationName !== 'Chatwoot',
isAChatwootInstance: $state => $state.installationName === 'Chatwoot',
}; };
export const actions = {}; export const actions = {};