Skip to content

Commit 65391ab

Browse files
author
Aman Agarwal
authored
fix: calendly link on schedule a call click, jira and slack integration premium tag (#38331)
1 parent 2dfa24e commit 65391ab

File tree

7 files changed

+34
-16
lines changed

7 files changed

+34
-16
lines changed

app/client/src/constants/PremiumDatasourcesConstants.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,18 @@ export const PREMIUM_INTEGRATIONS: PremiumIntegration[] = [
1515
name: "Salesforce",
1616
icon: getAssetUrl(`${ASSETS_CDN_URL}/salesforce-icon.png`),
1717
},
18+
{
19+
name: "Slack",
20+
icon: getAssetUrl(`${ASSETS_CDN_URL}/slack.png`),
21+
},
22+
{
23+
name: "Jira",
24+
icon: getAssetUrl(`${ASSETS_CDN_URL}/jira.png`),
25+
},
1826
];
1927

2028
export const PREMIUM_INTEGRATION_CONTACT_FORM =
2129
"PREMIUM_INTEGRATION_CONTACT_FORM";
30+
31+
export const SCHEDULE_CALL_URL =
32+
"https://calendly.com/carina-neves-fonseca/appsmith";

app/client/src/pages/Editor/IntegrationEditor/CreateNewDatasourceTab.tsx

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ function CreateNewDatasource({
131131
active,
132132
isCreating,
133133
isOnboardingScreen,
134-
isPremiumDatasourcesViewEnabled,
135134
pageId,
136135
showMostPopularPlugins,
137136
showUnsupportedPluginDialog, // TODO: Fix this the next time the file is edited
@@ -172,18 +171,15 @@ function CreateNewDatasource({
172171
parentEntityType={parentEntityType}
173172
showMostPopularPlugins={showMostPopularPlugins}
174173
showUnsupportedPluginDialog={showUnsupportedPluginDialog}
175-
>
176-
{showMostPopularPlugins && isPremiumDatasourcesViewEnabled && (
177-
<PremiumDatasources />
178-
)}
179-
</NewQueryScreen>
174+
/>
180175
</div>
181176
);
182177
}
183178

184179
function CreateNewSaasIntegration({
185180
active,
186181
isCreating,
182+
isPremiumDatasourcesViewEnabled,
187183
pageId,
188184
showUnsupportedPluginDialog, // TODO: Fix this the next time the file is edited
189185
// eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -217,7 +213,9 @@ function CreateNewSaasIntegration({
217213
pageId={pageId}
218214
showSaasAPIs
219215
showUnsupportedPluginDialog={showUnsupportedPluginDialog}
220-
/>
216+
>
217+
{isPremiumDatasourcesViewEnabled && <PremiumDatasources />}
218+
</NewApiScreen>
221219
</div>
222220
</>
223221
) : null;
@@ -321,7 +319,6 @@ class CreateNewDatasourceTab extends React.Component<
321319
active={false}
322320
isCreating={isCreating}
323321
isOnboardingScreen={!!isOnboardingScreen}
324-
isPremiumDatasourcesViewEnabled={isPremiumDatasourcesViewEnabled}
325322
location={location}
326323
pageId={pageId}
327324
showMostPopularPlugins
@@ -347,6 +344,7 @@ class CreateNewDatasourceTab extends React.Component<
347344
<CreateNewSaasIntegration
348345
active={false}
349346
isCreating={isCreating}
347+
isPremiumDatasourcesViewEnabled={isPremiumDatasourcesViewEnabled}
350348
location={location}
351349
pageId={pageId}
352350
showUnsupportedPluginDialog={this.showUnsupportedPluginDialog}

app/client/src/pages/Editor/IntegrationEditor/DatasourceHome.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,6 @@ class DatasourceHomeScreen extends React.Component<Props> {
295295
</DatasourceCard>
296296
);
297297
})}
298-
{this.props.children}
299298
</DatasourceCardsContainer>
300299
</DatasourceHomePage>
301300
);

app/client/src/pages/Editor/IntegrationEditor/NewApi.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useCallback, useEffect, useState } from "react";
1+
import React, { useCallback, useEffect, useState, type ReactNode } from "react";
22
import { connect, useSelector } from "react-redux";
33
import styled from "styled-components";
44
import {
@@ -142,6 +142,7 @@ interface ApiHomeScreenProps {
142142
apiType: string,
143143
) => void;
144144
isOnboardingScreen?: boolean;
145+
children?: ReactNode;
145146
}
146147

147148
type Props = ApiHomeScreenProps;
@@ -328,6 +329,7 @@ function NewApiScreen(props: Props) {
328329
</CardContentWrapper>
329330
</ApiCard>
330331
))}
332+
{props.children}
331333
</ApiCardsContainer>
332334
</StyledContainer>
333335
);

app/client/src/pages/Editor/IntegrationEditor/NewQuery.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,7 @@ class QueryHomeScreen extends React.Component<QueryHomeScreenProps> {
5656
parentEntityType={parentEntityType}
5757
showMostPopularPlugins={showMostPopularPlugins}
5858
showUnsupportedPluginDialog={showUnsupportedPluginDialog}
59-
>
60-
{this.props.children}
61-
</DataSourceHome>
59+
/>
6260
</QueryHomePage>
6361
);
6462
}

app/client/src/pages/Editor/IntegrationEditor/PremiumDatasources/ContactForm.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Button, Flex, ModalHeader, Text, toast } from "@appsmith/ads";
1+
import { Button, ModalFooter, ModalHeader, Text, toast } from "@appsmith/ads";
22
import { createMessage, PREMIUM_DATASOURCES } from "ee/constants/messages";
33
import type { AppState } from "ee/reducers";
44
import React, { useCallback } from "react";
@@ -97,7 +97,7 @@ const PremiumDatasourceContactForm = (
9797
size="md"
9898
type="email"
9999
/>
100-
<Flex gap="spaces-7" justifyContent="flex-end" marginTop="spaces-3">
100+
<ModalFooter>
101101
{shouldLearnMoreButtonBeVisible(!isFreePlanInstance) && (
102102
<Button
103103
aria-label="Learn more"
@@ -114,7 +114,7 @@ const PremiumDatasourceContactForm = (
114114
!isFreePlanInstance,
115115
)}
116116
</Button>
117-
</Flex>
117+
</ModalFooter>
118118
</FormWrapper>
119119
</>
120120
);

app/client/src/utils/PremiumDatasourcesHelpers.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { SCHEDULE_CALL_URL } from "constants/PremiumDatasourcesConstants";
12
import { createMessage, PREMIUM_DATASOURCES } from "ee/constants/messages";
23
import AnalyticsUtil from "ee/utils/AnalyticsUtil";
34
import { isRelevantEmail } from "utils/formhelpers";
@@ -58,6 +59,15 @@ export const handleSubmitEvent = (
5859
email,
5960
},
6061
);
62+
63+
const scheduleACallUrl =
64+
!isBusinessOrEnterprise && validRelevantEmail
65+
? `${SCHEDULE_CALL_URL}?email=${email}`
66+
: "";
67+
68+
if (scheduleACallUrl) {
69+
window.open(scheduleACallUrl, "_blank");
70+
}
6171
};
6272

6373
export const getContactFormModalTitle = (

0 commit comments

Comments
 (0)