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

Plaid Desktop Warning #7198

Merged
merged 8 commits into from
Jan 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions src/languages/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,7 @@ export default {
chooseAnAccount: 'Choose an account',
connectOnlineWithPlaid: 'Connect online with Plaid',
connectManually: 'Connect manually',
desktopConnection: 'Note: To connect with Chase, Wells Fargo, Capital One or Bank of America, please click here to complete this process in a browser.',
yourDataIsSecure: 'Your data is secure',
toGetStarted: 'Add a bank account and issue corporate cards, reimburse expenses, collect invoice payments, and pay bills, all from one place.',
plaidBodyCopy: 'Give your employees an easier way to pay - and get paid back - for company expenses.',
Expand Down
1 change: 1 addition & 0 deletions src/languages/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,7 @@ export default {
chooseAnAccount: 'Elige una cuenta',
connectOnlineWithPlaid: 'Conéctate a Plaid online',
connectManually: 'Conectar manualmente',
desktopConnection: 'Para conectarse con Chase, Wells Fargo, Capital One o Bank of America, haga clic aquí para completar este proceso en un navegador.',
yourDataIsSecure: 'Tus datos están seguros',
toGetStarted: 'Añade una cuenta bancaria y emite tarjetas corporativas, reembolsa gastos y cobra y paga facturas, todo desde un mismo sitio.',
plaidBodyCopy: 'Ofrezca a sus empleados una forma más sencilla de pagar - y recuperar - los gastos de la empresa.',
Expand Down
1 change: 1 addition & 0 deletions src/libs/getPlaidDesktopMessage/index.desktop.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default () => 'bankAccount.desktopConnection';
1 change: 1 addition & 0 deletions src/libs/getPlaidDesktopMessage/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default () => {};
14 changes: 13 additions & 1 deletion src/pages/ReimbursementAccount/BankAccountStep.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ import reimbursementAccountPropTypes from './reimbursementAccountPropTypes';
import Section from '../../components/Section';
import * as ValidationUtils from '../../libs/ValidationUtils';
import * as Illustrations from '../../components/Icon/Illustrations';
import getPlaidDesktopMessage from '../../libs/getPlaidDesktopMessage';
import CONFIG from '../../CONFIG';
import ROUTES from '../../ROUTES';

const propTypes = {
/** Bank account currently in setup */
Expand Down Expand Up @@ -173,6 +176,8 @@ class BankAccountStep extends React.Component {
const shouldDisableInputs = Boolean(this.props.achData.bankAccountID) || isFromPlaid;
const shouldReinitializePlaidLink = this.props.plaidLinkOAuthToken && this.props.receivedRedirectURI && this.props.achData.subStep !== CONST.BANK_ACCOUNT.SUBSTEP.MANUAL;
const subStep = shouldReinitializePlaidLink ? CONST.BANK_ACCOUNT.SETUP_TYPE.PLAID : this.props.achData.subStep;
const plaidDesktopMessage = getPlaidDesktopMessage();
const bankAccountRoute = `${CONFIG.EXPENSIFY.URL_EXPENSIFY_CASH}${ROUTES.BANK_ACCOUNT}`;

return (
<View style={[styles.flex1, styles.justifyContentBetween]}>
Expand All @@ -198,9 +203,16 @@ class BankAccountStep extends React.Component {
icon={Illustrations.BankMouseGreen}
title={this.props.translate('workspace.bankAccount.streamlinePayments')}
/>
<Text style={[styles.mh5, styles.mb5]}>
<Text style={[styles.mh5, styles.mb1]}>
{this.props.translate('bankAccount.toGetStarted')}
</Text>
{plaidDesktopMessage && (
<View style={[styles.m5, styles.flexRow, styles.justifyContentBetween]}>
<TextLink href={bankAccountRoute}>
{this.props.translate(plaidDesktopMessage)}
</TextLink>
</View>
)}
<MenuItem
icon={Expensicons.Bank}
title={this.props.translate('bankAccount.connectOnlineWithPlaid')}
Expand Down