From 4e7ca90fad3d9f190f947dd294a4965abeeae398 Mon Sep 17 00:00:00 2001 From: Marc Glasser Date: Thu, 16 Sep 2021 11:44:24 -1000 Subject: [PATCH 1/7] Remove confirm modals --- src/components/AddPlaidBankAccount.js | 60 ++-- src/languages/en.js | 4 +- src/languages/es.js | 4 +- src/libs/actions/BankAccounts.js | 2 +- .../ReimbursementAccount/BankAccountStep.js | 109 +++---- .../BeneficialOwnersStep.js | 24 +- src/pages/ReimbursementAccount/CompanyStep.js | 304 +++++++++--------- .../ReimbursementAccount/ExistingOwners.js | 40 +-- .../ReimbursementAccountForm.js | 119 +++++++ .../ReimbursementAccountPage.js | 38 +-- .../ReimbursementAccount/RequestorStep.js | 193 ++++++----- .../ReimbursementAccount/ValidationStep.js | 43 +-- .../reimbursementAccountPropTypes.js | 38 +++ src/pages/workspace/WorkspaceCardPage.js | 12 +- src/styles/styles.js | 5 + 15 files changed, 512 insertions(+), 483 deletions(-) create mode 100644 src/pages/ReimbursementAccount/ReimbursementAccountForm.js create mode 100644 src/pages/ReimbursementAccount/reimbursementAccountPropTypes.js diff --git a/src/components/AddPlaidBankAccount.js b/src/components/AddPlaidBankAccount.js index 9e760f0bd860..fa10e5c0f19e 100644 --- a/src/components/AddPlaidBankAccount.js +++ b/src/components/AddPlaidBankAccount.js @@ -20,10 +20,10 @@ import styles from '../styles/styles'; import themeColors from '../styles/themes/default'; import compose from '../libs/compose'; import withLocalize, {withLocalizePropTypes} from './withLocalize'; -import Button from './Button'; import ExpensiPicker from './ExpensiPicker'; import Text from './Text'; import * as ReimbursementAccountUtils from '../libs/ReimbursementAccountUtils'; +import ReimbursementAccountForm from '../pages/ReimbursementAccount/ReimbursementAccountForm'; const propTypes = { ...withLocalizePropTypes, @@ -95,7 +95,6 @@ class AddPlaidBankAccount extends React.Component { this.state = { selectedIndex: undefined, - isCreatingAccount: false, institution: {}, }; @@ -139,7 +138,6 @@ class AddPlaidBankAccount extends React.Component { this.props.onSubmit({ account, plaidLinkToken: this.props.plaidLinkToken, }); - this.setState({isCreatingAccount: true}); } render() { @@ -173,40 +171,32 @@ class AddPlaidBankAccount extends React.Component { /> )} {accounts.length > 0 && ( - <> - - {!_.isEmpty(this.props.text) && ( - {this.props.text} - )} - {/* @TODO there are a bunch of logos to incorporate here to replace this name - https://d2k5nsl2zxldvw.cloudfront.net/images/plaid/bg_plaidLogos_12@2x.png */} - {this.state.institution.name} - - { - this.setState({selectedIndex: Number(index)}); - this.clearError('selectedBank'); - }} - items={options} - placeholder={_.isUndefined(this.state.selectedIndex) ? { - value: '', - label: this.props.translate('bankAccount.chooseAnAccount'), - } : {}} - value={this.state.selectedIndex} - hasError={this.getErrors().selectedBank} - /> - - - -