diff --git a/frontend/control-center/src/components/Sidebar/index.tsx b/frontend/control-center/src/components/Sidebar/index.tsx index 32904d1eb5..854365567c 100644 --- a/frontend/control-center/src/components/Sidebar/index.tsx +++ b/frontend/control-center/src/components/Sidebar/index.tsx @@ -25,7 +25,7 @@ const connector = connect(mapStateToProps); const Sidebar = (props: SideBarProps) => { const {version, components} = props; - const componentInfo = useCurrentComponentForSource(Source.webhooks); + const componentInfo = useCurrentComponentForSource(Source.airyWebhooks); const webhooksEnabled = componentInfo.installationStatus === InstallationStatus.installed; const inboxEnabled = components[Source.frontendInbox]?.enabled || false; diff --git a/frontend/control-center/src/pages/Connectors/index.tsx b/frontend/control-center/src/pages/Connectors/index.tsx index c90923d26b..0e6a78820f 100644 --- a/frontend/control-center/src/pages/Connectors/index.tsx +++ b/frontend/control-center/src/pages/Connectors/index.tsx @@ -1,6 +1,6 @@ import React, {useEffect} from 'react'; import {connect, ConnectedProps} from 'react-redux'; -import {Connector, InstallationStatus, Source} from 'model'; +import {airyProduct, Connector, InstallationStatus} from 'model'; import InfoCard from './InfoCard'; import {StateModel} from '../../reducers'; import {setPageTitle} from '../../services/pageTitle'; @@ -24,11 +24,11 @@ const Connectors = (props: ConnectedProps) => { const installedConnectors = Object.values(connectors).filter( (connector: Connector) => connector.installationStatus === InstallationStatus.installed && - connector.source !== Source.webhooks && + connector.source !== airyProduct && connector.price ); const hasAvailableConnectors = - Object.values(connectors).filter((connector: Connector) => connector.source !== Source.webhooks && connector.price) + Object.values(connectors).filter((connector: Connector) => connector.source !== airyProduct && connector.price) .length > 0; const hasInstalledComponents = installedConnectors.length > 0; diff --git a/frontend/control-center/src/pages/Status/ComponentListItem/ItemInfo.tsx b/frontend/control-center/src/pages/Status/ComponentListItem/ItemInfo.tsx index cf8b97a43f..2518bde51a 100644 --- a/frontend/control-center/src/pages/Status/ComponentListItem/ItemInfo.tsx +++ b/frontend/control-center/src/pages/Status/ComponentListItem/ItemInfo.tsx @@ -5,7 +5,7 @@ import {ReactComponent as CheckmarkIcon} from 'assets/images/icons/checkmarkFill import {ReactComponent as UncheckedIcon} from 'assets/images/icons/uncheckIcon.svg'; import {ReactComponent as ArrowRight} from 'assets/images/icons/arrowRight.svg'; import {getChannelAvatar} from '../../../components/ChannelAvatar'; -import {Source} from 'model'; +import {Source, airyProduct} from 'model'; import {SettingsModal, Button, Toggle, Tooltip} from 'components'; import {connect, ConnectedProps, useSelector} from 'react-redux'; import {useTranslation} from 'react-i18next'; @@ -44,7 +44,7 @@ const ItemInfo = (props: ComponentInfoProps) => { let isConfigurable = false; Object.entries(catalogList).forEach(elem => { - if (elem[1] && elem[1].source && elem[1].source === source && elem[1].source !== Source.webhooks) + if (elem[1] && elem[1].source && elem[1].source === source && elem[1].source !== airyProduct) isConfigurable = true; }); diff --git a/frontend/control-center/src/services/getRouteForCard.ts b/frontend/control-center/src/services/getRouteForCard.ts index b2c7235be9..38b06b6a74 100644 --- a/frontend/control-center/src/services/getRouteForCard.ts +++ b/frontend/control-center/src/services/getRouteForCard.ts @@ -7,7 +7,7 @@ export const getConnectedRouteForComponent = ( hasConnectedChannels?: boolean, configured?: boolean ) => { - if (source === Source.webhooks) return WEBHOOKS_ROUTE; + if (source === Source.airyWebhooks) return WEBHOOKS_ROUTE; if ((!configured || !isChannel) && source !== Source.chatPlugin) return `${CONNECTORS_ROUTE}/${source}/configure`; @@ -19,7 +19,7 @@ export const getConnectedRouteForComponent = ( }; export const getNewChannelRouteForComponent = (source: Source, isChannel?: boolean, configured?: boolean) => { - if (source === Source.webhooks) return WEBHOOKS_ROUTE; + if (source === Source.airyWebhooks) return WEBHOOKS_ROUTE; if ((!configured || !isChannel) && source !== Source.chatPlugin) return `${CONNECTORS_ROUTE}/${source}/configure`; diff --git a/lib/typescript/model/Source.ts b/lib/typescript/model/Source.ts index 19ed6ce909..3e791406bb 100644 --- a/lib/typescript/model/Source.ts +++ b/lib/typescript/model/Source.ts @@ -1,4 +1,6 @@ export enum Source { + airyContacts = 'airyContacts', + airyWebhooks = 'webhooks', facebook = 'facebook', google = 'google', chatPlugin = 'chatplugin', @@ -12,7 +14,6 @@ export enum Source { salesforce = 'salesforce', cognigy = 'cognigy', rasa = 'rasa', - webhooks = 'webhooks', amelia = 'amelia', mobile = 'mobile', whatsapp = 'whatsapp', @@ -22,6 +23,8 @@ export enum Source { amazonLexV2 = 'amazonLexV2', } +export const airyProduct = Source.airyContacts && Source.airyWebhooks; + export const prettifySource = (source: string) => source .split('.') diff --git a/lib/typescript/translations/translations.ts b/lib/typescript/translations/translations.ts index b4aa9c5f12..5a21228a2c 100644 --- a/lib/typescript/translations/translations.ts +++ b/lib/typescript/translations/translations.ts @@ -448,7 +448,7 @@ const resources = { rasaDescription: 'Open source conversational AI.', //webhooks - webhooksDescription: 'Get notified when events happen.', + airyWebhooksDescription: 'Get notified when events happen.', //amelia ameliaDescription: 'An intelligent cognitive conversational chatbot.', @@ -946,7 +946,7 @@ const resources = { rasaDescription: 'Open-Source-Gesprächs-KI.', //webhooks - webhooksDescription: 'Lassen Sie sich benachrichtigen, wenn Ereignisse eintreten.', + airyWebhooksDescription: 'Lassen Sie sich benachrichtigen, wenn Ereignisse eintreten.', //amelia ameliaDescription: 'Ein intelligenter kognitiver Konversations-Chatbot.', @@ -1569,7 +1569,7 @@ const resources = { rasaDescription: 'IA conversationnelle open source.', //webhooks - webhooksDescription: 'Soyez averti lorsque des événements se produisent.', + airyWebhooksDescription: 'Soyez averti lorsque des événements se produisent.', //amelia ameliaDescription: 'Un chatbot conversationnel cognitif intelligent.', @@ -2131,7 +2131,7 @@ const resources = { rasaDescription: 'IA conversacional Open Source.', //webhooks - webhooksDescription: 'Reciba notificaciones cuando ocurran eventos.', + airyWebhooksDescription: 'Reciba notificaciones cuando ocurran eventos.', //amelia ameliaDescription: 'Un chatbot conversacional cognitivo inteligente.',