Skip to content

Commit 8e13bcc

Browse files
authored
Merge pull request #50565 from rezkiy37/feature/45175-invoicing-settings-screen
Update Invoices setting screen
2 parents 45cabbf + f029d56 commit 8e13bcc

10 files changed

+22
-226
lines changed

src/components/ConnectBankAccountButton.tsx

-44
This file was deleted.

src/languages/en.ts

+2-10
Original file line numberDiff line numberDiff line change
@@ -3827,14 +3827,6 @@ const translations = {
38273827
notReadyDescription: 'Draft or pending expense reports cannot be exported to the accounting system. Please approve or pay these expenses before exporting them.',
38283828
},
38293829
invoices: {
3830-
invoiceClientsAndCustomers: 'Invoice clients and customers',
3831-
invoiceFirstSectionCopy: 'Send beautiful, professional invoices directly to your clients and customers right from the Expensify app.',
3832-
viewAllInvoices: 'View all invoices',
3833-
unlockOnlineInvoiceCollection: 'Unlock online invoice collection',
3834-
unlockNoVBACopy: 'Connect your bank account to accept online invoice payments by ACH or credit card.',
3835-
moneyBackInAFlash: 'Money back, in a flash!',
3836-
unlockVBACopy: "You're all set to accept payments by ACH or credit card!",
3837-
viewUnpaidInvoices: 'View unpaid invoices',
38383830
sendInvoice: 'Send invoice',
38393831
sendFrom: 'Send from',
38403832
invoicingDetails: 'Invoicing details',
@@ -3850,8 +3842,8 @@ const translations = {
38503842
payingAsBusiness: 'Paying as a business',
38513843
},
38523844
invoiceBalance: 'Invoice balance',
3853-
invoiceBalanceSubtitle: 'Here’s your current balance from collecting payments on invoices.',
3854-
bankAccountsSubtitle: 'Add a bank account to receive invoice payments.',
3845+
invoiceBalanceSubtitle: "This is your current balance from collecting invoice payments. It'll transfer to your bank account automatically if you've added one.",
3846+
bankAccountsSubtitle: 'Add a bank account to make and receive invoice payments.',
38553847
},
38563848
invite: {
38573849
member: 'Invite member',

src/languages/es.ts

+2-10
Original file line numberDiff line numberDiff line change
@@ -3872,14 +3872,6 @@ const translations = {
38723872
'Los borradores o informes de gastos pendientes no se pueden exportar al sistema contabilidad. Por favor, apruebe o pague estos gastos antes de exportarlos.',
38733873
},
38743874
invoices: {
3875-
invoiceClientsAndCustomers: 'Emite facturas a tus clientes',
3876-
invoiceFirstSectionCopy: 'Envía facturas detalladas y profesionales directamente a tus clientes desde la app de Expensify.',
3877-
viewAllInvoices: 'Ver facturas emitidas',
3878-
unlockOnlineInvoiceCollection: 'Desbloquea el cobro de facturas online',
3879-
unlockNoVBACopy: 'Conecta tu cuenta bancaria para recibir pagos de facturas online por transferencia o con tarjeta.',
3880-
moneyBackInAFlash: '¡Tu dinero de vuelta en un momento!',
3881-
unlockVBACopy: '¡Todo listo para recibir pagos por transferencia o con tarjeta!',
3882-
viewUnpaidInvoices: 'Ver facturas emitidas pendientes',
38833875
sendInvoice: 'Enviar factura',
38843876
sendFrom: 'Enviar desde',
38853877
invoicingDetails: 'Detalles de facturación',
@@ -3895,8 +3887,8 @@ const translations = {
38953887
payingAsBusiness: 'Pagar como una empresa',
38963888
},
38973889
invoiceBalance: 'Saldo de la factura',
3898-
invoiceBalanceSubtitle: 'Aquí está su saldo actual de la recaudación de pagos en las facturas.',
3899-
bankAccountsSubtitle: 'Agrega una cuenta bancaria para recibir pagos de facturas.',
3890+
invoiceBalanceSubtitle: 'Este es tu saldo actual de la recaudación de pagos de facturas. Se transferirá automáticamente a tu cuenta bancaria si has agregado una.',
3891+
bankAccountsSubtitle: 'Agrega una cuenta bancaria para hacer y recibir pagos de facturas.',
39003892
},
39013893
invite: {
39023894
member: 'Invitar miembros',

src/pages/workspace/invoices/WorkspaceInvoiceBalanceSection.tsx

+10-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import React from 'react';
22
import {useOnyx} from 'react-native-onyx';
3-
import Balance from '@components/Balance';
3+
import MenuItemWithTopDescription from '@components/MenuItemWithTopDescription';
44
import Section from '@components/Section';
55
import useLocalize from '@hooks/useLocalize';
66
import useThemeStyles from '@hooks/useThemeStyles';
7+
import * as CurrencyUtils from '@libs/CurrencyUtils';
78
import ONYXKEYS from '@src/ONYXKEYS';
89

910
type WorkspaceInvoiceBalanceSectionProps = {
@@ -21,11 +22,17 @@ function WorkspaceInvoiceBalanceSection({policyID}: WorkspaceInvoiceBalanceSecti
2122
title={translate('workspace.invoices.invoiceBalance')}
2223
subtitle={translate('workspace.invoices.invoiceBalanceSubtitle')}
2324
isCentralPane
24-
titleStyles={styles.textStrong}
25+
titleStyles={styles.accountSettingsSectionTitle}
2526
childrenStyles={styles.pt5}
2627
subtitleMuted
2728
>
28-
<Balance balance={policy?.invoice?.bankAccount?.stripeConnectAccountBalance ?? 0} />
29+
<MenuItemWithTopDescription
30+
description={translate('walletPage.balance')}
31+
title={CurrencyUtils.convertToDisplayString(policy?.invoice?.bankAccount?.stripeConnectAccountBalance ?? 0)}
32+
titleStyle={styles.textHeadlineH2}
33+
interactive={false}
34+
wrapperStyle={styles.sectionMenuItemTopDescription}
35+
/>
2936
</Section>
3037
);
3138
}

src/pages/workspace/invoices/WorkspaceInvoiceVBASection.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ function WorkspaceInvoiceVBASection({policyID}: WorkspaceInvoiceVBASectionProps)
177177
subtitle={translate('workspace.invoices.bankAccountsSubtitle')}
178178
isCentralPane
179179
titleStyles={styles.accountSettingsSectionTitle}
180+
subtitleMuted
180181
>
181182
<PaymentMethodList
182183
shouldShowAddBankAccountButton={!hasBankAccount}

src/pages/workspace/invoices/WorkspaceInvoicesFirstSection.tsx

-58
This file was deleted.

src/pages/workspace/invoices/WorkspaceInvoicesNoVBAView.tsx

-43
This file was deleted.

src/pages/workspace/invoices/WorkspaceInvoicesPage.tsx

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import type {StackScreenProps} from '@react-navigation/stack';
22
import React from 'react';
33
import {View} from 'react-native';
4+
import * as Illustrations from '@components/Icon/Illustrations';
45
import useLocalize from '@hooks/useLocalize';
56
import useResponsiveLayout from '@hooks/useResponsiveLayout';
67
import useThemeStyles from '@hooks/useThemeStyles';
@@ -10,15 +11,15 @@ import WorkspacePageWithSections from '@pages/workspace/WorkspacePageWithSection
1011
import CONST from '@src/CONST';
1112
import type SCREENS from '@src/SCREENS';
1213
import WorkspaceInvoiceBalanceSection from './WorkspaceInvoiceBalanceSection';
13-
import WorkspaceInvoicesNoVBAView from './WorkspaceInvoicesNoVBAView';
14-
import WorkspaceInvoicesVBAView from './WorkspaceInvoicesVBAView';
1514
import WorkspaceInvoiceVBASection from './WorkspaceInvoiceVBASection';
15+
import WorkspaceInvoicingDetailsSection from './WorkspaceInvoicingDetailsSection';
1616

1717
type WorkspaceInvoicesPageProps = StackScreenProps<FullScreenNavigatorParamList, typeof SCREENS.WORKSPACE.INVOICES>;
1818
function WorkspaceInvoicesPage({route}: WorkspaceInvoicesPageProps) {
1919
const {translate} = useLocalize();
2020
const styles = useThemeStyles();
2121
const {shouldUseNarrowLayout} = useResponsiveLayout();
22+
2223
return (
2324
<AccessOrNotFoundWrapper
2425
accessVariants={[CONST.POLICY.ACCESS_VARIANTS.ADMIN, CONST.POLICY.ACCESS_VARIANTS.PAID]}
@@ -32,13 +33,13 @@ function WorkspaceInvoicesPage({route}: WorkspaceInvoicesPageProps) {
3233
shouldShowOfflineIndicatorInWideScreen
3334
shouldSkipVBBACall={false}
3435
route={route}
36+
icon={Illustrations.InvoiceBlue}
3537
>
36-
{(hasVBA?: boolean, policyID?: string) => (
38+
{(_hasVBA?: boolean, policyID?: string) => (
3739
<View style={[styles.mt3, shouldUseNarrowLayout ? styles.workspaceSectionMobile : styles.workspaceSection]}>
3840
{policyID && <WorkspaceInvoiceBalanceSection policyID={policyID} />}
3941
{policyID && <WorkspaceInvoiceVBASection policyID={policyID} />}
40-
{!hasVBA && policyID && <WorkspaceInvoicesNoVBAView policyID={policyID} />}
41-
{hasVBA && policyID && <WorkspaceInvoicesVBAView policyID={policyID} />}
42+
{policyID && <WorkspaceInvoicingDetailsSection policyID={policyID} />}
4243
</View>
4344
)}
4445
</WorkspacePageWithSections>

src/pages/workspace/invoices/WorkspaceInvoicesVBAView.tsx

-52
This file was deleted.

src/pages/workspace/invoices/WorkspaceInvoicingDetailsSection.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function WorkspaceInvoicingDetailsSection({policyID}: WorkspaceInvoicingDetailsS
2828
subtitle={translate('workspace.invoices.invoicingDetailsDescription')}
2929
containerStyles={[styles.ph0, shouldUseNarrowLayout ? styles.pt5 : styles.pt8]}
3030
subtitleStyles={horizontalPadding}
31-
titleStyles={[styles.textStrong, horizontalPadding]}
31+
titleStyles={[styles.accountSettingsSectionTitle, horizontalPadding]}
3232
childrenStyles={styles.pt5}
3333
subtitleMuted
3434
>

0 commit comments

Comments
 (0)