Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[VIP][Travel] Add book travel demo button #42864

Merged
merged 6 commits into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3297,6 +3297,7 @@ const CONST = {
},

CONCIERGE_TRAVEL_URL: 'https://community.expensify.com/discussion/7066/introducing-concierge-travel',
BOOK_TRAVEL_DEMO_URL: 'https://calendly.com/d/ck2z-xsh-q97/expensify-travel-demo-travel-page',
SCREEN_READER_STATES: {
ALL: 'all',
ACTIVE: 'active',
Expand Down
21 changes: 21 additions & 0 deletions src/components/FeatureList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ type FeatureListProps = {
/** Action to call on cta button press */
onCtaPress?: () => void;

/** Text of the secondary button button */
secondaryButtonText?: string;

/** Accessibility label for the secondary button */
secondaryButtonAccessibilityLabel?: string;

/** Action to call on secondary button press */
onSecondaryButtonPress?: () => void;

/** A list of menuItems representing the feature list. */
menuItems: FeatureListItem[];

Expand All @@ -57,6 +66,9 @@ function FeatureList({
ctaText = '',
ctaAccessibilityLabel = '',
onCtaPress,
secondaryButtonText = '',
secondaryButtonAccessibilityLabel = '',
onSecondaryButtonPress,
menuItems,
illustration,
illustrationStyle,
Expand Down Expand Up @@ -99,6 +111,15 @@ function FeatureList({
</View>
))}
</View>
{secondaryButtonText && (
<Button
text={secondaryButtonText}
onPress={onSecondaryButtonPress}
accessibilityLabel={secondaryButtonAccessibilityLabel}
style={[styles.w100, styles.mb3]}
large
/>
)}
<Button
text={ctaText}
onPress={onCtaPress}
Expand Down
1 change: 1 addition & 0 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1866,6 +1866,7 @@ export default {
alerts: 'Get realtime updates and alerts',
},
bookTravel: 'Book travel',
bookDemo: 'Book demo',
termsAndConditions: {
header: 'Before we continue...',
title: 'Please read the Terms & Conditions for travel',
Expand Down
1 change: 1 addition & 0 deletions src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1890,6 +1890,7 @@ export default {
alerts: 'Obtén actualizaciones y alertas en tiempo real',
},
bookTravel: 'Reservar viajes',
bookDemo: 'Book demo',
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pedir demostración

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you! 🙇

rushatgabhane marked this conversation as resolved.
Show resolved Hide resolved
termsAndConditions: {
header: 'Antes de continuar...',
title: 'Por favor, lee los Términos y condiciones para reservar viajes',
Expand Down
10 changes: 9 additions & 1 deletion src/pages/Travel/ManageTrips.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import {View} from 'react-native';
import {Linking, View} from 'react-native';
import type {FeatureListItem} from '@components/FeatureList';
import FeatureList from '@components/FeatureList';
import * as Illustrations from '@components/Icon/Illustrations';
Expand All @@ -10,6 +10,7 @@ import useThemeStyles from '@hooks/useThemeStyles';
import useWindowDimensions from '@hooks/useWindowDimensions';
import Navigation from '@libs/Navigation/Navigation';
import colors from '@styles/theme/colors';
import CONST from '@src/CONST';
import ROUTES from '@src/ROUTES';
import getTripIllustrationStyle from './getTripIllustrationStyle';

Expand All @@ -30,6 +31,10 @@ function ManageTrips() {
const {translate} = useLocalize();
const illustrationStyle = getTripIllustrationStyle();

const navigateToBookTravelDemo = () => {
Linking.openURL(CONST.BOOK_TRAVEL_DEMO_URL);
};

return (
<ScrollView contentContainerStyle={styles.pt3}>
<View style={[styles.flex1, isSmallScreenWidth ? styles.workspaceSectionMobile : styles.workspaceSection]}>
Expand All @@ -42,6 +47,9 @@ function ManageTrips() {
onCtaPress={() => {
Navigation.navigate(ROUTES.TRAVEL_TCS);
}}
secondaryButtonText={translate('travel.bookDemo')}
secondaryButtonAccessibilityLabel={translate('travel.bookDemo')}
onSecondaryButtonPress={navigateToBookTravelDemo}
illustration={LottieAnimations.Plane}
illustrationStyle={illustrationStyle}
illustrationBackgroundColor={colors.blue600}
Expand Down
Loading