diff --git a/src/libs/Navigation/AppNavigator/ModalStackNavigators/index.tsx b/src/libs/Navigation/AppNavigator/ModalStackNavigators/index.tsx index e74409867b66..c454ee365cb2 100644 --- a/src/libs/Navigation/AppNavigator/ModalStackNavigators/index.tsx +++ b/src/libs/Navigation/AppNavigator/ModalStackNavigators/index.tsx @@ -833,9 +833,9 @@ const SettingsModalStackNavigator = createModalStackNavigator require('../../../../pages/workspace/accounting/zohoBooks/advanced/ZohoBooksExpensifyCardSettlementAccountPage').default, [SCREENS.WORKSPACE.ACCOUNTING.ZOHO_BOOKS_TRAVEL_BILLING_SETTLEMENT_ACCOUNT]: () => - require('../../../../pages/workspace/accounting/zohoBooks/advanced/ZohoBooksTravelInvoicingSettlementAccountPage').default, + require('../../../../pages/workspace/accounting/zohoBooks/advanced/ZohoBooksTravelBillingSettlementAccountPage').default, [SCREENS.WORKSPACE.ACCOUNTING.ZOHO_BOOKS_TRAVEL_BILLING_PAYABLE_ACCOUNT]: () => - require('../../../../pages/workspace/accounting/zohoBooks/advanced/ZohoBooksTravelInvoicingPayableAccountPage').default, + require('../../../../pages/workspace/accounting/zohoBooks/advanced/ZohoBooksTravelBillingPayableAccountPage').default, [SCREENS.WORKSPACE.ACCOUNTING.ZOHO_BOOKS_IMPORT]: () => require('../../../../pages/workspace/accounting/zohoBooks/import/ZohoBooksImportPage').default, [SCREENS.WORKSPACE.ACCOUNTING.ZOHO_BOOKS_EXPORT]: () => require('../../../../pages/workspace/accounting/zohoBooks/export/ZohoBooksExportPage').default, [SCREENS.WORKSPACE.ACCOUNTING.ZOHO_BOOKS_PREFERRED_EXPORTER]: () => diff --git a/src/pages/workspace/accounting/zohoBooks/advanced/ZohoBooksAdvancedPage.tsx b/src/pages/workspace/accounting/zohoBooks/advanced/ZohoBooksAdvancedPage.tsx index 292a91602f2f..2f9463ca467a 100644 --- a/src/pages/workspace/accounting/zohoBooks/advanced/ZohoBooksAdvancedPage.tsx +++ b/src/pages/workspace/accounting/zohoBooks/advanced/ZohoBooksAdvancedPage.tsx @@ -57,8 +57,8 @@ function ZohoBooksAdvancedPage({policy}: WithPolicyConnectionsProps) { const syncExpensifyCardSettlements = zohoBooksConfig?.sync?.syncExpensifyCardSettlements ?? true; const settlementsBankAccount = zohoBooksData?.bankAccounts?.find((account) => account.id === zohoBooksConfig?.sync?.settlementsBankAccountID); const syncTravelInvoicingSettlements = zohoBooksConfig?.sync?.syncTravelInvoicingSettlements ?? true; - const travelInvoicingSettlementsBankAccount = zohoBooksData?.bankAccounts?.find((account) => account.id === zohoBooksConfig?.sync?.travelInvoicingSettlementsBankAccountID); - const travelInvoicingPayableAccount = zohoBooksData?.accounts?.find((account) => account.id === zohoBooksConfig?.export?.travelInvoicingPayableAccountID); + const travelBillingSettlementsBankAccount = zohoBooksData?.bankAccounts?.find((account) => account.id === zohoBooksConfig?.sync?.travelInvoicingSettlementsBankAccountID); + const travelBillingPayableAccount = zohoBooksData?.accounts?.find((account) => account.id === zohoBooksConfig?.export?.travelInvoicingPayableAccountID); const allCardSettings = useExpensifyCardFeeds(policyID); const isExpensifyCardsEnabled = Object.values(allCardSettings ?? {})?.some((cardSetting) => isExpensifyCardFullySetUp(policy, cardSetting)); const travelBillingFundID = useTravelBillingFundID(policyID); @@ -71,7 +71,7 @@ function ZohoBooksAdvancedPage({policy}: WithPolicyConnectionsProps) { useAccordionAnimation(syncReimbursedReports); const {isAccordionExpanded: isSyncExpensifyCardSettlementsAccordionExpanded, shouldAnimateAccordionSection: shouldAnimateSyncExpensifyCardSettlementsAccordionSection} = useAccordionAnimation(syncExpensifyCardSettlements); - const {isAccordionExpanded: isSyncTravelInvoicingSettlementsAccordionExpanded, shouldAnimateAccordionSection: shouldAnimateSyncTravelInvoicingSettlementsAccordionSection} = + const {isAccordionExpanded: isSyncTravelBillingSettlementsAccordionExpanded, shouldAnimateAccordionSection: shouldAnimateSyncTravelBillingSettlementsAccordionSection} = useAccordionAnimation(syncTravelInvoicingSettlements); return ( @@ -203,15 +203,15 @@ function ZohoBooksAdvancedPage({policy}: WithPolicyConnectionsProps) { onCloseError={() => policyID && clearZohoBooksErrorField(policyID, CONST.ZOHO_BOOKS_CONFIG.SYNC_TRAVEL_BILLING_SETTLEMENTS)} /> (policyID ? Navigation.navigate(ROUTES.POLICY_ACCOUNTING_ZOHO_BOOKS_TRAVEL_BILLING_SETTLEMENT_ACCOUNT.getRoute(policyID)) : undefined)} - value={travelInvoicingSettlementsBankAccount?.name} + value={travelBillingSettlementsBankAccount?.name} > {areSettingsInErrorFields([CONST.ZOHO_BOOKS_CONFIG.TRAVEL_BILLING_SETTLEMENTS_BANK_ACCOUNT_ID], zohoBooksConfig?.errorFields) && ( @@ -223,7 +223,7 @@ function ZohoBooksAdvancedPage({policy}: WithPolicyConnectionsProps) { sentryLabel={CONST.SENTRY_LABEL.WORKSPACE.ACCOUNTING.ZOHO_BOOKS.TRAVEL_BILLING_PAYABLE_ACCOUNT} name={translate('workspace.zohoBooks.travelBillingPayableAccount.label')} onPress={() => (policyID ? Navigation.navigate(ROUTES.POLICY_ACCOUNTING_ZOHO_BOOKS_TRAVEL_BILLING_PAYABLE_ACCOUNT.getRoute(policyID)) : undefined)} - value={travelInvoicingPayableAccount?.name} + value={travelBillingPayableAccount?.name} > {areSettingsInErrorFields([CONST.ZOHO_BOOKS_CONFIG.TRAVEL_BILLING_PAYABLE_ACCOUNT_ID], zohoBooksConfig?.errorFields) && ( diff --git a/src/pages/workspace/accounting/zohoBooks/advanced/ZohoBooksTravelInvoicingPayableAccountPage.tsx b/src/pages/workspace/accounting/zohoBooks/advanced/ZohoBooksTravelBillingPayableAccountPage.tsx similarity index 94% rename from src/pages/workspace/accounting/zohoBooks/advanced/ZohoBooksTravelInvoicingPayableAccountPage.tsx rename to src/pages/workspace/accounting/zohoBooks/advanced/ZohoBooksTravelBillingPayableAccountPage.tsx index 392c9714e0e2..99297b0bef13 100644 --- a/src/pages/workspace/accounting/zohoBooks/advanced/ZohoBooksTravelInvoicingPayableAccountPage.tsx +++ b/src/pages/workspace/accounting/zohoBooks/advanced/ZohoBooksTravelBillingPayableAccountPage.tsx @@ -24,7 +24,7 @@ import ROUTES from '@src/ROUTES'; import React from 'react'; -function ZohoBooksTravelInvoicingPayableAccountPage({policy}: WithPolicyConnectionsProps) { +function ZohoBooksTravelBillingPayableAccountPage({policy}: WithPolicyConnectionsProps) { const policyID = policy?.id ?? String(CONST.DEFAULT_NUMBER_ID); const zohoBooksConfig = policy?.connections?.zohoBooks?.config; const zohoBooksData = policy?.connections?.zohoBooks?.data; @@ -65,7 +65,7 @@ function ZohoBooksTravelInvoicingPayableAccountPage({policy}: WithPolicyConnecti accessVariants={[CONST.POLICY.ACCESS_VARIANTS.ADMIN, CONST.POLICY.ACCESS_VARIANTS.PAID]} shouldBeBlocked={shouldBeBlocked} title="workspace.zohoBooks.travelBillingPayableAccount.label" - displayName="ZohoBooksTravelInvoicingPayableAccountSelectPage" + displayName="ZohoBooksTravelBillingPayableAccountSelectPage" data={data} connectionName={CONST.POLICY.CONNECTIONS.NAME.ZOHO_BOOKS} emptyStateTitle="workspace.zohoBooks.noAccountsFound" @@ -79,4 +79,4 @@ function ZohoBooksTravelInvoicingPayableAccountPage({policy}: WithPolicyConnecti ); } -export default withPolicyConnections(ZohoBooksTravelInvoicingPayableAccountPage); +export default withPolicyConnections(ZohoBooksTravelBillingPayableAccountPage); diff --git a/src/pages/workspace/accounting/zohoBooks/advanced/ZohoBooksTravelInvoicingSettlementAccountPage.tsx b/src/pages/workspace/accounting/zohoBooks/advanced/ZohoBooksTravelBillingSettlementAccountPage.tsx similarity index 93% rename from src/pages/workspace/accounting/zohoBooks/advanced/ZohoBooksTravelInvoicingSettlementAccountPage.tsx rename to src/pages/workspace/accounting/zohoBooks/advanced/ZohoBooksTravelBillingSettlementAccountPage.tsx index 505828426ec3..efda98def3d9 100644 --- a/src/pages/workspace/accounting/zohoBooks/advanced/ZohoBooksTravelInvoicingSettlementAccountPage.tsx +++ b/src/pages/workspace/accounting/zohoBooks/advanced/ZohoBooksTravelBillingSettlementAccountPage.tsx @@ -37,7 +37,7 @@ type AccountListItem = ListItem & { value: ZohoBooksBankAccount['id']; }; -function ZohoBooksTravelInvoicingSettlementAccountPage({policy}: WithPolicyConnectionsProps) { +function ZohoBooksTravelBillingSettlementAccountPage({policy}: WithPolicyConnectionsProps) { const {translate} = useLocalize(); const styles = useThemeStyles(); const illustrations = useMemoizedLazyIllustrations(['Telescope']); @@ -87,7 +87,7 @@ function ZohoBooksTravelInvoicingSettlementAccountPage({policy}: WithPolicyConne /> ); - const setTravelInvoicingSettlementsAccount = (item: AccountListItem) => { + const setTravelBillingSettlementsAccount = (item: AccountListItem) => { if (item.value !== travelInvoicingSettlementsBankAccountID && policyID) { updateZohoBooksTravelBillingSettlementsAccount(policyID, item.value, travelInvoicingSettlementsBankAccountID); } @@ -100,14 +100,14 @@ function ZohoBooksTravelInvoicingSettlementAccountPage({policy}: WithPolicyConne accessVariants={[CONST.POLICY.ACCESS_VARIANTS.ADMIN, CONST.POLICY.ACCESS_VARIANTS.PAID]} featureName={CONST.POLICY.MORE_FEATURES.ARE_CONNECTIONS_ENABLED} shouldBeBlocked={shouldBeBlocked} - displayName="ZohoBooksTravelInvoicingSettlementAccountPage" + displayName="ZohoBooksTravelBillingSettlementAccountPage" title="workspace.zohoBooks.travelBillingSettlementAccount.label" data={filteredData} textInputOptions={textInputOptions} headerContent={headerContent} listEmptyContent={listEmptyContent} shouldShowListEmptyContent={!textInputOptions.value} - onSelectRow={setTravelInvoicingSettlementsAccount} + onSelectRow={setTravelBillingSettlementsAccount} shouldSingleExecuteRowSelect initiallyFocusedOptionKey={travelInvoicingSettlementsBankAccountID} onBackButtonPress={() => Navigation.goBack(backPath)} @@ -120,4 +120,4 @@ function ZohoBooksTravelInvoicingSettlementAccountPage({policy}: WithPolicyConne ); } -export default withPolicyConnections(ZohoBooksTravelInvoicingSettlementAccountPage); +export default withPolicyConnections(ZohoBooksTravelBillingSettlementAccountPage);