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

Removed Add Work Email step from VBBA #48572

Merged
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
4 changes: 0 additions & 4 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3541,12 +3541,8 @@ export default {
continueWithSetup: 'Continue with setup',
youreAlmostDone: "You're almost done setting up your bank account, which will let you issue corporate cards, reimburse expenses, collect invoices, and pay bills.",
streamlinePayments: 'Streamline payments',
oneMoreThing: 'One more thing!',
allSet: "You're all set!",
accountDescriptionNoCards:
'This bank account will be used to reimburse expenses, collect invoices, and pay bills.\n\nPlease add a work email as a secondary login to enable the Expensify Card.',
accountDescriptionWithCards: 'This bank account will be used to issue corporate cards, reimburse expenses, collect invoices, and pay bills.',
addWorkEmail: 'Add work email',
letsFinishInChat: "Let's finish in chat!",
almostDone: 'Almost done!',
disconnectBankAccount: 'Disconnect bank account',
Expand Down
4 changes: 0 additions & 4 deletions src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3591,12 +3591,8 @@ export default {
continueWithSetup: 'Continuar con la configuración',
youreAlmostDone: 'Casi has acabado de configurar tu cuenta bancaria, que te permitirá emitir tarjetas corporativas, reembolsar gastos y cobrar pagar facturas.',
streamlinePayments: 'Optimiza pagos',
oneMoreThing: '¡Una cosa más!',
allSet: '¡Todo listo!',
accountDescriptionNoCards:
'Esta cuenta bancaria se utilizará para reembolsar gastos y cobrar y pagar facturas.\n\nPor favor, añade un correo electrónico de trabajo como tu nombre de usuario secundario para activar la Tarjeta Expensify.',
accountDescriptionWithCards: 'Esta cuenta bancaria se utilizará para emitir tarjetas corporativas, reembolsar gastos y cobrar y pagar facturas.',
addWorkEmail: 'Añadir correo electrónico de trabajo',
letsFinishInChat: '¡Continuemos en el chat!',
almostDone: '¡Casi listo!',
disconnectBankAccount: 'Desconectar cuenta bancaria',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import React from 'react';
import type {OnyxEntry} from 'react-native-onyx';
import {withOnyx} from 'react-native-onyx';
import Button from '@components/Button';
import HeaderWithBackButton from '@components/HeaderWithBackButton';
import getBankIcon from '@components/Icon/BankIcons';
import * as Expensicons from '@components/Icon/Expensicons';
Expand All @@ -15,33 +13,25 @@ import Text from '@components/Text';
import useLocalize from '@hooks/useLocalize';
import useThemeStyles from '@hooks/useThemeStyles';
import WorkspaceResetBankAccountModal from '@pages/workspace/WorkspaceResetBankAccountModal';
import * as Link from '@userActions/Link';
import * as BankAccounts from '@userActions/ReimbursementAccount';
import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
import type {ReimbursementAccount, User} from '@src/types/onyx';
import type {ReimbursementAccount} from '@src/types/onyx';
import {isEmptyObject} from '@src/types/utils/EmptyObject';

type EnableBankAccountOnyxProps = {
/** Object with various information about the user */
user: OnyxEntry<User>;
};

type EnableBankAccountProps = EnableBankAccountOnyxProps & {
type EnableBankAccountProps = {
/** Bank account currently in setup */
reimbursementAccount: OnyxEntry<ReimbursementAccount>;

/** Method to trigger when pressing back button of the header */
onBackButtonPress: () => void;
};

function EnableBankAccount({reimbursementAccount, user, onBackButtonPress}: EnableBankAccountProps) {
function EnableBankAccount({reimbursementAccount, onBackButtonPress}: EnableBankAccountProps) {
const styles = useThemeStyles();
const {translate} = useLocalize();

const achData = reimbursementAccount?.achData ?? {};
const {icon, iconSize} = getBankIcon({bankName: achData.bankName, styles});
const isUsingExpensifyCard = user?.isUsingExpensifyCard;
const formattedBankAccountNumber = achData.accountNumber ? `${translate('bankAccount.accountEnding')} ${achData.accountNumber.slice(-4)}` : '';
const bankAccountOwnerName = achData.addressName;
const errors = reimbursementAccount?.errors ?? {};
Expand All @@ -63,8 +53,8 @@ function EnableBankAccount({reimbursementAccount, user, onBackButtonPress}: Enab
/>
<ScrollView style={[styles.flex1]}>
<Section
title={!isUsingExpensifyCard ? translate('workspace.bankAccount.oneMoreThing') : translate('workspace.bankAccount.allSet')}
icon={!isUsingExpensifyCard ? Illustrations.ConciergeNew : Illustrations.ThumbsUpStars}
title={translate('workspace.bankAccount.allSet')}
icon={Illustrations.ThumbsUpStars}
>
<OfflineWithFeedback
pendingAction={pendingAction}
Expand All @@ -82,22 +72,7 @@ function EnableBankAccount({reimbursementAccount, user, onBackButtonPress}: Enab
displayInDefaultIconColor
wrapperStyle={[styles.cardMenuItem, styles.mv3]}
/>
<Text style={[styles.mv3]}>
{!isUsingExpensifyCard ? translate('workspace.bankAccount.accountDescriptionNoCards') : translate('workspace.bankAccount.accountDescriptionWithCards')}
</Text>
{!isUsingExpensifyCard && (
<Button
text={translate('workspace.bankAccount.addWorkEmail')}
onPress={() => {
Link.openOldDotLink(CONST.ADD_SECONDARY_LOGIN_URL);
}}
icon={Expensicons.Mail}
style={[styles.mt4]}
shouldShowRightIcon
large
success
/>
)}
<Text style={[styles.mv3]}>{translate('workspace.bankAccount.accountDescriptionWithCards')}</Text>
<MenuItem
title={translate('workspace.bankAccount.disconnectBankAccount')}
icon={Expensicons.Close}
Expand All @@ -107,7 +82,6 @@ function EnableBankAccount({reimbursementAccount, user, onBackButtonPress}: Enab
/>
</OfflineWithFeedback>
</Section>
{user?.isCheckingDomain && <Text style={[styles.formError, styles.mh5]}>{translate('workspace.card.checkingDomain')}</Text>}
</ScrollView>
{shouldShowResetModal && <WorkspaceResetBankAccountModal reimbursementAccount={reimbursementAccount} />}
</ScreenWrapper>
Expand All @@ -116,8 +90,4 @@ function EnableBankAccount({reimbursementAccount, user, onBackButtonPress}: Enab

EnableBankAccount.displayName = 'EnableStep';

export default withOnyx<EnableBankAccountProps, EnableBankAccountOnyxProps>({
user: {
key: ONYXKEYS.USER,
},
})(EnableBankAccount);
export default EnableBankAccount;
Loading