fix: calendly link on schedule a call click, jira and slack integration premium tag (#38331)

This commit is contained in:
Aman Agarwal 2024-12-25 11:58:07 +05:30 committed by GitHub
parent 2dfa24ee91
commit 65391ab2e0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 34 additions and 16 deletions

View File

@ -15,7 +15,18 @@ export const PREMIUM_INTEGRATIONS: PremiumIntegration[] = [
name: "Salesforce", name: "Salesforce",
icon: getAssetUrl(`${ASSETS_CDN_URL}/salesforce-icon.png`), icon: getAssetUrl(`${ASSETS_CDN_URL}/salesforce-icon.png`),
}, },
{
name: "Slack",
icon: getAssetUrl(`${ASSETS_CDN_URL}/slack.png`),
},
{
name: "Jira",
icon: getAssetUrl(`${ASSETS_CDN_URL}/jira.png`),
},
]; ];
export const PREMIUM_INTEGRATION_CONTACT_FORM = export const PREMIUM_INTEGRATION_CONTACT_FORM =
"PREMIUM_INTEGRATION_CONTACT_FORM"; "PREMIUM_INTEGRATION_CONTACT_FORM";
export const SCHEDULE_CALL_URL =
"https://calendly.com/carina-neves-fonseca/appsmith";

View File

@ -131,7 +131,6 @@ function CreateNewDatasource({
active, active,
isCreating, isCreating,
isOnboardingScreen, isOnboardingScreen,
isPremiumDatasourcesViewEnabled,
pageId, pageId,
showMostPopularPlugins, showMostPopularPlugins,
showUnsupportedPluginDialog, // TODO: Fix this the next time the file is edited showUnsupportedPluginDialog, // TODO: Fix this the next time the file is edited
@ -172,11 +171,7 @@ function CreateNewDatasource({
parentEntityType={parentEntityType} parentEntityType={parentEntityType}
showMostPopularPlugins={showMostPopularPlugins} showMostPopularPlugins={showMostPopularPlugins}
showUnsupportedPluginDialog={showUnsupportedPluginDialog} showUnsupportedPluginDialog={showUnsupportedPluginDialog}
> />
{showMostPopularPlugins && isPremiumDatasourcesViewEnabled && (
<PremiumDatasources />
)}
</NewQueryScreen>
</div> </div>
); );
} }
@ -184,6 +179,7 @@ function CreateNewDatasource({
function CreateNewSaasIntegration({ function CreateNewSaasIntegration({
active, active,
isCreating, isCreating,
isPremiumDatasourcesViewEnabled,
pageId, pageId,
showUnsupportedPluginDialog, // TODO: Fix this the next time the file is edited showUnsupportedPluginDialog, // TODO: Fix this the next time the file is edited
// eslint-disable-next-line @typescript-eslint/no-explicit-any // eslint-disable-next-line @typescript-eslint/no-explicit-any
@ -217,7 +213,9 @@ function CreateNewSaasIntegration({
pageId={pageId} pageId={pageId}
showSaasAPIs showSaasAPIs
showUnsupportedPluginDialog={showUnsupportedPluginDialog} showUnsupportedPluginDialog={showUnsupportedPluginDialog}
/> >
{isPremiumDatasourcesViewEnabled && <PremiumDatasources />}
</NewApiScreen>
</div> </div>
</> </>
) : null; ) : null;
@ -321,7 +319,6 @@ class CreateNewDatasourceTab extends React.Component<
active={false} active={false}
isCreating={isCreating} isCreating={isCreating}
isOnboardingScreen={!!isOnboardingScreen} isOnboardingScreen={!!isOnboardingScreen}
isPremiumDatasourcesViewEnabled={isPremiumDatasourcesViewEnabled}
location={location} location={location}
pageId={pageId} pageId={pageId}
showMostPopularPlugins showMostPopularPlugins
@ -347,6 +344,7 @@ class CreateNewDatasourceTab extends React.Component<
<CreateNewSaasIntegration <CreateNewSaasIntegration
active={false} active={false}
isCreating={isCreating} isCreating={isCreating}
isPremiumDatasourcesViewEnabled={isPremiumDatasourcesViewEnabled}
location={location} location={location}
pageId={pageId} pageId={pageId}
showUnsupportedPluginDialog={this.showUnsupportedPluginDialog} showUnsupportedPluginDialog={this.showUnsupportedPluginDialog}

View File

@ -295,7 +295,6 @@ class DatasourceHomeScreen extends React.Component<Props> {
</DatasourceCard> </DatasourceCard>
); );
})} })}
{this.props.children}
</DatasourceCardsContainer> </DatasourceCardsContainer>
</DatasourceHomePage> </DatasourceHomePage>
); );

View File

@ -1,4 +1,4 @@
import React, { useCallback, useEffect, useState } from "react"; import React, { useCallback, useEffect, useState, type ReactNode } from "react";
import { connect, useSelector } from "react-redux"; import { connect, useSelector } from "react-redux";
import styled from "styled-components"; import styled from "styled-components";
import { import {
@ -142,6 +142,7 @@ interface ApiHomeScreenProps {
apiType: string, apiType: string,
) => void; ) => void;
isOnboardingScreen?: boolean; isOnboardingScreen?: boolean;
children?: ReactNode;
} }
type Props = ApiHomeScreenProps; type Props = ApiHomeScreenProps;
@ -328,6 +329,7 @@ function NewApiScreen(props: Props) {
</CardContentWrapper> </CardContentWrapper>
</ApiCard> </ApiCard>
))} ))}
{props.children}
</ApiCardsContainer> </ApiCardsContainer>
</StyledContainer> </StyledContainer>
); );

View File

@ -56,9 +56,7 @@ class QueryHomeScreen extends React.Component<QueryHomeScreenProps> {
parentEntityType={parentEntityType} parentEntityType={parentEntityType}
showMostPopularPlugins={showMostPopularPlugins} showMostPopularPlugins={showMostPopularPlugins}
showUnsupportedPluginDialog={showUnsupportedPluginDialog} showUnsupportedPluginDialog={showUnsupportedPluginDialog}
> />
{this.props.children}
</DataSourceHome>
</QueryHomePage> </QueryHomePage>
); );
} }

View File

@ -1,4 +1,4 @@
import { Button, Flex, ModalHeader, Text, toast } from "@appsmith/ads"; import { Button, ModalFooter, ModalHeader, Text, toast } from "@appsmith/ads";
import { createMessage, PREMIUM_DATASOURCES } from "ee/constants/messages"; import { createMessage, PREMIUM_DATASOURCES } from "ee/constants/messages";
import type { AppState } from "ee/reducers"; import type { AppState } from "ee/reducers";
import React, { useCallback } from "react"; import React, { useCallback } from "react";
@ -97,7 +97,7 @@ const PremiumDatasourceContactForm = (
size="md" size="md"
type="email" type="email"
/> />
<Flex gap="spaces-7" justifyContent="flex-end" marginTop="spaces-3"> <ModalFooter>
{shouldLearnMoreButtonBeVisible(!isFreePlanInstance) && ( {shouldLearnMoreButtonBeVisible(!isFreePlanInstance) && (
<Button <Button
aria-label="Learn more" aria-label="Learn more"
@ -114,7 +114,7 @@ const PremiumDatasourceContactForm = (
!isFreePlanInstance, !isFreePlanInstance,
)} )}
</Button> </Button>
</Flex> </ModalFooter>
</FormWrapper> </FormWrapper>
</> </>
); );

View File

@ -1,3 +1,4 @@
import { SCHEDULE_CALL_URL } from "constants/PremiumDatasourcesConstants";
import { createMessage, PREMIUM_DATASOURCES } from "ee/constants/messages"; import { createMessage, PREMIUM_DATASOURCES } from "ee/constants/messages";
import AnalyticsUtil from "ee/utils/AnalyticsUtil"; import AnalyticsUtil from "ee/utils/AnalyticsUtil";
import { isRelevantEmail } from "utils/formhelpers"; import { isRelevantEmail } from "utils/formhelpers";
@ -58,6 +59,15 @@ export const handleSubmitEvent = (
email, email,
}, },
); );
const scheduleACallUrl =
!isBusinessOrEnterprise && validRelevantEmail
? `${SCHEDULE_CALL_URL}?email=${email}`
: "";
if (scheduleACallUrl) {
window.open(scheduleACallUrl, "_blank");
}
}; };
export const getContactFormModalTitle = ( export const getContactFormModalTitle = (