From 7e1868a4751b9b20388b7fbfc2dccf6d05743edf Mon Sep 17 00:00:00 2001 From: Jakub Szymczak Date: Wed, 8 May 2024 16:36:16 +0200 Subject: [PATCH 1/7] refactor workspace.qbo and workspace.common translations --- src/languages/en.ts | 5 ++++- src/languages/es.ts | 5 ++++- .../accounting/qbo/import/QuickbooksChartOfAccountsPage.tsx | 2 +- .../accounting/qbo/import/QuickbooksClassesPage.tsx | 2 +- .../accounting/qbo/import/QuickbooksCustomersPage.tsx | 2 +- .../accounting/qbo/import/QuickbooksLocationsPage.tsx | 2 +- .../accounting/xero/import/XeroCustomerConfigurationPage.tsx | 2 +- 7 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/languages/en.ts b/src/languages/en.ts index a822e1c5c3c8..e2a3d6c81b43 100755 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -1883,6 +1883,7 @@ export default { travel: 'Travel', members: 'Members', accounting: 'Accounting', + displayedAs: 'Displayed as', plan: 'Plan', profile: 'Profile', bankAccount: 'Bank account', @@ -1913,7 +1914,6 @@ export default { classes: 'Classes', locations: 'Locations', customers: 'Customers/Projects', - displayedAs: 'Displayed as', accountsDescription: 'When connected to Quickbooks Online, chart of accounts are always imported to Expensify as categories.', accountsSwitchTitle: 'Below you can choose to have any new account imported as an enabled or disabled category by default.', accountsSwitchDescription: 'Enabled categories are available for members to select when creating their expenses.', @@ -2021,6 +2021,9 @@ export default { organization: 'Xero organization', organizationDescription: 'Select the organization in Xero you are importing data from.', importDescription: 'Choose which coding configurations are imported from Xero to Expensify.', + accountsDescription: 'When connected to Xero, chart of accounts are always imported to Expensify as categories.', + accountsSwitchTitle: 'Below you can choose to have any new account imported as an enabled or disabled category by default.', + accountsSwitchDescription: 'Enabled categories are available for members to select when creating their expenses.', trackingCategories: 'Tracking categories', trackingCategoriesDescription: 'Choose whether to import tracking categories and see where they are displayed.', mapXeroCostCentersTo: 'Map Xero cost centers to', diff --git a/src/languages/es.ts b/src/languages/es.ts index 2027fa80f1f6..d38114070f08 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -1910,6 +1910,7 @@ export default { plan: 'Plan', profile: 'Perfil', bankAccount: 'Cuenta bancaria', + displayedAs: 'Mostrado como', connectBankAccount: 'Conectar cuenta bancaria', testTransactions: 'Transacciones de prueba', issueAndManageCards: 'Emitir y gestionar tarjetas', @@ -1937,7 +1938,6 @@ export default { classes: 'Clases', locations: 'Lugares', customers: 'Clientes/Proyectos', - displayedAs: 'Mostrado como', accountsDescription: 'Cuando estás conectado a Quickbooks Online, los planes de cuentas siempre se importan a Expensify como categorías.', accountsSwitchTitle: 'Elige abajo si las categorías importadas serán activadas o desactivadas por defecto.', accountsSwitchDescription: 'Las categorías activas estarán disponibles para ser escogidas cuando se crea un gasto.', @@ -2053,6 +2053,9 @@ export default { organization: 'Organización Xero', organizationDescription: 'Seleccione la organización en Xero desde la que está importando los datos.', importDescription: 'Elija qué configuraciones de codificación se importan de Xero a Expensify.', + accountsDescription: 'Cuando estás conectado a Quickbooks Online, los planes de cuentas siempre se importan a Expensify como categorías.', + accountsSwitchTitle: 'Elige abajo si las categorías importadas serán activadas o desactivadas por defecto.', + accountsSwitchDescription: 'Las categorías activas estarán disponibles para ser escogidas cuando se crea un gasto.', trackingCategories: 'Categorías de seguimiento', trackingCategoriesDescription: 'Elige si deseas importar categorías de seguimiento y ver dónde se muestran.', mapXeroCostCentersTo: 'Asignar centros de coste de Xero a', diff --git a/src/pages/workspace/accounting/qbo/import/QuickbooksChartOfAccountsPage.tsx b/src/pages/workspace/accounting/qbo/import/QuickbooksChartOfAccountsPage.tsx index 9fea1f323bd1..98fceecc5bd0 100644 --- a/src/pages/workspace/accounting/qbo/import/QuickbooksChartOfAccountsPage.tsx +++ b/src/pages/workspace/accounting/qbo/import/QuickbooksChartOfAccountsPage.tsx @@ -44,7 +44,7 @@ function QuickbooksChartOfAccountsPage({policy}: WithPolicyProps) { {translate('workspace.qbo.accountsSwitchTitle')} diff --git a/src/pages/workspace/accounting/qbo/import/QuickbooksClassesPage.tsx b/src/pages/workspace/accounting/qbo/import/QuickbooksClassesPage.tsx index 45b7533648bb..4d9e2ff63dde 100644 --- a/src/pages/workspace/accounting/qbo/import/QuickbooksClassesPage.tsx +++ b/src/pages/workspace/accounting/qbo/import/QuickbooksClassesPage.tsx @@ -64,7 +64,7 @@ function QuickbooksClassesPage({policy}: WithPolicyProps) { diff --git a/src/pages/workspace/accounting/qbo/import/QuickbooksCustomersPage.tsx b/src/pages/workspace/accounting/qbo/import/QuickbooksCustomersPage.tsx index 3c38e542d455..f93adcbe3cff 100644 --- a/src/pages/workspace/accounting/qbo/import/QuickbooksCustomersPage.tsx +++ b/src/pages/workspace/accounting/qbo/import/QuickbooksCustomersPage.tsx @@ -63,7 +63,7 @@ function QuickbooksCustomersPage({policy}: WithPolicyProps) { diff --git a/src/pages/workspace/accounting/qbo/import/QuickbooksLocationsPage.tsx b/src/pages/workspace/accounting/qbo/import/QuickbooksLocationsPage.tsx index 307847809d62..1183b2a96c49 100644 --- a/src/pages/workspace/accounting/qbo/import/QuickbooksLocationsPage.tsx +++ b/src/pages/workspace/accounting/qbo/import/QuickbooksLocationsPage.tsx @@ -64,7 +64,7 @@ function QuickbooksLocationsPage({policy}: WithPolicyProps) { diff --git a/src/pages/workspace/accounting/xero/import/XeroCustomerConfigurationPage.tsx b/src/pages/workspace/accounting/xero/import/XeroCustomerConfigurationPage.tsx index 1d1cf11f9791..560185d7f9ce 100644 --- a/src/pages/workspace/accounting/xero/import/XeroCustomerConfigurationPage.tsx +++ b/src/pages/workspace/accounting/xero/import/XeroCustomerConfigurationPage.tsx @@ -51,7 +51,7 @@ function XeroCustomerConfigurationPage({policy}: WithPolicyProps) { From 7eaa38e6bc79d80698d29dc543bc8083ed0aeb5d Mon Sep 17 00:00:00 2001 From: Jakub Szymczak Date: Wed, 8 May 2024 16:37:25 +0200 Subject: [PATCH 2/7] add XeroChartOfAccountsPage --- src/CONST.ts | 1 + src/ROUTES.ts | 4 + src/SCREENS.ts | 1 + .../ModalStackNavigators/index.tsx | 1 + .../FULL_SCREEN_TO_RHP_MAPPING.ts | 1 + src/libs/Navigation/linkingConfig/config.ts | 1 + src/libs/Navigation/types.ts | 3 + .../accounting/xero/XeroImportPage.tsx | 2 +- .../xero/import/XeroChartOfAccountsPage.tsx | 77 +++++++++++++++++++ 9 files changed, 90 insertions(+), 1 deletion(-) create mode 100644 src/pages/workspace/accounting/xero/import/XeroChartOfAccountsPage.tsx diff --git a/src/CONST.ts b/src/CONST.ts index efb0463457b1..c47cd90fad0f 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -1299,6 +1299,7 @@ const CONST = { XERO_CONFIG: { AUTO_SYNC: 'autoSync', SYNC: 'sync', + ENABLE_NEW_CATEGORIES: 'enableNewCategories', IMPORT_CUSTOMERS: 'importCustomers', IMPORT_TAX_RATES: 'importTaxRates', IMPORT_TRACKING_CATEGORIES: 'importTrackingCategories', diff --git a/src/ROUTES.ts b/src/ROUTES.ts index afe806c193aa..e5e104987f8b 100644 --- a/src/ROUTES.ts +++ b/src/ROUTES.ts @@ -776,6 +776,10 @@ const ROUTES = { route: 'settings/workspaces/:policyID/accounting/xero/import', getRoute: (policyID: string) => `settings/workspaces/${policyID}/accounting/xero/import` as const, }, + POLICY_ACCOUNTING_XERO_CHART_OF_ACCOUNTS: { + route: 'settings/workspaces/:policyID/accounting/xero/import/accounts', + getRoute: (policyID: string) => `settings/workspaces/${policyID}/accounting/xero/import/accounts` as const, + }, POLICY_ACCOUNTING_XERO_ORGANIZATION: { route: 'settings/workspaces/:policyID/accounting/xero/organization/:currentOrganizationID', getRoute: (policyID: string, currentOrganizationID: string) => `settings/workspaces/${policyID}/accounting/xero/organization/${currentOrganizationID}` as const, diff --git a/src/SCREENS.ts b/src/SCREENS.ts index b76df331fe74..45c575877af8 100644 --- a/src/SCREENS.ts +++ b/src/SCREENS.ts @@ -242,6 +242,7 @@ const SCREENS = { QUICKBOOKS_ONLINE_INVOICE_ACCOUNT_SELECTOR: 'Policy_Accounting_Quickbooks_Online_Invoice_Account_Selector', XERO_IMPORT: 'Policy_Accounting_Xero_Import', XERO_ORGANIZATION: 'Policy_Accounting_Xero_Customers', + XERO_CHART_OF_ACCOUNTS: 'Policy_Accounting_Xero_Import_Chart_Of_Accounts', XERO_CUSTOMER: 'Policy_Acounting_Xero_Import_Customer', XERO_TAXES: 'Policy_Accounting_Xero_Taxes', XERO_TRACKING_CATEGORIES: 'Policy_Accounting_Xero_Tracking_Categories', diff --git a/src/libs/Navigation/AppNavigator/ModalStackNavigators/index.tsx b/src/libs/Navigation/AppNavigator/ModalStackNavigators/index.tsx index c7910a88a57f..79e128708e2d 100644 --- a/src/libs/Navigation/AppNavigator/ModalStackNavigators/index.tsx +++ b/src/libs/Navigation/AppNavigator/ModalStackNavigators/index.tsx @@ -303,6 +303,7 @@ const SettingsModalStackNavigator = createModalStackNavigator require('../../../../pages/workspace/accounting/xero/XeroImportPage').default as React.ComponentType, [SCREENS.WORKSPACE.ACCOUNTING.XERO_ORGANIZATION]: () => require('../../../../pages/workspace/accounting/xero/XeroOrganizationConfigurationPage').default as React.ComponentType, + [SCREENS.WORKSPACE.ACCOUNTING.XERO_CHART_OF_ACCOUNTS]: () => require('../../../../pages/workspace/accounting/xero/import/XeroChartOfAccountsPage').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_TRACKING_CATEGORIES]: () => 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 00ba520d4955..a70588e9f19b 100755 --- a/src/libs/Navigation/linkingConfig/FULL_SCREEN_TO_RHP_MAPPING.ts +++ b/src/libs/Navigation/linkingConfig/FULL_SCREEN_TO_RHP_MAPPING.ts @@ -41,6 +41,7 @@ const FULL_SCREEN_TO_RHP_MAPPING: Partial> = { SCREENS.WORKSPACE.ACCOUNTING.QUICKBOOKS_ONLINE_ACCOUNT_SELECTOR, SCREENS.WORKSPACE.ACCOUNTING.QUICKBOOKS_ONLINE_INVOICE_ACCOUNT_SELECTOR, SCREENS.WORKSPACE.ACCOUNTING.XERO_IMPORT, + SCREENS.WORKSPACE.ACCOUNTING.XERO_CHART_OF_ACCOUNTS, SCREENS.WORKSPACE.ACCOUNTING.XERO_ORGANIZATION, SCREENS.WORKSPACE.ACCOUNTING.XERO_CUSTOMER, SCREENS.WORKSPACE.ACCOUNTING.XERO_TAXES, diff --git a/src/libs/Navigation/linkingConfig/config.ts b/src/libs/Navigation/linkingConfig/config.ts index 43597df5513c..a86d2f95a18b 100644 --- a/src/libs/Navigation/linkingConfig/config.ts +++ b/src/libs/Navigation/linkingConfig/config.ts @@ -328,6 +328,7 @@ const config: LinkingOptions['config'] = { path: ROUTES.WORKSPACE_ACCOUNTING_QUICKBOOKS_ONLINE_INVOICE_ACCOUNT_SELECTOR.route, }, [SCREENS.WORKSPACE.ACCOUNTING.XERO_IMPORT]: {path: ROUTES.POLICY_ACCOUNTING_XERO_IMPORT.route}, + [SCREENS.WORKSPACE.ACCOUNTING.XERO_CHART_OF_ACCOUNTS]: {path: ROUTES.POLICY_ACCOUNTING_XERO_CHART_OF_ACCOUNTS.route}, [SCREENS.WORKSPACE.ACCOUNTING.XERO_ORGANIZATION]: {path: ROUTES.POLICY_ACCOUNTING_XERO_ORGANIZATION.route}, [SCREENS.WORKSPACE.ACCOUNTING.XERO_TRACKING_CATEGORIES]: {path: ROUTES.POLICY_ACCOUNTING_XERO_TRACKING_CATEGORIES.route}, [SCREENS.WORKSPACE.ACCOUNTING.XERO_MAP_COST_CENTERS]: {path: ROUTES.POLICY_ACCOUNTING_XERO_TRACKING_CATEGORIES_MAP_COST_CENTERS.route}, diff --git a/src/libs/Navigation/types.ts b/src/libs/Navigation/types.ts index 13204fe97111..a9ccf4f8047a 100644 --- a/src/libs/Navigation/types.ts +++ b/src/libs/Navigation/types.ts @@ -314,6 +314,9 @@ type SettingsNavigatorParamList = { [SCREENS.WORKSPACE.ACCOUNTING.XERO_IMPORT]: { policyID: string; }; + [SCREENS.WORKSPACE.ACCOUNTING.XERO_CHART_OF_ACCOUNTS]: { + policyID: string; + }; [SCREENS.WORKSPACE.ACCOUNTING.XERO_CUSTOMER]: { policyID: string; }; diff --git a/src/pages/workspace/accounting/xero/XeroImportPage.tsx b/src/pages/workspace/accounting/xero/XeroImportPage.tsx index fbd0d6add7e5..72be1c37a361 100644 --- a/src/pages/workspace/accounting/xero/XeroImportPage.tsx +++ b/src/pages/workspace/accounting/xero/XeroImportPage.tsx @@ -29,7 +29,7 @@ function XeroImportPage({policy}: WithPolicyProps) { () => [ { description: translate('workspace.accounting.accounts'), - action: () => {}, + action: () => Navigation.navigate(ROUTES.POLICY_ACCOUNTING_XERO_CHART_OF_ACCOUNTS.getRoute(policyID)), hasError: !!policy?.errors?.enableNewCategories, title: translate('workspace.accounting.imported'), pendingAction: pendingFields?.enableNewCategories, diff --git a/src/pages/workspace/accounting/xero/import/XeroChartOfAccountsPage.tsx b/src/pages/workspace/accounting/xero/import/XeroChartOfAccountsPage.tsx new file mode 100644 index 000000000000..a1f361d3b248 --- /dev/null +++ b/src/pages/workspace/accounting/xero/import/XeroChartOfAccountsPage.tsx @@ -0,0 +1,77 @@ +import React from 'react'; +import {View} from 'react-native'; +import ConnectionLayout from '@components/ConnectionLayout'; +import MenuItemWithTopDescription from '@components/MenuItemWithTopDescription'; +import OfflineWithFeedback from '@components/OfflineWithFeedback'; +import Switch from '@components/Switch'; +import Text from '@components/Text'; +import useLocalize from '@hooks/useLocalize'; +import useThemeStyles from '@hooks/useThemeStyles'; +import * as Connections from '@libs/actions/connections'; +import type {WithPolicyProps} from '@pages/workspace/withPolicy'; +import withPolicyConnections from '@pages/workspace/withPolicyConnections'; +import variables from '@styles/variables'; +import CONST from '@src/CONST'; + +function XeroChartOfAccountsPage({policy}: WithPolicyProps) { + const {translate} = useLocalize(); + const styles = useThemeStyles(); + const policyID = policy?.id ?? ''; + const {enableNewCategories, pendingFields} = policy?.connections?.quickbooksOnline?.config ?? {}; + + return ( + + + + {translate('workspace.accounting.import')} + + + {}} + /> + + + + {translate('workspace.xero.accountsSwitchTitle')} + + + {translate('workspace.common.enabled')} + + + + + Connections.updatePolicyConnectionConfig(policyID, CONST.POLICY.CONNECTIONS.NAME.XERO, CONST.XERO_CONFIG.ENABLE_NEW_CATEGORIES, !enableNewCategories) + } + /> + + + + + {translate('workspace.xero.accountsSwitchDescription')} + + + ); +} + +XeroChartOfAccountsPage.displayName = 'XeroChartOfAccountsPage'; + +export default withPolicyConnections(XeroChartOfAccountsPage); From b34d095e62408454336da023489720239730b4ca Mon Sep 17 00:00:00 2001 From: Jakub Szymczak Date: Wed, 8 May 2024 17:24:51 +0200 Subject: [PATCH 3/7] fix enable toggle not working --- .../accounting/xero/import/XeroChartOfAccountsPage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/workspace/accounting/xero/import/XeroChartOfAccountsPage.tsx b/src/pages/workspace/accounting/xero/import/XeroChartOfAccountsPage.tsx index a1f361d3b248..2c74852f63fd 100644 --- a/src/pages/workspace/accounting/xero/import/XeroChartOfAccountsPage.tsx +++ b/src/pages/workspace/accounting/xero/import/XeroChartOfAccountsPage.tsx @@ -17,7 +17,7 @@ function XeroChartOfAccountsPage({policy}: WithPolicyProps) { const {translate} = useLocalize(); const styles = useThemeStyles(); const policyID = policy?.id ?? ''; - const {enableNewCategories, pendingFields} = policy?.connections?.quickbooksOnline?.config ?? {}; + const {enableNewCategories, pendingFields} = policy?.connections?.xero?.config ?? {}; return ( Date: Wed, 8 May 2024 17:40:11 +0200 Subject: [PATCH 4/7] fix translations on XeroImportPage --- src/pages/workspace/accounting/xero/XeroImportPage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/workspace/accounting/xero/XeroImportPage.tsx b/src/pages/workspace/accounting/xero/XeroImportPage.tsx index 72be1c37a361..74548373341e 100644 --- a/src/pages/workspace/accounting/xero/XeroImportPage.tsx +++ b/src/pages/workspace/accounting/xero/XeroImportPage.tsx @@ -31,7 +31,7 @@ function XeroImportPage({policy}: WithPolicyProps) { description: translate('workspace.accounting.accounts'), action: () => Navigation.navigate(ROUTES.POLICY_ACCOUNTING_XERO_CHART_OF_ACCOUNTS.getRoute(policyID)), hasError: !!policy?.errors?.enableNewCategories, - title: translate('workspace.accounting.imported'), + title: translate('workspace.accounting.importAsCategory'), pendingAction: pendingFields?.enableNewCategories, }, { From b576dc51b0e183376784a77650f9c06d82534c52 Mon Sep 17 00:00:00 2001 From: Jakub Szymczak Date: Mon, 13 May 2024 11:56:52 +0200 Subject: [PATCH 5/7] fix pr comments --- src/languages/es.ts | 2 +- .../xero/import/XeroChartOfAccountsPage.tsx | 38 +++++++++---------- 2 files changed, 18 insertions(+), 22 deletions(-) diff --git a/src/languages/es.ts b/src/languages/es.ts index 3504b70f1978..f82da32aa9b9 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -2053,7 +2053,7 @@ export default { organization: 'Organización Xero', organizationDescription: 'Seleccione la organización en Xero desde la que está importando los datos.', importDescription: 'Elija qué configuraciones de codificación se importan de Xero a Expensify.', - accountsDescription: 'Cuando estás conectado a Quickbooks Online, los planes de cuentas siempre se importan a Expensify como categorías.', + accountsDescription: 'Cuando estás conectado a Xero, los planes de cuentas siempre se importan a Expensify como categorías.', accountsSwitchTitle: 'Elige abajo si las categorías importadas serán activadas o desactivadas por defecto.', accountsSwitchDescription: 'Las categorías activas estarán disponibles para ser escogidas cuando se crea un gasto.', trackingCategories: 'Categorías de seguimiento', diff --git a/src/pages/workspace/accounting/xero/import/XeroChartOfAccountsPage.tsx b/src/pages/workspace/accounting/xero/import/XeroChartOfAccountsPage.tsx index 2c74852f63fd..cac8883fcc23 100644 --- a/src/pages/workspace/accounting/xero/import/XeroChartOfAccountsPage.tsx +++ b/src/pages/workspace/accounting/xero/import/XeroChartOfAccountsPage.tsx @@ -2,22 +2,25 @@ import React from 'react'; import {View} from 'react-native'; import ConnectionLayout from '@components/ConnectionLayout'; import MenuItemWithTopDescription from '@components/MenuItemWithTopDescription'; -import OfflineWithFeedback from '@components/OfflineWithFeedback'; import Switch from '@components/Switch'; import Text from '@components/Text'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import * as Connections from '@libs/actions/connections'; +import * as ErrorUtils from '@libs/ErrorUtils'; import type {WithPolicyProps} from '@pages/workspace/withPolicy'; import withPolicyConnections from '@pages/workspace/withPolicyConnections'; +import ToggleSettingOptionRow from '@pages/workspace/workflows/ToggleSettingsOptionRow'; import variables from '@styles/variables'; +import * as Policy from '@userActions/Policy'; import CONST from '@src/CONST'; function XeroChartOfAccountsPage({policy}: WithPolicyProps) { const {translate} = useLocalize(); const styles = useThemeStyles(); const policyID = policy?.id ?? ''; - const {enableNewCategories, pendingFields} = policy?.connections?.xero?.config ?? {}; + const xeroConfig = policy?.connections?.xero?.config; + const {enableNewCategories, pendingFields} = xeroConfig ?? {}; return ( {translate('workspace.xero.accountsSwitchTitle')} - - - {translate('workspace.common.enabled')} - - - - - Connections.updatePolicyConnectionConfig(policyID, CONST.POLICY.CONNECTIONS.NAME.XERO, CONST.XERO_CONFIG.ENABLE_NEW_CATEGORIES, !enableNewCategories) - } - /> - - - - - {translate('workspace.xero.accountsSwitchDescription')} - + Connections.updatePolicyConnectionConfig(policyID, CONST.POLICY.CONNECTIONS.NAME.XERO, CONST.XERO_CONFIG.ENABLE_NEW_CATEGORIES, !enableNewCategories)} + pendingAction={pendingFields?.enableNewCategories} + errors={ErrorUtils.getLatestErrorField(xeroConfig ?? {}, CONST.XERO_CONFIG.ENABLE_NEW_CATEGORIES)} + onCloseError={() => Policy.clearXeroErrorField(policyID, CONST.XERO_CONFIG.ENABLE_NEW_CATEGORIES)} + /> ); } From c059270ce32192fab4294b9cdbd73f998a980456 Mon Sep 17 00:00:00 2001 From: Jakub Szymczak Date: Mon, 13 May 2024 12:09:17 +0200 Subject: [PATCH 6/7] delete usused key prop --- .../workspace/accounting/xero/import/XeroChartOfAccountsPage.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/workspace/accounting/xero/import/XeroChartOfAccountsPage.tsx b/src/pages/workspace/accounting/xero/import/XeroChartOfAccountsPage.tsx index cac8883fcc23..ed5a0eed529d 100644 --- a/src/pages/workspace/accounting/xero/import/XeroChartOfAccountsPage.tsx +++ b/src/pages/workspace/accounting/xero/import/XeroChartOfAccountsPage.tsx @@ -53,7 +53,6 @@ function XeroChartOfAccountsPage({policy}: WithPolicyProps) { /> {translate('workspace.xero.accountsSwitchTitle')} Date: Mon, 13 May 2024 13:47:34 +0200 Subject: [PATCH 7/7] fix PR comments --- .../workspace/accounting/xero/import/XeroChartOfAccountsPage.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/workspace/accounting/xero/import/XeroChartOfAccountsPage.tsx b/src/pages/workspace/accounting/xero/import/XeroChartOfAccountsPage.tsx index ed5a0eed529d..7492864c9abb 100644 --- a/src/pages/workspace/accounting/xero/import/XeroChartOfAccountsPage.tsx +++ b/src/pages/workspace/accounting/xero/import/XeroChartOfAccountsPage.tsx @@ -56,7 +56,6 @@ function XeroChartOfAccountsPage({policy}: WithPolicyProps) { title={translate('workspace.common.enabled')} subtitle={translate('workspace.xero.accountsSwitchDescription')} shouldPlaceSubtitleBelowSwitch - wrapperStyle={styles.mv3} isActive={!!enableNewCategories} onToggle={() => Connections.updatePolicyConnectionConfig(policyID, CONST.POLICY.CONNECTIONS.NAME.XERO, CONST.XERO_CONFIG.ENABLE_NEW_CATEGORIES, !enableNewCategories)} pendingAction={pendingFields?.enableNewCategories}