-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6319 from Expensify/cmartins-autoApproveTriggerCl…
…eanUp Deep link to add secondary login in OldDot (cherry picked from commit ceba16f)
- Loading branch information
1 parent
ff05140
commit deef03c
Showing
6 changed files
with
77 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,70 @@ | ||
import React from 'react'; | ||
import {View} from 'react-native'; | ||
import {withOnyx} from 'react-native-onyx'; | ||
import Text from '../../../components/Text'; | ||
import styles from '../../../styles/styles'; | ||
import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize'; | ||
import {Concierge} from '../../../components/Icon/Expensicons'; | ||
import {Mail} from '../../../components/Icon/Expensicons'; | ||
import {JewelBoxBlue} from '../../../components/Icon/Illustrations'; | ||
import UnorderedList from '../../../components/UnorderedList'; | ||
import WorkspaceSection from '../WorkspaceSection'; | ||
import {navigateToConciergeChat} from '../../../libs/actions/Report'; | ||
import Navigation from '../../../libs/Navigation/Navigation'; | ||
import {openOldDotLink} from '../../../libs/actions/Link'; | ||
import {subscribeToExpensifyCardUpdates} from '../../../libs/actions/User'; | ||
import ONYXKEYS from '../../../ONYXKEYS'; | ||
import compose from '../../../libs/compose'; | ||
|
||
const propTypes = { | ||
...withLocalizePropTypes, | ||
}; | ||
|
||
const WorkspaceCardVBANoECardView = props => ( | ||
<WorkspaceSection | ||
title={props.translate('workspace.card.header')} | ||
icon={JewelBoxBlue} | ||
menuItems={[ | ||
{ | ||
title: props.translate('workspace.card.chatWithConcierge'), | ||
onPress: () => { | ||
Navigation.dismissModal(); | ||
navigateToConciergeChat(); | ||
<> | ||
<WorkspaceSection | ||
title={props.translate('workspace.card.header')} | ||
icon={JewelBoxBlue} | ||
menuItems={[ | ||
{ | ||
title: props.translate('workspace.card.addWorkEmail'), | ||
onPress: () => { | ||
Navigation.dismissModal(); | ||
openOldDotLink('settings?param={"section":"account","openModal":"secondaryLogin"}'); | ||
subscribeToExpensifyCardUpdates(); | ||
}, | ||
icon: Mail, | ||
shouldShowRightIcon: true, | ||
}, | ||
icon: Concierge, | ||
shouldShowRightIcon: true, | ||
}, | ||
]} | ||
> | ||
<View style={[styles.mv4]}> | ||
<Text>{props.translate('workspace.card.VBANoECardCopy')}</Text> | ||
</View> | ||
|
||
<UnorderedList | ||
items={[ | ||
props.translate('workspace.card.benefit1'), | ||
props.translate('workspace.card.benefit2'), | ||
props.translate('workspace.card.benefit3'), | ||
props.translate('workspace.card.benefit4'), | ||
]} | ||
/> | ||
> | ||
<View style={[styles.mv4]}> | ||
<Text>{props.translate('workspace.card.VBANoECardCopy')}</Text> | ||
</View> | ||
|
||
<View style={[styles.mv4]}> | ||
<Text>{props.translate('workspace.card.conciergeCanHelp')}</Text> | ||
</View> | ||
</WorkspaceSection> | ||
<UnorderedList | ||
items={[ | ||
props.translate('workspace.card.benefit1'), | ||
props.translate('workspace.card.benefit2'), | ||
props.translate('workspace.card.benefit3'), | ||
props.translate('workspace.card.benefit4'), | ||
]} | ||
/> | ||
</WorkspaceSection> | ||
{props.user.isCheckingDomain && ( | ||
<Text style={[styles.m5, styles.formError]}> | ||
{props.translate('workspace.card.checkingDomain')} | ||
</Text> | ||
)} | ||
</> | ||
); | ||
|
||
WorkspaceCardVBANoECardView.propTypes = propTypes; | ||
WorkspaceCardVBANoECardView.displayName = 'WorkspaceCardVBANoECardView'; | ||
|
||
export default withLocalize(WorkspaceCardVBANoECardView); | ||
export default compose( | ||
withLocalize, | ||
withOnyx({ | ||
user: { | ||
key: ONYXKEYS.USER, | ||
}, | ||
}), | ||
)(WorkspaceCardVBANoECardView); |