From c26c9fef183f20e53f3f1ae780aa64793be0b750 Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Fri, 3 May 2024 10:12:47 +0530 Subject: [PATCH 01/29] add export route --- src/ROUTES.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ROUTES.ts b/src/ROUTES.ts index 79f9c84b5998..11752e2c2771 100644 --- a/src/ROUTES.ts +++ b/src/ROUTES.ts @@ -786,6 +786,10 @@ const ROUTES = { route: 'settings/workspaces/:policyID/accounting/xero/import/taxes', getRoute: (policyID: string) => `settings/workspaces/${policyID}/accounting/xero/import/taxes` as const, }, + POLICY_ACCOUNTING_XERO_EXPORT: { + route: 'settings/workspaces/:policyID/accounting/xero/export', + getRoute: (policyID: string) => `settings/workspaces/${policyID}/accounting/xero/export` as const, + }, POLICY_ACCOUNTING_QUICKBOOKS_ONLINE_IMPORT: { route: 'settings/workspaces/:policyID/accounting/quickbooks-online/import', getRoute: (policyID: string) => `settings/workspaces/${policyID}/accounting/quickbooks-online/import` as const, From b6c49bf8cf268cffaf1083575ae5e0e73eb71749 Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Fri, 3 May 2024 10:13:03 +0530 Subject: [PATCH 02/29] add export screen --- src/SCREENS.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/SCREENS.ts b/src/SCREENS.ts index ec120657a3bb..249124cf067e 100644 --- a/src/SCREENS.ts +++ b/src/SCREENS.ts @@ -239,6 +239,7 @@ const SCREENS = { XERO_ORGANIZATION: 'Policy_Accounting_Xero_Customers', XERO_CUSTOMER: 'Policy_Acounting_Xero_Import_Customer', XERO_TAXES: 'Policy_Accounting_Xero_Taxes', + XERO_EXPORT: 'Policy_Accounting_Xero_Export', }, INITIAL: 'Workspace_Initial', PROFILE: 'Workspace_Profile', From a94c5a05dd3c06895a10fe6b777e4facda5fad2b Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Fri, 3 May 2024 10:13:19 +0530 Subject: [PATCH 03/29] add export to navigation --- .../Navigation/AppNavigator/ModalStackNavigators/index.tsx | 1 + .../Navigation/linkingConfig/FULL_SCREEN_TO_RHP_MAPPING.ts | 1 + src/libs/Navigation/linkingConfig/config.ts | 1 + src/libs/Navigation/types.ts | 3 +++ 4 files changed, 6 insertions(+) diff --git a/src/libs/Navigation/AppNavigator/ModalStackNavigators/index.tsx b/src/libs/Navigation/AppNavigator/ModalStackNavigators/index.tsx index eb45b5029619..fc6cfc673e03 100644 --- a/src/libs/Navigation/AppNavigator/ModalStackNavigators/index.tsx +++ b/src/libs/Navigation/AppNavigator/ModalStackNavigators/index.tsx @@ -299,6 +299,7 @@ const SettingsModalStackNavigator = createModalStackNavigator require('../../../../pages/workspace/accounting/xero/XeroOrganizationConfigurationPage').default as React.ComponentType, [SCREENS.WORKSPACE.ACCOUNTING.XERO_CUSTOMER]: () => require('../../../../pages/workspace/accounting/xero/import/XeroCustomerConfigurationPage').default as React.ComponentType, [SCREENS.WORKSPACE.ACCOUNTING.XERO_TAXES]: () => require('../../../../pages/workspace/accounting/xero/XeroTaxesConfigurationPage').default as React.ComponentType, + [SCREENS.WORKSPACE.ACCOUNTING.XERO_EXPORT]: () => require('../../../../pages/workspace/accounting/xero/export/XeroExportConfigurationPage').default as React.ComponentType, [SCREENS.WORKSPACE.WORKFLOWS_AUTO_REPORTING_FREQUENCY]: () => require('../../../../pages/workspace/workflows/WorkspaceAutoReportingFrequencyPage').default as React.ComponentType, [SCREENS.WORKSPACE.WORKFLOWS_AUTO_REPORTING_MONTHLY_OFFSET]: () => require('../../../../pages/workspace/workflows/WorkspaceAutoReportingMonthlyOffsetPage').default as React.ComponentType, diff --git a/src/libs/Navigation/linkingConfig/FULL_SCREEN_TO_RHP_MAPPING.ts b/src/libs/Navigation/linkingConfig/FULL_SCREEN_TO_RHP_MAPPING.ts index d4501bd09044..d982bc3d97ed 100755 --- a/src/libs/Navigation/linkingConfig/FULL_SCREEN_TO_RHP_MAPPING.ts +++ b/src/libs/Navigation/linkingConfig/FULL_SCREEN_TO_RHP_MAPPING.ts @@ -44,6 +44,7 @@ const FULL_SCREEN_TO_RHP_MAPPING: Partial> = { SCREENS.WORKSPACE.ACCOUNTING.XERO_ORGANIZATION, SCREENS.WORKSPACE.ACCOUNTING.XERO_CUSTOMER, SCREENS.WORKSPACE.ACCOUNTING.XERO_TAXES, + SCREENS.WORKSPACE.ACCOUNTING.XERO_EXPORT, ], [SCREENS.WORKSPACE.TAXES]: [ SCREENS.WORKSPACE.TAXES_SETTINGS, diff --git a/src/libs/Navigation/linkingConfig/config.ts b/src/libs/Navigation/linkingConfig/config.ts index 7f9e7eba5003..92c5856d2b5f 100644 --- a/src/libs/Navigation/linkingConfig/config.ts +++ b/src/libs/Navigation/linkingConfig/config.ts @@ -331,6 +331,7 @@ const config: LinkingOptions['config'] = { [SCREENS.WORKSPACE.ACCOUNTING.XERO_ORGANIZATION]: {path: ROUTES.POLICY_ACCOUNTING_XERO_ORGANIZATION.route}, [SCREENS.WORKSPACE.ACCOUNTING.XERO_CUSTOMER]: {path: ROUTES.POLICY_ACCOUNTING_XERO_CUSTOMER.route}, [SCREENS.WORKSPACE.ACCOUNTING.XERO_TAXES]: {path: ROUTES.POLICY_ACCOUNTING_XERO_TAXES.route}, + [SCREENS.WORKSPACE.ACCOUNTING.XERO_EXPORT]: {path: ROUTES.POLICY_ACCOUNTING_XERO_EXPORT.route}, [SCREENS.WORKSPACE.DESCRIPTION]: { path: ROUTES.WORKSPACE_PROFILE_DESCRIPTION.route, }, diff --git a/src/libs/Navigation/types.ts b/src/libs/Navigation/types.ts index 522a8514587a..37d662683b53 100644 --- a/src/libs/Navigation/types.ts +++ b/src/libs/Navigation/types.ts @@ -324,6 +324,9 @@ type SettingsNavigatorParamList = { [SCREENS.WORKSPACE.ACCOUNTING.XERO_TAXES]: { policyID: string; }; + [SCREENS.WORKSPACE.ACCOUNTING.XERO_EXPORT]: { + policyID: string; + }; [SCREENS.GET_ASSISTANCE]: { backTo: Routes; }; From 284a5763b8459f20cbe3fbd66e81a59c78092982 Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Fri, 3 May 2024 10:13:51 +0530 Subject: [PATCH 04/29] navigate to export page --- src/pages/workspace/accounting/PolicyAccountingPage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/workspace/accounting/PolicyAccountingPage.tsx b/src/pages/workspace/accounting/PolicyAccountingPage.tsx index 6ebac5c3e3a4..042829610dcb 100644 --- a/src/pages/workspace/accounting/PolicyAccountingPage.tsx +++ b/src/pages/workspace/accounting/PolicyAccountingPage.tsx @@ -92,7 +92,7 @@ function accountingIntegrationData( /> ), onImportPagePress: () => Navigation.navigate(ROUTES.POLICY_ACCOUNTING_XERO_IMPORT.getRoute(policyID)), - onExportPagePress: () => {}, + onExportPagePress: () => Navigation.navigate(ROUTES.POLICY_ACCOUNTING_XERO_EXPORT.getRoute(policyID)), onAdvancedPagePress: () => {}, }; default: From d4305698b27d3a6361ef19d78a5da22bff9c1ee1 Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Fri, 3 May 2024 10:14:04 +0530 Subject: [PATCH 05/29] add default export page --- .../export/XeroExportConfigurationPage.tsx | 134 ++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 src/pages/workspace/accounting/xero/export/XeroExportConfigurationPage.tsx diff --git a/src/pages/workspace/accounting/xero/export/XeroExportConfigurationPage.tsx b/src/pages/workspace/accounting/xero/export/XeroExportConfigurationPage.tsx new file mode 100644 index 000000000000..f04b58a53da4 --- /dev/null +++ b/src/pages/workspace/accounting/xero/export/XeroExportConfigurationPage.tsx @@ -0,0 +1,134 @@ +import React from 'react'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import type {MenuItemProps} from '@components/MenuItem'; +import MenuItemWithTopDescription from '@components/MenuItemWithTopDescription'; +import OfflineWithFeedback from '@components/OfflineWithFeedback'; +import type {OfflineWithFeedbackProps} from '@components/OfflineWithFeedback'; +import ScreenWrapper from '@components/ScreenWrapper'; +import ScrollView from '@components/ScrollView'; +import Text from '@components/Text'; +import TextLink from '@components/TextLink'; +import useLocalize from '@hooks/useLocalize'; +import useThemeStyles from '@hooks/useThemeStyles'; +import Navigation from '@navigation/Navigation'; +import AccessOrNotFoundWrapper from '@pages/workspace/AccessOrNotFoundWrapper'; +import type {WithPolicyConnectionsProps} from '@pages/workspace/withPolicyConnections'; +import withPolicyConnections from '@pages/workspace/withPolicyConnections'; +import * as Link from '@userActions/Link'; +import CONST from '@src/CONST'; +import ROUTES from '@src/ROUTES'; + +type MenuItem = MenuItemProps & {pendingAction?: OfflineWithFeedbackProps['pendingAction']}; + +function XeroExportConfigurationPage({policy}: WithPolicyConnectionsProps) { + const {translate} = useLocalize(); + const styles = useThemeStyles(); + const policyID = policy?.id ?? ''; + const policyOwner = policy?.owner ?? ''; + const { + export: exportConfiguration, + exportDate, + reimbursableExpensesExportDestination, + receivableAccount, + nonReimbursableExpensesExportDestination, + errorFields, + pendingFields, + } = policy?.connections?.quickbooksOnline?.config ?? {}; + const menuItems: MenuItem[] = [ + { + description: translate('workspace.qbo.preferredExporter'), + onPress: () => Navigation.navigate(ROUTES.POLICY_ACCOUNTING_QUICKBOOKS_ONLINE_PREFERRED_EXPORTER.getRoute(policyID)), + brickRoadIndicator: errorFields?.exporter ? CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR : undefined, + title: exportConfiguration?.exporter ?? policyOwner, + pendingAction: pendingFields?.export, + error: errorFields?.exporter ? translate('common.genericErrorMessage') : undefined, + }, + { + description: translate('workspace.qbo.date'), + onPress: () => Navigation.navigate(ROUTES.POLICY_ACCOUNTING_QUICKBOOKS_ONLINE_EXPORT_DATE_SELECT.getRoute(policyID)), + brickRoadIndicator: errorFields?.exportDate ? CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR : undefined, + title: exportDate ? translate(`workspace.qbo.exportDate.values.${exportDate}.label`) : undefined, + pendingAction: pendingFields?.exportDate, + error: errorFields?.exportDate ? translate('common.genericErrorMessage') : undefined, + }, + { + description: translate('workspace.qbo.exportExpenses'), + onPress: () => Navigation.navigate(ROUTES.POLICY_ACCOUNTING_QUICKBOOKS_ONLINE_EXPORT_OUT_OF_POCKET_EXPENSES.getRoute(policyID)), + brickRoadIndicator: Boolean(errorFields?.exportEntity) || Boolean(errorFields?.reimbursableExpensesAccount) ? CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR : undefined, + title: reimbursableExpensesExportDestination ? translate(`workspace.qbo.accounts.${reimbursableExpensesExportDestination}`) : undefined, + // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing + pendingAction: pendingFields?.reimbursableExpensesExportDestination || pendingFields?.reimbursableExpensesAccount, + }, + { + description: translate('workspace.qbo.exportInvoices'), + onPress: () => Navigation.navigate(ROUTES.POLICY_ACCOUNTING_QUICKBOOKS_ONLINE_INVOICE_ACCOUNT_SELECT.getRoute(policyID)), + brickRoadIndicator: errorFields?.receivableAccount ? CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR : undefined, + title: receivableAccount?.name, + pendingAction: pendingFields?.receivableAccount, + error: errorFields?.receivableAccount ? translate('common.genericErrorMessage') : undefined, + }, + { + description: translate('workspace.qbo.exportCompany'), + onPress: () => Navigation.navigate(ROUTES.POLICY_ACCOUNTING_QUICKBOOKS_ONLINE_COMPANY_CARD_EXPENSE_ACCOUNT.getRoute(policyID)), + brickRoadIndicator: errorFields?.exportCompanyCard ? CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR : undefined, + title: nonReimbursableExpensesExportDestination ? translate(`workspace.qbo.accounts.${nonReimbursableExpensesExportDestination}`) : undefined, + pendingAction: pendingFields?.nonReimbursableExpensesExportDestination, + error: errorFields?.nonReimbursableExpensesExportDestination ? translate('common.genericErrorMessage') : undefined, + }, + { + description: translate('workspace.qbo.exportExpensifyCard'), + title: translate('workspace.qbo.accounts.credit_card'), + shouldShowRightIcon: false, + interactive: false, + }, + ]; + + return ( + + + + + {translate('workspace.qbo.exportDescription')} + {menuItems.map((menuItem) => ( + + + + ))} + + {`${translate('workspace.qbo.deepDiveExpensifyCard')} `} + Link.openExternalLink(CONST.DEEP_DIVE_EXPENSIFY_CARD)} + style={[styles.mutedNormalTextLabel, styles.link]} + > + {translate('workspace.qbo.deepDiveExpensifyCardIntegration')} + + + + + + ); +} + +XeroExportConfigurationPage.displayName = 'XeroExportConfigurationPage'; + +export default withPolicyConnections(XeroExportConfigurationPage); From 460effc410a65f565112269c2f8767c534bf6dac Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Fri, 3 May 2024 11:50:46 +0530 Subject: [PATCH 06/29] add helper text to menu item --- src/components/MenuItem.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/components/MenuItem.tsx b/src/components/MenuItem.tsx index bf35d65340fc..1f0093c3c72b 100644 --- a/src/components/MenuItem.tsx +++ b/src/components/MenuItem.tsx @@ -141,6 +141,11 @@ type MenuItemBaseProps = { /** A description text to show under the title */ description?: string; + /** Text to show below menu item. This text is not interactive */ + helperText?: string; + + helperTextStyle?: StyleProp; + /** Should the description be shown above the title (instead of the other way around) */ shouldShowDescriptionOnTop?: boolean; @@ -296,6 +301,8 @@ function MenuItem( furtherDetailsIcon, furtherDetails, description, + helperText, + helperTextStyle, error, errorText, success = false, @@ -679,6 +686,7 @@ function MenuItem( )} + {!!helperText && {helperText}} ); } From 7b85464c266f7a20e82943fef0341cec347f61fe Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Fri, 3 May 2024 11:50:56 +0530 Subject: [PATCH 07/29] add lang --- src/languages/en.ts | 16 ++++++++++++++++ src/languages/es.ts | 16 ++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/src/languages/en.ts b/src/languages/en.ts index 625a6fa090f1..488507b6dbd2 100755 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -2000,6 +2000,22 @@ export default { customersDescription: 'Import customer contacts. Billable expenses need tags for export. Expenses will carry the customer information to Xero for sales invoices.', taxesDescription: 'Choose whether to import tax rates and tax defaults from your accounting integration.', notImported: 'Not imported', + export: 'Export', + exportDescription: 'Configure how data in Expensify gets exported to Xero.', + exportCompanyCard: 'Export company card expenses as', + purchaseBill: 'Purchase Bill', + exportDeepDiveCompanyCard: + 'Each exported expense posts as a bank transaction to the Xero bank account you select below, and transaction dates will match the dates on your bank statement.', + bankTransactions: 'Bank transactions', + xeroBankAccount: 'Xero Bank Account', + preferredExporter: 'Preferred exporter', + exportExpenses: 'Export out-of-pocket expenses as', + exportExpensesDescription: + 'Reports will export as a Purchase Bill awaiting payment, posting on the last day of the month in which expenses were incurred. This is the only export option with Xero.', + purchaseBillDate: 'Purchase Bill Date', + exportInvoices: 'Export invoices as', + salesInvoice: 'Sales invoice', + exportInvoicesDescription: 'Sales invoices always display the date on which the invoice was sent.', }, type: { free: 'Free', diff --git a/src/languages/es.ts b/src/languages/es.ts index b82ee4dd69ea..3bb74b80caa2 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -2033,6 +2033,22 @@ export default { 'Importar contactos de clientes. Los gastos facturables necesitan etiquetas para la exportación. Los gastos llevarán la información del cliente a Xero para las facturas de ventas.', taxesDescription: 'Elige si quires importar las tasas de impuestos y los impuestos por defecto de tu integración de contaduría.', notImported: 'No importado', + export: 'Exportar', + exportDescription: 'Configura cómo se exportan los datos de Expensify a Xero.', + exportCompanyCard: 'Export company card expenses as', + purchaseBill: 'Purchase Bill', + exportDeepDiveCompanyCard: + 'Each exported expense posts as a bank transaction to the Xero bank account you select below, and transaction dates will match the dates on your bank statement.', + bankTransactions: 'Bank transactions', + xeroBankAccount: 'Xero días laborales', + preferredExporter: 'Exportador preferido', + exportExpenses: 'Exportar gastos de bolsillo como', + exportExpensesDescription: + 'Reports will export as a Purchase Bill awaiting payment, posting on the last day of the month in which expenses were incurred. This is the only export option with Xero.', + purchaseBillDate: 'Purchase Bill Date', + exportInvoices: 'Exportar facturas como', + salesInvoice: 'Sales invoice', + exportInvoicesDescription: 'Sales invoices always display the date on which the invoice was sent.', }, type: { free: 'Gratis', From 70c405d1b5514b618d94f101c15dade17f6ceef8 Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Fri, 3 May 2024 11:51:19 +0530 Subject: [PATCH 08/29] add default export page --- .../export/XeroExportConfigurationPage.tsx | 89 +++++++------------ 1 file changed, 33 insertions(+), 56 deletions(-) diff --git a/src/pages/workspace/accounting/xero/export/XeroExportConfigurationPage.tsx b/src/pages/workspace/accounting/xero/export/XeroExportConfigurationPage.tsx index f04b58a53da4..688eb693906f 100644 --- a/src/pages/workspace/accounting/xero/export/XeroExportConfigurationPage.tsx +++ b/src/pages/workspace/accounting/xero/export/XeroExportConfigurationPage.tsx @@ -7,16 +7,12 @@ import type {OfflineWithFeedbackProps} from '@components/OfflineWithFeedback'; import ScreenWrapper from '@components/ScreenWrapper'; import ScrollView from '@components/ScrollView'; import Text from '@components/Text'; -import TextLink from '@components/TextLink'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; -import Navigation from '@navigation/Navigation'; import AccessOrNotFoundWrapper from '@pages/workspace/AccessOrNotFoundWrapper'; import type {WithPolicyConnectionsProps} from '@pages/workspace/withPolicyConnections'; import withPolicyConnections from '@pages/workspace/withPolicyConnections'; -import * as Link from '@userActions/Link'; import CONST from '@src/CONST'; -import ROUTES from '@src/ROUTES'; type MenuItem = MenuItemProps & {pendingAction?: OfflineWithFeedbackProps['pendingAction']}; @@ -25,61 +21,52 @@ function XeroExportConfigurationPage({policy}: WithPolicyConnectionsProps) { const styles = useThemeStyles(); const policyID = policy?.id ?? ''; const policyOwner = policy?.owner ?? ''; - const { - export: exportConfiguration, - exportDate, - reimbursableExpensesExportDestination, - receivableAccount, - nonReimbursableExpensesExportDestination, - errorFields, - pendingFields, - } = policy?.connections?.quickbooksOnline?.config ?? {}; + const {export: exportConfiguration, errorFields, pendingFields} = policy?.connections?.xero?.config ?? {}; const menuItems: MenuItem[] = [ { - description: translate('workspace.qbo.preferredExporter'), - onPress: () => Navigation.navigate(ROUTES.POLICY_ACCOUNTING_QUICKBOOKS_ONLINE_PREFERRED_EXPORTER.getRoute(policyID)), + description: translate('workspace.xero.preferredExporter'), + onPress: () => {}, brickRoadIndicator: errorFields?.exporter ? CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR : undefined, title: exportConfiguration?.exporter ?? policyOwner, pendingAction: pendingFields?.export, error: errorFields?.exporter ? translate('common.genericErrorMessage') : undefined, }, { - description: translate('workspace.qbo.date'), - onPress: () => Navigation.navigate(ROUTES.POLICY_ACCOUNTING_QUICKBOOKS_ONLINE_EXPORT_DATE_SELECT.getRoute(policyID)), - brickRoadIndicator: errorFields?.exportDate ? CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR : undefined, - title: exportDate ? translate(`workspace.qbo.exportDate.values.${exportDate}.label`) : undefined, - pendingAction: pendingFields?.exportDate, - error: errorFields?.exportDate ? translate('common.genericErrorMessage') : undefined, - }, - { - description: translate('workspace.qbo.exportExpenses'), - onPress: () => Navigation.navigate(ROUTES.POLICY_ACCOUNTING_QUICKBOOKS_ONLINE_EXPORT_OUT_OF_POCKET_EXPENSES.getRoute(policyID)), - brickRoadIndicator: Boolean(errorFields?.exportEntity) || Boolean(errorFields?.reimbursableExpensesAccount) ? CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR : undefined, - title: reimbursableExpensesExportDestination ? translate(`workspace.qbo.accounts.${reimbursableExpensesExportDestination}`) : undefined, - // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing - pendingAction: pendingFields?.reimbursableExpensesExportDestination || pendingFields?.reimbursableExpensesAccount, + description: translate('workspace.xero.exportExpenses'), + title: translate('workspace.xero.purchaseBill'), + interactive: false, + shouldShowRightIcon: false, + helperText: translate('workspace.xero.exportExpensesDescription'), }, { - description: translate('workspace.qbo.exportInvoices'), - onPress: () => Navigation.navigate(ROUTES.POLICY_ACCOUNTING_QUICKBOOKS_ONLINE_INVOICE_ACCOUNT_SELECT.getRoute(policyID)), - brickRoadIndicator: errorFields?.receivableAccount ? CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR : undefined, - title: receivableAccount?.name, - pendingAction: pendingFields?.receivableAccount, - error: errorFields?.receivableAccount ? translate('common.genericErrorMessage') : undefined, + description: translate('workspace.xero.purchaseBillDate'), + onPress: () => {}, + brickRoadIndicator: errorFields?.billDate ? CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR : undefined, + title: exportConfiguration?.billDate, + pendingAction: pendingFields?.export, + error: errorFields?.billDate ? translate('common.genericErrorMessage') : undefined, }, { - description: translate('workspace.qbo.exportCompany'), - onPress: () => Navigation.navigate(ROUTES.POLICY_ACCOUNTING_QUICKBOOKS_ONLINE_COMPANY_CARD_EXPENSE_ACCOUNT.getRoute(policyID)), - brickRoadIndicator: errorFields?.exportCompanyCard ? CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR : undefined, - title: nonReimbursableExpensesExportDestination ? translate(`workspace.qbo.accounts.${nonReimbursableExpensesExportDestination}`) : undefined, - pendingAction: pendingFields?.nonReimbursableExpensesExportDestination, - error: errorFields?.nonReimbursableExpensesExportDestination ? translate('common.genericErrorMessage') : undefined, + description: translate('workspace.xero.exportInvoices'), + title: translate('workspace.xero.salesInvoice'), + interactive: false, + shouldShowRightIcon: false, + helperText: translate('workspace.xero.exportInvoicesDescription'), }, { - description: translate('workspace.qbo.exportExpensifyCard'), - title: translate('workspace.qbo.accounts.credit_card'), + description: translate('workspace.xero.exportCompanyCard'), + title: translate('workspace.xero.bankTransactions'), shouldShowRightIcon: false, interactive: false, + helperText: translate('workspace.xero.exportDeepDiveCompanyCard'), + }, + { + description: translate('workspace.xero.xeroBankAccount'), + onPress: () => {}, + brickRoadIndicator: errorFields?.nonReimbursableAccount ? CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR : undefined, + title: undefined, + pendingAction: pendingFields?.export, + error: undefined, }, ]; @@ -93,9 +80,9 @@ function XeroExportConfigurationPage({policy}: WithPolicyConnectionsProps) { includeSafeAreaPaddingBottom={false} testID={XeroExportConfigurationPage.displayName} > - + - {translate('workspace.qbo.exportDescription')} + {translate('workspace.xero.exportDescription')} {menuItems.map((menuItem) => ( ))} - - {`${translate('workspace.qbo.deepDiveExpensifyCard')} `} - Link.openExternalLink(CONST.DEEP_DIVE_EXPENSIFY_CARD)} - style={[styles.mutedNormalTextLabel, styles.link]} - > - {translate('workspace.qbo.deepDiveExpensifyCardIntegration')} - - From 2ef017b1c7d2ef0f8f0304323c71e55986b75bf1 Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Fri, 3 May 2024 11:51:31 +0530 Subject: [PATCH 09/29] link to export page --- .../accounting/xero/import/XeroCustomerConfigurationPage.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pages/workspace/accounting/xero/import/XeroCustomerConfigurationPage.tsx b/src/pages/workspace/accounting/xero/import/XeroCustomerConfigurationPage.tsx index 45d0a2a4ad1e..62d33294c888 100644 --- a/src/pages/workspace/accounting/xero/import/XeroCustomerConfigurationPage.tsx +++ b/src/pages/workspace/accounting/xero/import/XeroCustomerConfigurationPage.tsx @@ -29,6 +29,7 @@ function XeroCustomerConfigurationPage({policy}: WithPolicyProps) { accessVariants={[CONST.POLICY.ACCESS_VARIANTS.ADMIN]} policyID={policyID} featureName={CONST.POLICY.MORE_FEATURES.ARE_CONNECTIONS_ENABLED} + contentContainerStyle={styles.ph5} > From 6fc8538e5f44aa88607abd72b8f13ac43f3f4a13 Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Fri, 3 May 2024 12:06:52 +0530 Subject: [PATCH 10/29] fix type --- .../accounting/xero/import/XeroCustomerConfigurationPage.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/workspace/accounting/xero/import/XeroCustomerConfigurationPage.tsx b/src/pages/workspace/accounting/xero/import/XeroCustomerConfigurationPage.tsx index 62d33294c888..45d0a2a4ad1e 100644 --- a/src/pages/workspace/accounting/xero/import/XeroCustomerConfigurationPage.tsx +++ b/src/pages/workspace/accounting/xero/import/XeroCustomerConfigurationPage.tsx @@ -29,7 +29,6 @@ function XeroCustomerConfigurationPage({policy}: WithPolicyProps) { accessVariants={[CONST.POLICY.ACCESS_VARIANTS.ADMIN]} policyID={policyID} featureName={CONST.POLICY.MORE_FEATURES.ARE_CONNECTIONS_ENABLED} - contentContainerStyle={styles.ph5} > From 6633fd824b2894ee1d793ee5083f7e410c9425d5 Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Fri, 3 May 2024 12:08:48 +0530 Subject: [PATCH 11/29] add comment --- src/components/MenuItem.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/MenuItem.tsx b/src/components/MenuItem.tsx index 1f0093c3c72b..42de7e2fb7f4 100644 --- a/src/components/MenuItem.tsx +++ b/src/components/MenuItem.tsx @@ -144,6 +144,7 @@ type MenuItemBaseProps = { /** Text to show below menu item. This text is not interactive */ helperText?: string; + /** Any additional styles to pass to helper text. */ helperTextStyle?: StyleProp; /** Should the description be shown above the title (instead of the other way around) */ From 7925d957d9d6bfbd3d9144d6b4ecdf22ec9f07a8 Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Fri, 3 May 2024 16:18:54 +0530 Subject: [PATCH 12/29] use conenction layput --- ios/NewExpensify.xcodeproj/project.pbxproj | 36 ++--------- src/components/ConnectionLayout.tsx | 42 ++++++++++--- src/libs/Permissions.ts | 2 +- .../xero/advanced/XeroAdvancedPage.tsx | 1 + .../export/XeroExportConfigurationPage.tsx | 60 ++++++++----------- .../import/XeroCustomerConfigurationPage.tsx | 1 + 6 files changed, 68 insertions(+), 74 deletions(-) diff --git a/ios/NewExpensify.xcodeproj/project.pbxproj b/ios/NewExpensify.xcodeproj/project.pbxproj index 9a9ca9c7dcbb..a3e667397bf0 100644 --- a/ios/NewExpensify.xcodeproj/project.pbxproj +++ b/ios/NewExpensify.xcodeproj/project.pbxproj @@ -1555,11 +1555,7 @@ "$(inherited)", "-DRN_FABRIC_ENABLED", ); - OTHER_LDFLAGS = ( - "$(inherited)", - "-Wl", - "-ld_classic", - ); + OTHER_LDFLAGS = "$(inherited)"; PRODUCT_BUNDLE_IDENTIFIER = ""; REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; SDKROOT = iphoneos; @@ -1627,11 +1623,7 @@ "$(inherited)", "-DRN_FABRIC_ENABLED", ); - OTHER_LDFLAGS = ( - "$(inherited)", - "-Wl", - "-ld_classic", - ); + OTHER_LDFLAGS = "$(inherited)"; PRODUCT_BUNDLE_IDENTIFIER = ""; PRODUCT_NAME = ""; REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; @@ -1709,11 +1701,7 @@ "$(inherited)", "-DRN_FABRIC_ENABLED", ); - OTHER_LDFLAGS = ( - "$(inherited)", - "-Wl", - "-ld_classic", - ); + OTHER_LDFLAGS = "$(inherited)"; PRODUCT_BUNDLE_IDENTIFIER = ""; REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; SDKROOT = iphoneos; @@ -1858,11 +1846,7 @@ "$(inherited)", "-DRN_FABRIC_ENABLED", ); - OTHER_LDFLAGS = ( - "$(inherited)", - "-Wl", - "-ld_classic", - ); + OTHER_LDFLAGS = "$(inherited)"; PRODUCT_BUNDLE_IDENTIFIER = ""; REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; SDKROOT = iphoneos; @@ -1999,11 +1983,7 @@ "$(inherited)", "-DRN_FABRIC_ENABLED", ); - OTHER_LDFLAGS = ( - "$(inherited)", - "-Wl", - "-ld_classic", - ); + OTHER_LDFLAGS = "$(inherited)"; PRODUCT_BUNDLE_IDENTIFIER = ""; PRODUCT_NAME = ""; REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; @@ -2138,11 +2118,7 @@ "$(inherited)", "-DRN_FABRIC_ENABLED", ); - OTHER_LDFLAGS = ( - "$(inherited)", - "-Wl", - "-ld_classic", - ); + OTHER_LDFLAGS = "$(inherited)"; PRODUCT_BUNDLE_IDENTIFIER = ""; PRODUCT_NAME = ""; REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; diff --git a/src/components/ConnectionLayout.tsx b/src/components/ConnectionLayout.tsx index 3aaf84121fe7..b3f76aa21d47 100644 --- a/src/components/ConnectionLayout.tsx +++ b/src/components/ConnectionLayout.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import {View} from 'react-native'; +import type {StyleProp, TextStyle, ViewStyle} from 'react-native'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; @@ -15,23 +15,51 @@ import Text from './Text'; type ConnectionLayoutProps = { /** Used to set the testID for tests */ displayName: string; + /** Header title for the connection */ headerTitle: TranslationPaths; + /** React nodes that will be shown */ children?: React.ReactNode; + /** Title of the connection component */ title?: TranslationPaths; + /** Subtitle of the connection */ subtitle?: TranslationPaths; + /** The current policyID */ policyID: string; + /** Defines which types of access should be verified */ accessVariants?: PolicyAccessVariant[]; + /** The current feature name that the user tries to get access to */ featureName?: PolicyFeatureName; + + /** The content container style of Scrollview */ + contentContainerStyle?: StyleProp | undefined; + + /** Style of the title text */ + titleStyle?: StyleProp | undefined; + + /** Style of the subtitle text */ + subTitleStyle?: StyleProp | undefined; }; -function ConnectionLayout({displayName, headerTitle, children, title, subtitle, policyID, accessVariants, featureName}: ConnectionLayoutProps) { +function ConnectionLayout({ + displayName, + headerTitle, + children, + title, + subtitle, + policyID, + accessVariants, + featureName, + contentContainerStyle, + titleStyle, + subTitleStyle, +}: ConnectionLayoutProps) { const styles = useThemeStyles(); const {translate} = useLocalize(); @@ -50,13 +78,9 @@ function ConnectionLayout({displayName, headerTitle, children, title, subtitle, title={translate(headerTitle)} onBackButtonPress={() => Navigation.goBack()} /> - - {title && ( - - {translate(title)} - - )} - {subtitle && {translate(subtitle)}} + + {title && {translate(title)}} + {subtitle && {translate(subtitle)}} {children} diff --git a/src/libs/Permissions.ts b/src/libs/Permissions.ts index 79955c0fdf30..1675a230a1c3 100644 --- a/src/libs/Permissions.ts +++ b/src/libs/Permissions.ts @@ -4,7 +4,7 @@ import type {IOUType} from '@src/CONST'; import type Beta from '@src/types/onyx/Beta'; function canUseAllBetas(betas: OnyxEntry): boolean { - return !!betas?.includes(CONST.BETAS.ALL); + return true; } function canUseChronos(betas: OnyxEntry): boolean { diff --git a/src/pages/workspace/accounting/xero/advanced/XeroAdvancedPage.tsx b/src/pages/workspace/accounting/xero/advanced/XeroAdvancedPage.tsx index f781769adabf..87892ce60cef 100644 --- a/src/pages/workspace/accounting/xero/advanced/XeroAdvancedPage.tsx +++ b/src/pages/workspace/accounting/xero/advanced/XeroAdvancedPage.tsx @@ -28,6 +28,7 @@ function XeroAdvancedPage({policy}: WithPolicyConnectionsProps) { accessVariants={[CONST.POLICY.ACCESS_VARIANTS.ADMIN, CONST.POLICY.ACCESS_VARIANTS.PAID]} policyID={policyID} featureName={CONST.POLICY.MORE_FEATURES.ARE_CONNECTIONS_ENABLED} + contentContainerStyle={[styles.pb2, styles.ph5]} > - - - - {translate('workspace.xero.exportDescription')} - {menuItems.map((menuItem) => ( - - - - ))} - - - + {menuItems.map((menuItem) => ( + + + + ))} + ); } diff --git a/src/pages/workspace/accounting/xero/import/XeroCustomerConfigurationPage.tsx b/src/pages/workspace/accounting/xero/import/XeroCustomerConfigurationPage.tsx index 45d0a2a4ad1e..1d1cf11f9791 100644 --- a/src/pages/workspace/accounting/xero/import/XeroCustomerConfigurationPage.tsx +++ b/src/pages/workspace/accounting/xero/import/XeroCustomerConfigurationPage.tsx @@ -29,6 +29,7 @@ function XeroCustomerConfigurationPage({policy}: WithPolicyProps) { accessVariants={[CONST.POLICY.ACCESS_VARIANTS.ADMIN]} policyID={policyID} featureName={CONST.POLICY.MORE_FEATURES.ARE_CONNECTIONS_ENABLED} + contentContainerStyle={[[styles.pb2, styles.ph5]]} > From 1bd9350c3f93fb5fa91475f908815d157c62f616 Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Fri, 3 May 2024 18:30:25 +0530 Subject: [PATCH 13/29] move set status to exports page --- src/languages/en.ts | 11 +++++------ src/languages/es.ts | 9 ++++----- .../accounting/xero/advanced/XeroAdvancedPage.tsx | 10 ---------- .../xero/export/XeroExportConfigurationPage.tsx | 9 ++++++++- 4 files changed, 17 insertions(+), 22 deletions(-) diff --git a/src/languages/en.ts b/src/languages/en.ts index aec8c79abad0..c616c0d8d64c 100755 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -2004,16 +2004,15 @@ export default { export: 'Export', exportDescription: 'Configure how data in Expensify gets exported to Xero.', exportCompanyCard: 'Export company card expenses as', - purchaseBill: 'Purchase Bill', + purchaseBill: 'Purchase bill', exportDeepDiveCompanyCard: 'Each exported expense posts as a bank transaction to the Xero bank account you select below, and transaction dates will match the dates on your bank statement.', bankTransactions: 'Bank transactions', - xeroBankAccount: 'Xero Bank Account', + xeroBankAccount: 'Xero bank account', preferredExporter: 'Preferred exporter', exportExpenses: 'Export out-of-pocket expenses as', - exportExpensesDescription: - 'Reports will export as a Purchase Bill awaiting payment, posting on the last day of the month in which expenses were incurred. This is the only export option with Xero.', - purchaseBillDate: 'Purchase Bill Date', + exportExpensesDescription: 'Reports will export as a purchase bill using the date and with the status you select below.', + purchaseBillDate: 'Purchase bill date', exportInvoices: 'Export invoices as', salesInvoice: 'Sales invoice', exportInvoicesDescription: 'Sales invoices always display the date on which the invoice was sent.', @@ -2021,7 +2020,7 @@ export default { advanced: 'Advanced', autoSync: 'Auto-Sync', autoSyncDescription: 'Sync Xero and Expensify automatically every day.', - purchaseBillStatusTitle: 'Set purchase bill status (optional)', + purchaseBillStatusTitle: 'Purchase bill status', reimbursedReports: 'Sync reimbursed reports', reimbursedReportsDescription: 'Any time a report is paid using Expensify ACH, the corresponding bill payment will be created in the Xero account below.', xeroBillPaymentAccount: 'Xero Bill Payment Account', diff --git a/src/languages/es.ts b/src/languages/es.ts index 7a66adc5e947..bc8ddb419158 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -2037,16 +2037,15 @@ export default { export: 'Exportar', exportDescription: 'Configura cómo se exportan los datos de Expensify a Xero.', exportCompanyCard: 'Export company card expenses as', - purchaseBill: 'Purchase Bill', + purchaseBill: 'Purchase bill', exportDeepDiveCompanyCard: 'Each exported expense posts as a bank transaction to the Xero bank account you select below, and transaction dates will match the dates on your bank statement.', bankTransactions: 'Bank transactions', xeroBankAccount: 'Xero días laborales', preferredExporter: 'Exportador preferido', exportExpenses: 'Exportar gastos de bolsillo como', - exportExpensesDescription: - 'Reports will export as a Purchase Bill awaiting payment, posting on the last day of the month in which expenses were incurred. This is the only export option with Xero.', - purchaseBillDate: 'Purchase Bill Date', + exportExpensesDescription: 'Reports will export as a purchase bill using the date and with the status you select below.', + purchaseBillDate: 'Purchase bill date', exportInvoices: 'Exportar facturas como', salesInvoice: 'Sales invoice', exportInvoicesDescription: 'Sales invoices always display the date on which the invoice was sent.', @@ -2054,7 +2053,7 @@ export default { advanced: 'Avanzado', autoSync: 'Autosincronización', autoSyncDescription: 'Sincroniza Xero y Expensify automáticamente todos los días.', - purchaseBillStatusTitle: 'Set purchase bill status (optional)', + purchaseBillStatusTitle: 'Purchase bill status', reimbursedReports: 'Sincronizar informes reembolsados', reimbursedReportsDescription: 'Cada vez que se pague un informe utilizando Expensify ACH, se creará el correspondiente pago de la factura en la cuenta de Xero indicadas a continuación.', diff --git a/src/pages/workspace/accounting/xero/advanced/XeroAdvancedPage.tsx b/src/pages/workspace/accounting/xero/advanced/XeroAdvancedPage.tsx index 87892ce60cef..231e9c3ec54a 100644 --- a/src/pages/workspace/accounting/xero/advanced/XeroAdvancedPage.tsx +++ b/src/pages/workspace/accounting/xero/advanced/XeroAdvancedPage.tsx @@ -46,16 +46,6 @@ function XeroAdvancedPage({policy}: WithPolicyConnectionsProps) { errors={ErrorUtils.getLatestErrorField(xeroConfig ?? {}, CONST.XERO_CONFIG.AUTO_SYNC)} onCloseError={() => Policy.clearXeroErrorField(policyID, CONST.XERO_CONFIG.AUTO_SYNC)} /> - - {}} - /> - {}, brickRoadIndicator: errorFields?.billDate ? CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR : undefined, title: exportConfiguration?.billDate, pendingAction: pendingFields?.export, error: errorFields?.billDate ? translate('common.genericErrorMessage') : undefined, }, + { + description: translate('workspace.xero.advancedConfig.purchaseBillStatusTitle'), + onPress: () => {}, + title: exportConfiguration?.billStatus.purchase, + pendingAction: pendingFields?.export, + error: errorFields?.purchase ? translate('common.genericErrorMessage') : undefined, + }, { description: translate('workspace.xero.exportInvoices'), title: translate('workspace.xero.salesInvoice'), From a28cc87a9c5b83215bd5d95625e987d3692025a9 Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Fri, 3 May 2024 18:37:02 +0530 Subject: [PATCH 14/29] revert proj changes --- ios/NewExpensify.xcodeproj/project.pbxproj | 38 ++++++++++++++++++---- 1 file changed, 31 insertions(+), 7 deletions(-) diff --git a/ios/NewExpensify.xcodeproj/project.pbxproj b/ios/NewExpensify.xcodeproj/project.pbxproj index a3e667397bf0..d4eb9ef3b0ff 100644 --- a/ios/NewExpensify.xcodeproj/project.pbxproj +++ b/ios/NewExpensify.xcodeproj/project.pbxproj @@ -1555,7 +1555,11 @@ "$(inherited)", "-DRN_FABRIC_ENABLED", ); - OTHER_LDFLAGS = "$(inherited)"; + OTHER_LDFLAGS = ( + "$(inherited)", + "-Wl", + "-ld_classic", + ); PRODUCT_BUNDLE_IDENTIFIER = ""; REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; SDKROOT = iphoneos; @@ -1623,7 +1627,11 @@ "$(inherited)", "-DRN_FABRIC_ENABLED", ); - OTHER_LDFLAGS = "$(inherited)"; + OTHER_LDFLAGS = ( + "$(inherited)", + "-Wl", + "-ld_classic", + ); PRODUCT_BUNDLE_IDENTIFIER = ""; PRODUCT_NAME = ""; REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; @@ -1701,7 +1709,11 @@ "$(inherited)", "-DRN_FABRIC_ENABLED", ); - OTHER_LDFLAGS = "$(inherited)"; + OTHER_LDFLAGS = ( + "$(inherited)", + "-Wl", + "-ld_classic", + ); PRODUCT_BUNDLE_IDENTIFIER = ""; REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; SDKROOT = iphoneos; @@ -1846,7 +1858,11 @@ "$(inherited)", "-DRN_FABRIC_ENABLED", ); - OTHER_LDFLAGS = "$(inherited)"; + OTHER_LDFLAGS = ( + "$(inherited)", + "-Wl", + "-ld_classic", + ); PRODUCT_BUNDLE_IDENTIFIER = ""; REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; SDKROOT = iphoneos; @@ -1983,7 +1999,11 @@ "$(inherited)", "-DRN_FABRIC_ENABLED", ); - OTHER_LDFLAGS = "$(inherited)"; + OTHER_LDFLAGS = ( + "$(inherited)", + "-Wl", + "-ld_classic", + ); PRODUCT_BUNDLE_IDENTIFIER = ""; PRODUCT_NAME = ""; REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; @@ -2118,7 +2138,11 @@ "$(inherited)", "-DRN_FABRIC_ENABLED", ); - OTHER_LDFLAGS = "$(inherited)"; + OTHER_LDFLAGS = ( + "$(inherited)", + "-Wl", + "-ld_classic", + ); PRODUCT_BUNDLE_IDENTIFIER = ""; PRODUCT_NAME = ""; REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; @@ -2251,4 +2275,4 @@ /* End XCConfigurationList section */ }; rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; -} +} \ No newline at end of file From ee8c920f7314cfcf60b4f4e5759788f0fba6bdb7 Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Fri, 3 May 2024 18:37:25 +0530 Subject: [PATCH 15/29] revert proj changes --- ios/NewExpensify.xcodeproj/project.pbxproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/NewExpensify.xcodeproj/project.pbxproj b/ios/NewExpensify.xcodeproj/project.pbxproj index d4eb9ef3b0ff..9a9ca9c7dcbb 100644 --- a/ios/NewExpensify.xcodeproj/project.pbxproj +++ b/ios/NewExpensify.xcodeproj/project.pbxproj @@ -2275,4 +2275,4 @@ /* End XCConfigurationList section */ }; rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; -} \ No newline at end of file +} From 783ff95658f8177645733176dab5917a53e03e07 Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Fri, 3 May 2024 18:53:33 +0530 Subject: [PATCH 16/29] revert --- src/libs/Permissions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/Permissions.ts b/src/libs/Permissions.ts index 1675a230a1c3..79955c0fdf30 100644 --- a/src/libs/Permissions.ts +++ b/src/libs/Permissions.ts @@ -4,7 +4,7 @@ import type {IOUType} from '@src/CONST'; import type Beta from '@src/types/onyx/Beta'; function canUseAllBetas(betas: OnyxEntry): boolean { - return true; + return !!betas?.includes(CONST.BETAS.ALL); } function canUseChronos(betas: OnyxEntry): boolean { From db5ca03df014b73f851b22c208c8668477fd90fd Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Sat, 4 May 2024 23:15:04 +0300 Subject: [PATCH 17/29] Update en.ts --- src/languages/en.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/languages/en.ts b/src/languages/en.ts index c616c0d8d64c..ea8b05d8cd49 100755 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -2011,7 +2011,7 @@ export default { xeroBankAccount: 'Xero bank account', preferredExporter: 'Preferred exporter', exportExpenses: 'Export out-of-pocket expenses as', - exportExpensesDescription: 'Reports will export as a purchase bill using the date and with the status you select below.', + exportExpensesDescription: 'Reports will export as a purchase bill, using the date and status you select below.', purchaseBillDate: 'Purchase bill date', exportInvoices: 'Export invoices as', salesInvoice: 'Sales invoice', From 03fbbbe6ee704329c33900bffed7edcd5c4650db Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Mon, 6 May 2024 15:07:13 +0300 Subject: [PATCH 18/29] Update src/languages/es.ts Co-authored-by: Rocio Perez-Cano --- src/languages/es.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/languages/es.ts b/src/languages/es.ts index bc8ddb419158..3f5b38e90d7c 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -2036,7 +2036,7 @@ export default { notImported: 'No importado', export: 'Exportar', exportDescription: 'Configura cómo se exportan los datos de Expensify a Xero.', - exportCompanyCard: 'Export company card expenses as', + exportCompanyCard: 'Exportar gastos de la tarjeta de empresa como', purchaseBill: 'Purchase bill', exportDeepDiveCompanyCard: 'Each exported expense posts as a bank transaction to the Xero bank account you select below, and transaction dates will match the dates on your bank statement.', From b7953fd2824c03f05ad2c69be28a883adb8a5ae9 Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Mon, 6 May 2024 15:07:26 +0300 Subject: [PATCH 19/29] Update src/languages/es.ts Co-authored-by: Rocio Perez-Cano --- src/languages/es.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/languages/es.ts b/src/languages/es.ts index 3f5b38e90d7c..31fe1e354365 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -2039,7 +2039,7 @@ export default { exportCompanyCard: 'Exportar gastos de la tarjeta de empresa como', purchaseBill: 'Purchase bill', exportDeepDiveCompanyCard: - 'Each exported expense posts as a bank transaction to the Xero bank account you select below, and transaction dates will match the dates on your bank statement.', + 'Cada gasto exportado se contabiliza como una transacción bancaria en la cuenta bancaria de Xero que selecciones a continuación. Las fechas de las transacciones coincidirán con las fechas de el extracto bancario.', bankTransactions: 'Bank transactions', xeroBankAccount: 'Xero días laborales', preferredExporter: 'Exportador preferido', From e4cf440a2e52317247d2641eace35f5e3cfa1686 Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Mon, 6 May 2024 15:07:32 +0300 Subject: [PATCH 20/29] Update src/languages/es.ts Co-authored-by: Rocio Perez-Cano --- src/languages/es.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/languages/es.ts b/src/languages/es.ts index 31fe1e354365..2b7fbd164c8d 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -2040,7 +2040,7 @@ export default { purchaseBill: 'Purchase bill', exportDeepDiveCompanyCard: 'Cada gasto exportado se contabiliza como una transacción bancaria en la cuenta bancaria de Xero que selecciones a continuación. Las fechas de las transacciones coincidirán con las fechas de el extracto bancario.', - bankTransactions: 'Bank transactions', + bankTransactions: 'Transacciones bancarias', xeroBankAccount: 'Xero días laborales', preferredExporter: 'Exportador preferido', exportExpenses: 'Exportar gastos de bolsillo como', From 7e88d91da62d8c9b6801bb1dc2f1f95d2ef33ba8 Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Mon, 6 May 2024 15:07:43 +0300 Subject: [PATCH 21/29] Update src/languages/es.ts Co-authored-by: Rocio Perez-Cano --- src/languages/es.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/languages/es.ts b/src/languages/es.ts index 2b7fbd164c8d..88e071377ca9 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -2043,7 +2043,7 @@ export default { bankTransactions: 'Transacciones bancarias', xeroBankAccount: 'Xero días laborales', preferredExporter: 'Exportador preferido', - exportExpenses: 'Exportar gastos de bolsillo como', + exportExpenses: 'Exportar gastos por cuenta propia como', exportExpensesDescription: 'Reports will export as a purchase bill using the date and with the status you select below.', purchaseBillDate: 'Purchase bill date', exportInvoices: 'Exportar facturas como', From 5477528a4897d538b19909623a2380512b72d951 Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Mon, 6 May 2024 15:07:49 +0300 Subject: [PATCH 22/29] Update src/languages/es.ts Co-authored-by: Rocio Perez-Cano --- src/languages/es.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/languages/es.ts b/src/languages/es.ts index 88e071377ca9..27859ae4b715 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -2044,7 +2044,7 @@ export default { xeroBankAccount: 'Xero días laborales', preferredExporter: 'Exportador preferido', exportExpenses: 'Exportar gastos por cuenta propia como', - exportExpensesDescription: 'Reports will export as a purchase bill using the date and with the status you select below.', + exportExpensesDescription: 'Los informes se exportarán como una factura de compra utilizando la fecha y el estado que seleccione a continuación', purchaseBillDate: 'Purchase bill date', exportInvoices: 'Exportar facturas como', salesInvoice: 'Sales invoice', From 840111c5652b3e691c220aec1c48e033342a29ca Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Mon, 6 May 2024 15:07:54 +0300 Subject: [PATCH 23/29] Update src/languages/es.ts Co-authored-by: Rocio Perez-Cano --- src/languages/es.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/languages/es.ts b/src/languages/es.ts index 27859ae4b715..84a5e9659e9b 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -2048,7 +2048,7 @@ export default { purchaseBillDate: 'Purchase bill date', exportInvoices: 'Exportar facturas como', salesInvoice: 'Sales invoice', - exportInvoicesDescription: 'Sales invoices always display the date on which the invoice was sent.', + exportInvoicesDescription: 'Las facturas de venta siempre muestran la fecha en la que se envió la factura.', advancedConfig: { advanced: 'Avanzado', autoSync: 'Autosincronización', From 666c1eeff77c143e6aba9c9e49dbe6d67dcea11c Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Mon, 6 May 2024 15:08:01 +0300 Subject: [PATCH 24/29] Update src/languages/es.ts Co-authored-by: Rocio Perez-Cano --- src/languages/es.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/languages/es.ts b/src/languages/es.ts index 84a5e9659e9b..63dc7191a351 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -2053,7 +2053,7 @@ export default { advanced: 'Avanzado', autoSync: 'Autosincronización', autoSyncDescription: 'Sincroniza Xero y Expensify automáticamente todos los días.', - purchaseBillStatusTitle: 'Purchase bill status', + purchaseBillStatusTitle: 'Estado de la factura de compra', reimbursedReports: 'Sincronizar informes reembolsados', reimbursedReportsDescription: 'Cada vez que se pague un informe utilizando Expensify ACH, se creará el correspondiente pago de la factura en la cuenta de Xero indicadas a continuación.', From e42a8f670bf66f2e3fe4b824f7655437e4611a0a Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Mon, 6 May 2024 15:08:15 +0300 Subject: [PATCH 25/29] Update src/pages/workspace/accounting/xero/export/XeroExportConfigurationPage.tsx Co-authored-by: Hans --- .../accounting/xero/export/XeroExportConfigurationPage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/workspace/accounting/xero/export/XeroExportConfigurationPage.tsx b/src/pages/workspace/accounting/xero/export/XeroExportConfigurationPage.tsx index 962804969ff8..934c41dab614 100644 --- a/src/pages/workspace/accounting/xero/export/XeroExportConfigurationPage.tsx +++ b/src/pages/workspace/accounting/xero/export/XeroExportConfigurationPage.tsx @@ -45,7 +45,7 @@ function XeroExportConfigurationPage({policy}: WithPolicyConnectionsProps) { { description: translate('workspace.xero.advancedConfig.purchaseBillStatusTitle'), onPress: () => {}, - title: exportConfiguration?.billStatus.purchase, + title: exportConfiguration?.billStatus?.purchase, pendingAction: pendingFields?.export, error: errorFields?.purchase ? translate('common.genericErrorMessage') : undefined, }, From b98c1cca006156d71ab113564107f570cdac0fb3 Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Mon, 6 May 2024 15:08:25 +0300 Subject: [PATCH 26/29] Update src/languages/es.ts Co-authored-by: Rocio Perez-Cano --- src/languages/es.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/languages/es.ts b/src/languages/es.ts index 63dc7191a351..54907a1ca4ad 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -2047,7 +2047,7 @@ export default { exportExpensesDescription: 'Los informes se exportarán como una factura de compra utilizando la fecha y el estado que seleccione a continuación', purchaseBillDate: 'Purchase bill date', exportInvoices: 'Exportar facturas como', - salesInvoice: 'Sales invoice', + salesInvoice: 'Factura de venta', exportInvoicesDescription: 'Las facturas de venta siempre muestran la fecha en la que se envió la factura.', advancedConfig: { advanced: 'Avanzado', From a95e49c14847f103d169fca6dfb780b56a4af855 Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Mon, 6 May 2024 15:08:34 +0300 Subject: [PATCH 27/29] Update src/languages/es.ts Co-authored-by: Rocio Perez-Cano --- src/languages/es.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/languages/es.ts b/src/languages/es.ts index 54907a1ca4ad..1ddac3e41325 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -2045,7 +2045,7 @@ export default { preferredExporter: 'Exportador preferido', exportExpenses: 'Exportar gastos por cuenta propia como', exportExpensesDescription: 'Los informes se exportarán como una factura de compra utilizando la fecha y el estado que seleccione a continuación', - purchaseBillDate: 'Purchase bill date', + purchaseBillDate: 'Fecha de la factura de compra', exportInvoices: 'Exportar facturas como', salesInvoice: 'Factura de venta', exportInvoicesDescription: 'Las facturas de venta siempre muestran la fecha en la que se envió la factura.', From 94198a32f39f2dc659a932853cd0956f2b3f4d5b Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Mon, 6 May 2024 15:08:41 +0300 Subject: [PATCH 28/29] Update src/languages/es.ts Co-authored-by: Rocio Perez-Cano --- src/languages/es.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/languages/es.ts b/src/languages/es.ts index 1ddac3e41325..b0211fde9253 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -2041,7 +2041,7 @@ export default { exportDeepDiveCompanyCard: 'Cada gasto exportado se contabiliza como una transacción bancaria en la cuenta bancaria de Xero que selecciones a continuación. Las fechas de las transacciones coincidirán con las fechas de el extracto bancario.', bankTransactions: 'Transacciones bancarias', - xeroBankAccount: 'Xero días laborales', + xeroBankAccount: 'Cuenta bancaria de Xero', preferredExporter: 'Exportador preferido', exportExpenses: 'Exportar gastos por cuenta propia como', exportExpensesDescription: 'Los informes se exportarán como una factura de compra utilizando la fecha y el estado que seleccione a continuación', From 61c111d3b2a27ba5b5c23756d46dbb6ab62f6ef0 Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Mon, 6 May 2024 15:08:48 +0300 Subject: [PATCH 29/29] Update src/languages/es.ts Co-authored-by: Rocio Perez-Cano --- src/languages/es.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/languages/es.ts b/src/languages/es.ts index b0211fde9253..dbc435ffa4f4 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -2037,7 +2037,7 @@ export default { export: 'Exportar', exportDescription: 'Configura cómo se exportan los datos de Expensify a Xero.', exportCompanyCard: 'Exportar gastos de la tarjeta de empresa como', - purchaseBill: 'Purchase bill', + purchaseBill: 'Factura de compra', exportDeepDiveCompanyCard: 'Cada gasto exportado se contabiliza como una transacción bancaria en la cuenta bancaria de Xero que selecciones a continuación. Las fechas de las transacciones coincidirán con las fechas de el extracto bancario.', bankTransactions: 'Transacciones bancarias',