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] Create a New Travel Page and Terms and Conditions Modal (NewDot) #38469

Merged
Merged
Changes from 1 commit
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
57e6306
Add initial config for MyTripsPage
WojtekBoman Mar 4, 2024
3e95765
ManageTrips init
smelaa Mar 4, 2024
011d227
Add TravelMenu page
WojtekBoman Mar 4, 2024
0bf7916
Add suitcase icon to Expensicons
WojtekBoman Mar 5, 2024
d2cd60c
Add simple illustrations for MyTripsPage
WojtekBoman Mar 5, 2024
a467a74
Remove TravelMenuProps
WojtekBoman Mar 5, 2024
38e6ca2
Merge pull request #79 from software-mansion-labs/travel/travel-page-lhn
WojtekBoman Mar 5, 2024
4cb1120
Add fixes to travel page
WojtekBoman Mar 5, 2024
ec06f16
Add main illustration
smelaa Mar 6, 2024
bb77b15
Add beta visibility
smelaa Mar 7, 2024
ff03721
Wrap ManageTrips in FullPageNotFoundView
smelaa Mar 7, 2024
7c30e70
Refactor MyTripsPage
WojtekBoman Mar 8, 2024
afd404c
add base terms and conditions modal
cdOut Mar 14, 2024
f3de2b8
Merge branch 'travel/travel-page' into travel/terms-and-conditions
cdOut Mar 18, 2024
f74e2d2
Add es translations for TravelTerms page
WojtekBoman Mar 29, 2024
90071d6
Merge branch 'main' into travel/terms-and-conditions
smelaa Apr 9, 2024
c261f00
Fixes after merging with main
smelaa Apr 9, 2024
f9316b2
Merge branch 'main' into travel/travel-page
smelaa Apr 9, 2024
5ef17d9
Fixes after matching with main
smelaa Apr 9, 2024
13c94bb
Merge branch 'travel/travel-page' into travel/terms-and-conditions
smelaa Apr 9, 2024
fa4fe36
Fixes after merging with travel/travel-page
smelaa Apr 9, 2024
ce7a0f5
Merge branch 'main' into travel/travel-page
smelaa Apr 9, 2024
bc74353
Merge branch 'travel/travel-page' into travel/terms-and-conditions
smelaa Apr 9, 2024
abbe116
Text changes
smelaa Apr 10, 2024
00ddf0b
Merge branch 'travel/travel-page' into travel/terms-and-conditions
smelaa Apr 10, 2024
3bfea69
Fix a typo
smelaa Apr 10, 2024
d8a8299
Merge branch 'main' into travel/terms-and-conditions
smelaa Apr 18, 2024
d0a32a6
Address design feedback
smelaa Apr 18, 2024
24835cc
Fix spotnana travel beta
smelaa Apr 18, 2024
0932900
Change card content padding
smelaa Apr 18, 2024
0c04a9e
add routing, wire up terms
BrtqKr Apr 23, 2024
dc1a4bd
Merge remote-tracking branch 'origin/main' into travel/terms-and-cond…
BrtqKr Apr 23, 2024
c040d3d
Change textcontent
smelaa Apr 23, 2024
aea71e4
wire up accept terms wip
BrtqKr Apr 25, 2024
3eff605
cleanup
BrtqKr Apr 25, 2024
9baa515
Merge remote-tracking branch 'origin/main' into travel/terms-and-cond…
BrtqKr Apr 26, 2024
b96d89a
fix spanish translations
cdOut Apr 29, 2024
1ec2fe5
Merge branch 'main' into travel/terms-and-conditions
cdOut Apr 29, 2024
9def070
fix lint issues
cdOut Apr 29, 2024
27ee79f
fix prettier
cdOut Apr 29, 2024
c77d1d4
fix comments and type requirements for travelSettings
cdOut Apr 29, 2024
5a21fd5
Merge branch 'main' into travel/terms-and-conditions
WojtekBoman Apr 30, 2024
89ec881
Update margin in TravelTerms page
WojtekBoman Apr 30, 2024
e05bfab
Fix padding in TravelTerms
WojtekBoman Apr 30, 2024
2aef4fd
Refactor comment in BottomTabBar
WojtekBoman Apr 30, 2024
d7b9716
Add getTripIllustrationStyle
WojtekBoman Apr 30, 2024
76cc3e3
Fix lint
WojtekBoman Apr 30, 2024
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
Prev Previous commit
Next Next commit
Fix padding in TravelTerms
WojtekBoman committed Apr 30, 2024

Verified

This commit was signed with the committer’s verified signature. The key has expired.
tvdeyen Thomas von Deyen
commit e05bfab34a148e12b85e151b3542995ae27e2a6a
80 changes: 42 additions & 38 deletions src/pages/Travel/TravelTerms.tsx
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@ import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView
import CheckboxWithLabel from '@components/CheckboxWithLabel';
import FormAlertWithSubmitButton from '@components/FormAlertWithSubmitButton';
import HeaderWithBackButton from '@components/HeaderWithBackButton';
import SafeAreaConsumer from '@components/SafeAreaConsumer';
import ScreenWrapper from '@components/ScreenWrapper';
import Text from '@components/Text';
import TextLink from '@components/TextLink';
@@ -57,45 +58,48 @@ function TravelTerms() {
title={translate('travel.termsAndConditions.header')}
onBackButtonPress={() => Navigation.goBack()}
/>
<ScrollView style={[styles.flex1, styles.flexGrow1, styles.ph5]}>
<View style={styles.flex1}>
<Text style={styles.headerAnonymousFooter}>{`${translate('travel.termsAndConditions.title')}`}</Text>
<Text style={styles.mt4}>
{`${translate('travel.termsAndConditions.subtitle')}`}
<TextLink href="https://www.spotnana.com/terms/">{`${translate('travel.termsAndConditions.termsconditions')}.`}</TextLink>
</Text>
<Text style={styles.mt6}>
{`${translate('travel.termsAndConditions.helpDocIntro')}`}
<TextLink href="https://use.expensify.com/esignagreement">{`${translate('travel.termsAndConditions.helpDoc')} `}</TextLink>
{`${translate('travel.termsAndConditions.helpDocOutro')}`}
</Text>
<CheckboxWithLabel
style={styles.mt6}
accessibilityLabel={translate('travel.termsAndConditions.travelTermsAndConditions')}
onInputChange={toggleTravelTerms}
LabelComponent={AgreeToTheLabel}
/>
</View>
</ScrollView>
<View style={styles.ph5}>
<FormAlertWithSubmitButton
buttonText={translate('common.continue')}
isDisabled={!hasAcceptedTravelTerms}
onSubmit={() => {
if (!hasAcceptedTravelTerms) {
setError(true);
return;
}
<SafeAreaConsumer>
{({safeAreaPaddingBottomStyle}) => (
<ScrollView contentContainerStyle={[styles.flexGrow1, styles.ph5, safeAreaPaddingBottomStyle.paddingBottom ? safeAreaPaddingBottomStyle : styles.pb5]}>
<View style={styles.flex1}>
<Text style={styles.headerAnonymousFooter}>{`${translate('travel.termsAndConditions.title')}`}</Text>
<Text style={styles.mt4}>
{`${translate('travel.termsAndConditions.subtitle')}`}
<TextLink href="https://www.spotnana.com/terms/">{`${translate('travel.termsAndConditions.termsconditions')}.`}</TextLink>
Copy link
Contributor

Choose a reason for hiding this comment

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

</Text>
<Text style={styles.mt6}>
{`${translate('travel.termsAndConditions.helpDocIntro')}`}
<TextLink href="https://use.expensify.com/esignagreement">{`${translate('travel.termsAndConditions.helpDoc')} `}</TextLink>
Copy link
Contributor

Choose a reason for hiding this comment

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

@bfitzexpensify do we have a help article ready, even if it's empty?

Copy link
Contributor

Choose a reason for hiding this comment

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

No, but I've added a note in https://github.com/Expensify/Expensify/issues/383227 to make a PR to update this once the Help Docs are live on ExpensifyHelp

{`${translate('travel.termsAndConditions.helpDocOutro')}`}
</Text>
<CheckboxWithLabel
style={styles.mt6}
accessibilityLabel={translate('travel.termsAndConditions.travelTermsAndConditions')}
onInputChange={toggleTravelTerms}
LabelComponent={AgreeToTheLabel}
/>
</View>

Travel.acceptSpotnanaTerms();
setError(false);
Navigation.resetToHome();
}}
message={errorMessage}
isAlertVisible={error || Boolean(errorMessage)}
containerStyles={[styles.mh0, styles.mv5]}
/>
</View>
<FormAlertWithSubmitButton
buttonText={translate('common.continue')}
isDisabled={!hasAcceptedTravelTerms}
onSubmit={() => {
if (!hasAcceptedTravelTerms) {
setError(true);
return;
}

Travel.acceptSpotnanaTerms();
setError(false);
Navigation.resetToHome();
}}
message={errorMessage}
isAlertVisible={error || Boolean(errorMessage)}
containerStyles={[styles.mh0, styles.mt5]}
/>
</ScrollView>
)}
</SafeAreaConsumer>
</FullPageNotFoundView>
</ScreenWrapper>
);