-
Notifications
You must be signed in to change notification settings - Fork 4k
Move "Continue Setup"/"Start Over" confirmation to ReimbursementAccountPage #12422
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
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
df26563
add continue step
70472bd
fix up reset
99151be
use state instead
2b332fa
remove debuggin
6840d0d
fix unused key
ed4a3c7
clean up
e78296d
lint issues
c2f4649
fix error
7606a80
fix last lint
aabac09
fix feedback
7b67b0e
merge main and fix conflicts
bfc90f6
fix lint
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
84 changes: 84 additions & 0 deletions
84
src/pages/ReimbursementAccount/ContinueBankAccountSetup.js
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,84 @@ | ||
| import lodashGet from 'lodash/get'; | ||
| import PropTypes from 'prop-types'; | ||
| import React from 'react'; | ||
| import {ScrollView} from 'react-native'; | ||
| import _ from 'underscore'; | ||
| import * as BankAccounts from '../../libs/actions/BankAccounts'; | ||
| import * as Expensicons from '../../components/Icon/Expensicons'; | ||
| import * as Illustrations from '../../components/Icon/Illustrations'; | ||
| import withLocalize, {withLocalizePropTypes} from '../../components/withLocalize'; | ||
| import Button from '../../components/Button'; | ||
| import compose from '../../libs/compose'; | ||
| import CONST from '../../CONST'; | ||
| import FullPageNotFoundView from '../../components/BlockingViews/FullPageNotFoundView'; | ||
| import HeaderWithCloseButton from '../../components/HeaderWithCloseButton'; | ||
| import MenuItem from '../../components/MenuItem'; | ||
| import Navigation from '../../libs/Navigation/Navigation'; | ||
| import styles from '../../styles/styles'; | ||
| import ScreenWrapper from '../../components/ScreenWrapper'; | ||
| import Section from '../../components/Section'; | ||
| import Text from '../../components/Text'; | ||
| import withPolicy from '../workspace/withPolicy'; | ||
| import WorkspaceResetBankAccountModal from '../workspace/WorkspaceResetBankAccountModal'; | ||
|
|
||
| const propTypes = { | ||
| continue: PropTypes.func.isRequired, | ||
|
|
||
| /** Policy values needed in the component */ | ||
| policy: PropTypes.shape({ | ||
| name: PropTypes.string, | ||
| }).isRequired, | ||
|
|
||
| ...withLocalizePropTypes, | ||
| }; | ||
|
|
||
| const ContinueBankAccountSetup = props => ( | ||
| <ScreenWrapper> | ||
| <FullPageNotFoundView shouldShow={_.isEmpty(props.policy)}> | ||
| <HeaderWithCloseButton | ||
| title={props.translate('workspace.common.bankAccount')} | ||
| subtitle={lodashGet(props.policy, 'name')} | ||
| onCloseButtonPress={Navigation.dismissModal} | ||
| onBackButtonPress={Navigation.goBack} | ||
| shouldShowGetAssistanceButton | ||
| guidesCallTaskID={CONST.GUIDES_CALL_TASK_IDS.WORKSPACE_BANK_ACCOUNT} | ||
| shouldShowBackButton | ||
| /> | ||
| <ScrollView style={styles.flex1}> | ||
| <Section | ||
| title={props.translate('workspace.bankAccount.almostDone')} | ||
| icon={Illustrations.BankArrowPink} | ||
| > | ||
| <Text> | ||
| {props.translate('workspace.bankAccount.youreAlmostDone')} | ||
| </Text> | ||
| </Section> | ||
| <Button | ||
| text={props.translate('workspace.bankAccount.continueWithSetup')} | ||
| onPress={props.continue} | ||
| icon={Expensicons.Bank} | ||
| style={[styles.mt2, styles.buttonCTA]} | ||
| iconStyles={[styles.buttonCTAIcon]} | ||
| shouldShowRightIcon | ||
| large | ||
| success | ||
| /> | ||
| <MenuItem | ||
| title={props.translate('workspace.bankAccount.startOver')} | ||
| icon={Expensicons.RotateLeft} | ||
| onPress={BankAccounts.requestResetFreePlanBankAccount} | ||
| shouldShowRightIcon | ||
| /> | ||
| </ScrollView> | ||
| <WorkspaceResetBankAccountModal /> | ||
| </FullPageNotFoundView> | ||
| </ScreenWrapper> | ||
| ); | ||
|
|
||
| ContinueBankAccountSetup.propTypes = propTypes; | ||
| ContinueBankAccountSetup.displayName = 'ContinueBankAccountSetup'; | ||
|
|
||
| export default compose( | ||
| withPolicy, | ||
| withLocalize, | ||
| )(ContinueBankAccountSetup); |
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.