Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2826,6 +2826,7 @@ const translations = {
itemsDescription: 'Choose how to handle QuickBooks Desktop items in Expensify.',
},
qbo: {
connectedTo: 'Connected to',
importDescription: 'Choose which coding configurations to import from QuickBooks Online to Expensify.',
classes: 'Classes',
locations: 'Locations',
Expand Down
1 change: 1 addition & 0 deletions src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2852,6 +2852,7 @@ const translations = {
itemsDescription: 'Elige cómo gestionar los elementos de QuickBooks Desktop en Expensify.',
},
qbo: {
connectedTo: 'Conectado a',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it Confirmed?

importDescription: 'Elige que configuraciónes de codificación son importadas desde QuickBooks Online a Expensify.',
classes: 'Clases',
locations: 'Lugares',
Expand Down
25 changes: 19 additions & 6 deletions src/pages/workspace/accounting/PolicyAccountingPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import useWindowDimensions from '@hooks/useWindowDimensions';
import {isAuthenticationError, isConnectionInProgress, isConnectionUnverified, removePolicyConnection, syncConnection} from '@libs/actions/connections';
import {getAssignedSupportData} from '@libs/actions/Policy/Policy';
import {getConciergeReportID} from '@libs/actions/Report';
import * as PolicyUtils from '@libs/PolicyUtils';
import {
areSettingsInErrorFields,
findCurrentXeroOrganization,
Expand All @@ -40,14 +39,16 @@ import {
getCurrentXeroOrganizationName,
getIntegrationLastSuccessfulDate,
getXeroTenants,
hasUnsupportedIntegration,
isControlPolicy,
settingsPendingAction,
shouldShowSyncError,
} from '@libs/PolicyUtils';
import Navigation from '@navigation/Navigation';
import AccessOrNotFoundWrapper from '@pages/workspace/AccessOrNotFoundWrapper';
import withPolicyConnections from '@pages/workspace/withPolicyConnections';
import type {AnchorPosition} from '@styles/index';
import * as Link from '@userActions/Link';
import {openOldDotLink} from '@userActions/Link';
import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
import ROUTES from '@src/ROUTES';
Expand Down Expand Up @@ -102,8 +103,8 @@ function PolicyAccountingPage({policy}: PolicyAccountingPageProps) {
connectedIntegration === connectionSyncProgress?.connectionName ? connectionSyncProgress : undefined,
);

const hasSyncError = PolicyUtils.shouldShowSyncError(policy, isSyncInProgress);
const hasUnsupportedNDIntegration = !isEmptyObject(policy?.connections) && PolicyUtils.hasUnsupportedIntegration(policy, accountingIntegrations);
const hasSyncError = shouldShowSyncError(policy, isSyncInProgress);
const hasUnsupportedNDIntegration = !isEmptyObject(policy?.connections) && hasUnsupportedIntegration(policy, accountingIntegrations);

const tenants = useMemo(() => getXeroTenants(policy), [policy]);
const currentXeroOrganization = findCurrentXeroOrganization(tenants, policy?.connections?.xero?.config?.tenantID);
Expand Down Expand Up @@ -249,6 +250,18 @@ function PolicyAccountingPage({policy}: PolicyAccountingPageProps) {
Navigation.navigate(ROUTES.POLICY_ACCOUNTING_SAGE_INTACCT_ENTITY.getRoute(policyID));
},
};
case CONST.POLICY.CONNECTIONS.NAME.QBO:
return !policy?.connections?.quickbooksOnline?.config?.companyName
? {}
: {
description: translate('workspace.qbo.connectedTo'),
title: policy?.connections?.quickbooksOnline?.config?.companyName,
wrapperStyle: [styles.sectionMenuItemTopDescription],
titleStyle: styles.fontWeightNormal,
shouldShowDescriptionOnTop: true,
interactive: false,
};

default:
return undefined;
}
Expand Down Expand Up @@ -537,7 +550,7 @@ function PolicyAccountingPage({policy}: PolicyAccountingPageProps) {
<TextLink
onPress={() => {
// Go to Expensify Classic.
Link.openOldDotLink(CONST.OLDDOT_URLS.POLICY_CONNECTIONS_URL(policyID));
openOldDotLink(CONST.OLDDOT_URLS.POLICY_CONNECTIONS_URL(policyID));
}}
>
{translate('workspace.accounting.goToODToFix')}
Expand All @@ -551,7 +564,7 @@ function PolicyAccountingPage({policy}: PolicyAccountingPageProps) {
<TextLink
onPress={() => {
// Go to Expensify Classic.
Link.openOldDotLink(CONST.OLDDOT_URLS.POLICY_CONNECTIONS_URL(policyID));
openOldDotLink(CONST.OLDDOT_URLS.POLICY_CONNECTIONS_URL(policyID));
}}
>
{translate('workspace.accounting.goToODToSettings')}
Expand Down