From b21b39ab9837d0ddb7531bd0008b0c47c3c48650 Mon Sep 17 00:00:00 2001 From: Maria D'Costa Date: Wed, 1 Feb 2023 12:54:48 +0400 Subject: [PATCH 01/16] Display continue setup even when the reset modal is shown --- .../ReimbursementAccountPage.js | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/src/pages/ReimbursementAccount/ReimbursementAccountPage.js b/src/pages/ReimbursementAccount/ReimbursementAccountPage.js index 193bf2c9a46b..4ce3244d0671 100644 --- a/src/pages/ReimbursementAccount/ReimbursementAccountPage.js +++ b/src/pages/ReimbursementAccount/ReimbursementAccountPage.js @@ -263,13 +263,8 @@ class ReimbursementAccountPage extends React.Component { ); } - if (this.props.reimbursementAccount.shouldShowResetModal && Boolean(achData.bankAccountID)) { - return ( - - ); - } - // Show the "Continue with setup" button if a bank account setup is already in progress and no specific further step was passed in the url + // We'll show the workspace bank account reset modal if the user wishes to start over if (!this.state.shouldHideContinueSetupButton && Boolean(achData.bankAccountID) && achData.state !== BankAccount.STATE.OPEN @@ -279,13 +274,20 @@ class ReimbursementAccountPage extends React.Component { || achData.state === BankAccount.STATE.PENDING )) { return ( - { - this.setState({shouldHideContinueSetupButton: true}); - BankAccounts.requestResetFreePlanBankAccount(); - }} - /> + + { + BankAccounts.requestResetFreePlanBankAccount(); + }} + /> + {this.props.reimbursementAccount.shouldShowResetModal && Boolean(achData.bankAccountID) && ( + this.setState({ shouldHideContinueSetupButton: true })} + /> + )} + ); } From ba9bd3503f11511708a56d5e0c0860e4767d4d9b Mon Sep 17 00:00:00 2001 From: Maria D'Costa Date: Wed, 1 Feb 2023 12:55:51 +0400 Subject: [PATCH 02/16] Add onConfirm callback when resetting workspace bank account --- src/pages/workspace/WorkspaceResetBankAccountModal.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/pages/workspace/WorkspaceResetBankAccountModal.js b/src/pages/workspace/WorkspaceResetBankAccountModal.js index 835bb43ee9cd..3ad957c8c448 100644 --- a/src/pages/workspace/WorkspaceResetBankAccountModal.js +++ b/src/pages/workspace/WorkspaceResetBankAccountModal.js @@ -1,4 +1,5 @@ import lodashGet from 'lodash/get'; +import PropTypes from 'prop-types'; import React from 'react'; import ConfirmModal from '../../components/ConfirmModal'; import * as BankAccounts from '../../libs/actions/BankAccounts'; @@ -12,6 +13,9 @@ const propTypes = { /** Reimbursement account data */ reimbursementAccount: ReimbursementAccountProps.reimbursementAccountPropTypes.isRequired, + /** Callback when the user confirms resetting the workspace bank account */ + onConfirm: PropTypes.func.isRequired, + ...withLocalizePropTypes, }; @@ -37,7 +41,10 @@ const WorkspaceResetBankAccountModal = (props) => { ) : props.translate('workspace.bankAccount.clearProgress')} danger onCancel={BankAccounts.cancelResetFreePlanBankAccount} - onConfirm={() => BankAccounts.resetFreePlanBankAccount(bankAccountID)} + onConfirm={() => { + BankAccounts.resetFreePlanBankAccount(bankAccountID); + props.onConfirm(); + }} shouldShowCancelButton isVisible /> From 63be74c3d2300f449e4eaefe30bfba866c1d0f30 Mon Sep 17 00:00:00 2001 From: Maria D'Costa Date: Wed, 1 Feb 2023 13:14:18 +0400 Subject: [PATCH 03/16] Make onConfirm an optional callback --- src/pages/workspace/WorkspaceResetBankAccountModal.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/pages/workspace/WorkspaceResetBankAccountModal.js b/src/pages/workspace/WorkspaceResetBankAccountModal.js index 3ad957c8c448..6cc007764fec 100644 --- a/src/pages/workspace/WorkspaceResetBankAccountModal.js +++ b/src/pages/workspace/WorkspaceResetBankAccountModal.js @@ -14,11 +14,15 @@ const propTypes = { reimbursementAccount: ReimbursementAccountProps.reimbursementAccountPropTypes.isRequired, /** Callback when the user confirms resetting the workspace bank account */ - onConfirm: PropTypes.func.isRequired, + onConfirm: PropTypes.func, ...withLocalizePropTypes, }; +const defaultProps = { + onConfirm: null, +} + const WorkspaceResetBankAccountModal = (props) => { const achData = lodashGet(props.reimbursementAccount, 'achData') || {}; const isInOpenState = achData.state === BankAccount.STATE.OPEN; @@ -43,7 +47,9 @@ const WorkspaceResetBankAccountModal = (props) => { onCancel={BankAccounts.cancelResetFreePlanBankAccount} onConfirm={() => { BankAccounts.resetFreePlanBankAccount(bankAccountID); - props.onConfirm(); + if (props.onConfirm) { + props.onConfirm(); + } }} shouldShowCancelButton isVisible @@ -53,5 +59,6 @@ const WorkspaceResetBankAccountModal = (props) => { WorkspaceResetBankAccountModal.displayName = 'WorkspaceResetBankAccountModal'; WorkspaceResetBankAccountModal.propTypes = propTypes; +WorkspaceResetBankAccountModal.defaultProps = defaultProps; export default withLocalize(WorkspaceResetBankAccountModal); From 68132de32b71e092543fd92a4fb616d42fd62323 Mon Sep 17 00:00:00 2001 From: Maria D'Costa Date: Wed, 1 Feb 2023 13:15:54 +0400 Subject: [PATCH 04/16] Show workspace bank account reset modal in the Enable and Validation Step --- src/pages/ReimbursementAccount/EnableStep.js | 6 ++++++ src/pages/ReimbursementAccount/ValidationStep.js | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/src/pages/ReimbursementAccount/EnableStep.js b/src/pages/ReimbursementAccount/EnableStep.js index 329f8c61cc9d..79c95a6cc94b 100644 --- a/src/pages/ReimbursementAccount/EnableStep.js +++ b/src/pages/ReimbursementAccount/EnableStep.js @@ -22,6 +22,7 @@ import * as Link from '../../libs/actions/Link'; import * as User from '../../libs/actions/User'; import ScreenWrapper from '../../components/ScreenWrapper'; import * as BankAccounts from '../../libs/actions/ReimbursementAccount'; +import WorkspaceResetBankAccountModal from '../workspace/WorkspaceResetBankAccountModal'; const propTypes = { /** Bank account currently in setup */ @@ -102,6 +103,11 @@ const EnableStep = (props) => { )} + {props.reimbursementAccount.shouldShowResetModal && Boolean(achData.bankAccountID) && ( + + )} ); }; diff --git a/src/pages/ReimbursementAccount/ValidationStep.js b/src/pages/ReimbursementAccount/ValidationStep.js index 282c1c0fa974..d1e0c746d32f 100644 --- a/src/pages/ReimbursementAccount/ValidationStep.js +++ b/src/pages/ReimbursementAccount/ValidationStep.js @@ -204,6 +204,11 @@ class ValidationStep extends React.Component { wrapperStyle={[styles.cardMenuItem, styles.mv3]} /> + {this.props.reimbursementAccount.shouldShowResetModal && ( + + )} )} From eca45cf115d6cbe53204dedcf9f7fb2ec29b6459 Mon Sep 17 00:00:00 2001 From: Maria D'Costa Date: Wed, 1 Feb 2023 13:49:07 +0400 Subject: [PATCH 05/16] Fix missing import --- src/pages/ReimbursementAccount/ValidationStep.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pages/ReimbursementAccount/ValidationStep.js b/src/pages/ReimbursementAccount/ValidationStep.js index d1e0c746d32f..5e347ebba946 100644 --- a/src/pages/ReimbursementAccount/ValidationStep.js +++ b/src/pages/ReimbursementAccount/ValidationStep.js @@ -25,6 +25,7 @@ import Section from '../../components/Section'; import CONST from '../../CONST'; import Button from '../../components/Button'; import MenuItem from '../../components/MenuItem'; +import WorkspaceResetBankAccountModal from '../workspace/WorkspaceResetBankAccountModal'; const propTypes = { ...withLocalizePropTypes, From 4c9dd1f044326d9e31dfca614e8585f274b15d3a Mon Sep 17 00:00:00 2001 From: Maria D'Costa Date: Wed, 1 Feb 2023 14:22:18 +0400 Subject: [PATCH 06/16] Fix lint errors --- .../ReimbursementAccount/ReimbursementAccountPage.js | 8 ++++---- src/pages/workspace/WorkspaceResetBankAccountModal.js | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/pages/ReimbursementAccount/ReimbursementAccountPage.js b/src/pages/ReimbursementAccount/ReimbursementAccountPage.js index 4ce3244d0671..753b313e6ec6 100644 --- a/src/pages/ReimbursementAccount/ReimbursementAccountPage.js +++ b/src/pages/ReimbursementAccount/ReimbursementAccountPage.js @@ -282,12 +282,12 @@ class ReimbursementAccountPage extends React.Component { }} /> {this.props.reimbursementAccount.shouldShowResetModal && Boolean(achData.bankAccountID) && ( - this.setState({ shouldHideContinueSetupButton: true })} + this.setState({shouldHideContinueSetupButton: true})} /> )} - + ); } diff --git a/src/pages/workspace/WorkspaceResetBankAccountModal.js b/src/pages/workspace/WorkspaceResetBankAccountModal.js index 6cc007764fec..46c5c99c9b64 100644 --- a/src/pages/workspace/WorkspaceResetBankAccountModal.js +++ b/src/pages/workspace/WorkspaceResetBankAccountModal.js @@ -21,7 +21,7 @@ const propTypes = { const defaultProps = { onConfirm: null, -} +}; const WorkspaceResetBankAccountModal = (props) => { const achData = lodashGet(props.reimbursementAccount, 'achData') || {}; From 68ce2bf9d5adbfbdd848c4c8b3b73890aa41864d Mon Sep 17 00:00:00 2001 From: Maria D'Costa Date: Thu, 2 Feb 2023 13:45:18 +0400 Subject: [PATCH 07/16] Remove unnecessary condition --- src/pages/ReimbursementAccount/EnableStep.js | 2 +- src/pages/ReimbursementAccount/ReimbursementAccountPage.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/ReimbursementAccount/EnableStep.js b/src/pages/ReimbursementAccount/EnableStep.js index 79c95a6cc94b..b8b7dd1a029f 100644 --- a/src/pages/ReimbursementAccount/EnableStep.js +++ b/src/pages/ReimbursementAccount/EnableStep.js @@ -103,7 +103,7 @@ const EnableStep = (props) => { )} - {props.reimbursementAccount.shouldShowResetModal && Boolean(achData.bankAccountID) && ( + {props.reimbursementAccount.shouldShowResetModal && ( diff --git a/src/pages/ReimbursementAccount/ReimbursementAccountPage.js b/src/pages/ReimbursementAccount/ReimbursementAccountPage.js index 753b313e6ec6..3d96915c149d 100644 --- a/src/pages/ReimbursementAccount/ReimbursementAccountPage.js +++ b/src/pages/ReimbursementAccount/ReimbursementAccountPage.js @@ -281,7 +281,7 @@ class ReimbursementAccountPage extends React.Component { BankAccounts.requestResetFreePlanBankAccount(); }} /> - {this.props.reimbursementAccount.shouldShowResetModal && Boolean(achData.bankAccountID) && ( + {this.props.reimbursementAccount.shouldShowResetModal && ( this.setState({shouldHideContinueSetupButton: true})} From 593668a510d0e384633699e501993ec91006f53c Mon Sep 17 00:00:00 2001 From: Maria D'Costa Date: Fri, 3 Feb 2023 12:46:15 +0400 Subject: [PATCH 08/16] Include WorkspaceResetBankAccountModal in ContinueBankAccountSetp --- .../ContinueBankAccountSetup.js | 15 +++++++++++++++ .../ReimbursementAccountPage.js | 9 +++------ 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/src/pages/ReimbursementAccount/ContinueBankAccountSetup.js b/src/pages/ReimbursementAccount/ContinueBankAccountSetup.js index 76b490239c07..c949a60b9054 100644 --- a/src/pages/ReimbursementAccount/ContinueBankAccountSetup.js +++ b/src/pages/ReimbursementAccount/ContinueBankAccountSetup.js @@ -18,14 +18,22 @@ import ScreenWrapper from '../../components/ScreenWrapper'; import Section from '../../components/Section'; import Text from '../../components/Text'; import withPolicy from '../workspace/withPolicy'; +import * as ReimbursementAccountProps from './reimbursementAccountPropTypes'; +import WorkspaceResetBankAccountModal from '../workspace/WorkspaceResetBankAccountModal'; const propTypes = { + /** Bank account currently in setup */ + reimbursementAccount: ReimbursementAccountProps.reimbursementAccountPropTypes.isRequired, + /** Callback to continue to the next step of the setup */ continue: PropTypes.func.isRequired, /** Callback to start over the setup */ startOver: PropTypes.func.isRequired, + /** Callback to reset the bank account */ + resetBankAccount: PropTypes.func.isRequired, + /** Policy values needed in the component */ policy: PropTypes.shape({ name: PropTypes.string, @@ -74,6 +82,13 @@ const ContinueBankAccountSetup = props => ( + + {props.reimbursementAccount.shouldShowResetModal && ( + + )} ); diff --git a/src/pages/ReimbursementAccount/ReimbursementAccountPage.js b/src/pages/ReimbursementAccount/ReimbursementAccountPage.js index 3d96915c149d..0f74f5c0babf 100644 --- a/src/pages/ReimbursementAccount/ReimbursementAccountPage.js +++ b/src/pages/ReimbursementAccount/ReimbursementAccountPage.js @@ -276,17 +276,14 @@ class ReimbursementAccountPage extends React.Component { return ( { BankAccounts.requestResetFreePlanBankAccount(); }} + resetBankAccount={() => this.setState({ shouldHideContinueSetupButton: true })} /> - {this.props.reimbursementAccount.shouldShowResetModal && ( - this.setState({shouldHideContinueSetupButton: true})} - /> - )} + ); } From 7ae96ea5ef5a656017c40f1a5d53842da59de932 Mon Sep 17 00:00:00 2001 From: Maria D'Costa Date: Fri, 3 Feb 2023 12:51:23 +0400 Subject: [PATCH 09/16] Remove unnecessary props --- .../ReimbursementAccount/ContinueBankAccountSetup.js | 12 ++++++------ .../ReimbursementAccount/ReimbursementAccountPage.js | 7 +------ 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/src/pages/ReimbursementAccount/ContinueBankAccountSetup.js b/src/pages/ReimbursementAccount/ContinueBankAccountSetup.js index c949a60b9054..d5677db00a4d 100644 --- a/src/pages/ReimbursementAccount/ContinueBankAccountSetup.js +++ b/src/pages/ReimbursementAccount/ContinueBankAccountSetup.js @@ -20,6 +20,7 @@ import Text from '../../components/Text'; import withPolicy from '../workspace/withPolicy'; import * as ReimbursementAccountProps from './reimbursementAccountPropTypes'; import WorkspaceResetBankAccountModal from '../workspace/WorkspaceResetBankAccountModal'; +import * as BankAccounts from '../../libs/actions/BankAccounts'; const propTypes = { /** Bank account currently in setup */ @@ -28,11 +29,8 @@ const propTypes = { /** Callback to continue to the next step of the setup */ continue: PropTypes.func.isRequired, - /** Callback to start over the setup */ - startOver: PropTypes.func.isRequired, - /** Callback to reset the bank account */ - resetBankAccount: PropTypes.func.isRequired, + startOver: PropTypes.func.isRequired, /** Policy values needed in the component */ policy: PropTypes.shape({ @@ -75,7 +73,9 @@ const ContinueBankAccountSetup = props => ( { + BankAccounts.requestResetFreePlanBankAccount(); + }} shouldShowRightIcon wrapperStyle={[styles.cardMenuItem]} /> @@ -86,7 +86,7 @@ const ContinueBankAccountSetup = props => ( {props.reimbursementAccount.shouldShowResetModal && ( )} diff --git a/src/pages/ReimbursementAccount/ReimbursementAccountPage.js b/src/pages/ReimbursementAccount/ReimbursementAccountPage.js index 0f74f5c0babf..5177f565b1ce 100644 --- a/src/pages/ReimbursementAccount/ReimbursementAccountPage.js +++ b/src/pages/ReimbursementAccount/ReimbursementAccountPage.js @@ -29,7 +29,6 @@ import EnableStep from './EnableStep'; import ROUTES from '../../ROUTES'; import HeaderWithCloseButton from '../../components/HeaderWithCloseButton'; import * as ReimbursementAccountProps from './reimbursementAccountPropTypes'; -import WorkspaceResetBankAccountModal from '../workspace/WorkspaceResetBankAccountModal'; import reimbursementAccountDraftPropTypes from './ReimbursementAccountDraftPropTypes'; import * as ReimbursementAccountUtils from '../../libs/ReimbursementAccountUtils'; @@ -278,12 +277,8 @@ class ReimbursementAccountPage extends React.Component { { - BankAccounts.requestResetFreePlanBankAccount(); - }} - resetBankAccount={() => this.setState({ shouldHideContinueSetupButton: true })} + startOver={() => this.setState({shouldHideContinueSetupButton: true})} /> - ); } From eaf6f6c11ed8eba1d5e72db4cc4e72284ab9544f Mon Sep 17 00:00:00 2001 From: Maria D'Costa Date: Fri, 3 Feb 2023 12:52:15 +0400 Subject: [PATCH 10/16] Update default for func prop --- src/pages/workspace/WorkspaceResetBankAccountModal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/workspace/WorkspaceResetBankAccountModal.js b/src/pages/workspace/WorkspaceResetBankAccountModal.js index 46c5c99c9b64..4a388a9820a4 100644 --- a/src/pages/workspace/WorkspaceResetBankAccountModal.js +++ b/src/pages/workspace/WorkspaceResetBankAccountModal.js @@ -20,7 +20,7 @@ const propTypes = { }; const defaultProps = { - onConfirm: null, + onConfirm: () => {}, }; const WorkspaceResetBankAccountModal = (props) => { From 982b971b5fd31bb5f57a0204c587feb84eec56c7 Mon Sep 17 00:00:00 2001 From: Maria D'Costa Date: Fri, 3 Feb 2023 12:56:35 +0400 Subject: [PATCH 11/16] Remove unnecessary if statement --- src/pages/workspace/WorkspaceResetBankAccountModal.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/pages/workspace/WorkspaceResetBankAccountModal.js b/src/pages/workspace/WorkspaceResetBankAccountModal.js index 4a388a9820a4..91059b737494 100644 --- a/src/pages/workspace/WorkspaceResetBankAccountModal.js +++ b/src/pages/workspace/WorkspaceResetBankAccountModal.js @@ -47,9 +47,7 @@ const WorkspaceResetBankAccountModal = (props) => { onCancel={BankAccounts.cancelResetFreePlanBankAccount} onConfirm={() => { BankAccounts.resetFreePlanBankAccount(bankAccountID); - if (props.onConfirm) { - props.onConfirm(); - } + props.onConfirm(); }} shouldShowCancelButton isVisible From 875d4521c3f585f279e3b8b9908957e8c84c4715 Mon Sep 17 00:00:00 2001 From: Maria D'Costa Date: Fri, 3 Feb 2023 14:03:34 +0400 Subject: [PATCH 12/16] Add isLoading to resetFreePlanBankAccount --- .../resetFreePlanBankAccount.js | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/libs/actions/ReimbursementAccount/resetFreePlanBankAccount.js b/src/libs/actions/ReimbursementAccount/resetFreePlanBankAccount.js index 4255b79d5d22..12a6efc2c701 100644 --- a/src/libs/actions/ReimbursementAccount/resetFreePlanBankAccount.js +++ b/src/libs/actions/ReimbursementAccount/resetFreePlanBankAccount.js @@ -25,7 +25,7 @@ function resetFreePlanBankAccount(bankAccountID) { { optimisticData: [ { - onyxMethod: 'set', + onyxMethod: CONST.ONYX.METHOD.SET, key: ONYXKEYS.ONFIDO_TOKEN, value: '', }, @@ -44,12 +44,31 @@ function resetFreePlanBankAccount(bankAccountID) { key: ONYXKEYS.REIMBURSEMENT_ACCOUNT, value: ReimbursementAccountProps.reimbursementAccountDefaultProps, }, + { + onyxMethod: CONST.ONYX.METHOD.MERGE, + key: ONYXKEYS.REIMBURSEMENT_ACCOUNT, + value: {isLoading: true}, + }, { onyxMethod: CONST.ONYX.METHOD.SET, key: ONYXKEYS.REIMBURSEMENT_ACCOUNT_DRAFT, value: {}, }, ], + successData: [ + { + onyxMethod: CONST.ONYX.METHOD.MERGE, + key: ONYXKEYS.REIMBURSEMENT_ACCOUNT, + value: {isLoading: false}, + }, + ], + failureData: [ + { + onyxMethod: CONST.ONYX.METHOD.MERGE, + key: ONYXKEYS.REIMBURSEMENT_ACCOUNT, + value: {isLoading: false}, + }, + ] }); } From 17c81b6d8bfdb7c56521c8fba1725b5f2be5b247 Mon Sep 17 00:00:00 2001 From: Maria D'Costa Date: Fri, 3 Feb 2023 15:10:02 +0400 Subject: [PATCH 13/16] Fix lint error and address review comment --- .../actions/ReimbursementAccount/resetFreePlanBankAccount.js | 2 +- src/pages/ReimbursementAccount/ContinueBankAccountSetup.js | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/libs/actions/ReimbursementAccount/resetFreePlanBankAccount.js b/src/libs/actions/ReimbursementAccount/resetFreePlanBankAccount.js index 12a6efc2c701..94799fa6b3c6 100644 --- a/src/libs/actions/ReimbursementAccount/resetFreePlanBankAccount.js +++ b/src/libs/actions/ReimbursementAccount/resetFreePlanBankAccount.js @@ -68,7 +68,7 @@ function resetFreePlanBankAccount(bankAccountID) { key: ONYXKEYS.REIMBURSEMENT_ACCOUNT, value: {isLoading: false}, }, - ] + ], }); } diff --git a/src/pages/ReimbursementAccount/ContinueBankAccountSetup.js b/src/pages/ReimbursementAccount/ContinueBankAccountSetup.js index d5677db00a4d..b7c102ecd5e6 100644 --- a/src/pages/ReimbursementAccount/ContinueBankAccountSetup.js +++ b/src/pages/ReimbursementAccount/ContinueBankAccountSetup.js @@ -73,9 +73,7 @@ const ContinueBankAccountSetup = props => ( { - BankAccounts.requestResetFreePlanBankAccount(); - }} + onPress={() => BankAccounts.requestResetFreePlanBankAccount()} shouldShowRightIcon wrapperStyle={[styles.cardMenuItem]} /> From e936a7c8ba9abaef6847e574b7ffa128e20e55d2 Mon Sep 17 00:00:00 2001 From: Maria D'Costa Date: Thu, 9 Feb 2023 15:25:17 +0400 Subject: [PATCH 14/16] Remove View to fix issue with blank screen on iOS --- .../ReimbursementAccount/ReimbursementAccountPage.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/pages/ReimbursementAccount/ReimbursementAccountPage.js b/src/pages/ReimbursementAccount/ReimbursementAccountPage.js index 5177f565b1ce..2b2365296d70 100644 --- a/src/pages/ReimbursementAccount/ReimbursementAccountPage.js +++ b/src/pages/ReimbursementAccount/ReimbursementAccountPage.js @@ -273,13 +273,11 @@ class ReimbursementAccountPage extends React.Component { || achData.state === BankAccount.STATE.PENDING )) { return ( - - this.setState({shouldHideContinueSetupButton: true})} - /> - + this.setState({ shouldHideContinueSetupButton: true })} + /> ); } From bfc75e8d32dffec437cfe587b400cff38363f0b8 Mon Sep 17 00:00:00 2001 From: Maria D'Costa Date: Thu, 9 Feb 2023 15:30:01 +0400 Subject: [PATCH 15/16] Use ScreenWrapper component to avoid header being cut off on iOS --- src/pages/ReimbursementAccount/ValidationStep.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pages/ReimbursementAccount/ValidationStep.js b/src/pages/ReimbursementAccount/ValidationStep.js index 9389c3e9d42e..077ee7544029 100644 --- a/src/pages/ReimbursementAccount/ValidationStep.js +++ b/src/pages/ReimbursementAccount/ValidationStep.js @@ -29,6 +29,7 @@ import Button from '../../components/Button'; import MenuItem from '../../components/MenuItem'; import WorkspaceResetBankAccountModal from '../workspace/WorkspaceResetBankAccountModal'; import Enable2FAPrompt from './Enable2FAPrompt'; +import ScreenWrapper from '../../components/ScreenWrapper'; const propTypes = { ...withLocalizePropTypes, @@ -129,7 +130,7 @@ class ValidationStep extends React.Component { const requiresTwoFactorAuth = lodashGet(this.props, 'account.requiresTwoFactorAuth'); return ( - + )} - + ); } } From c3c505f8e106b70b7a544aa0ff403ad8b0816e4c Mon Sep 17 00:00:00 2001 From: Maria D'Costa Date: Thu, 9 Feb 2023 15:35:18 +0400 Subject: [PATCH 16/16] Fix lint error --- src/pages/ReimbursementAccount/ReimbursementAccountPage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/ReimbursementAccount/ReimbursementAccountPage.js b/src/pages/ReimbursementAccount/ReimbursementAccountPage.js index 2b2365296d70..4337292048bb 100644 --- a/src/pages/ReimbursementAccount/ReimbursementAccountPage.js +++ b/src/pages/ReimbursementAccount/ReimbursementAccountPage.js @@ -276,7 +276,7 @@ class ReimbursementAccountPage extends React.Component { this.setState({ shouldHideContinueSetupButton: true })} + startOver={() => this.setState({shouldHideContinueSetupButton: true})} /> ); }