diff --git a/src/pages/workspace/tags/ImportTagsPage.tsx b/src/pages/workspace/tags/ImportTagsPage.tsx
index 2338ab16e2b9..d49e22f47f8e 100644
--- a/src/pages/workspace/tags/ImportTagsPage.tsx
+++ b/src/pages/workspace/tags/ImportTagsPage.tsx
@@ -4,6 +4,7 @@ import usePolicy from '@hooks/usePolicy';
import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types';
import type {SettingsNavigatorParamList} from '@libs/Navigation/types';
import * as PolicyUtils from '@libs/PolicyUtils';
+import NotFoundPage from '@pages/ErrorPage/NotFoundPage';
import AccessOrNotFoundWrapper from '@pages/workspace/AccessOrNotFoundWrapper';
import CONST from '@src/CONST';
import ROUTES from '@src/ROUTES';
@@ -16,8 +17,13 @@ function ImportTagsPage({route}: ImportTagsPageProps) {
const policyID = route.params.policyID;
const policy = usePolicy(policyID);
const backTo = route.params.backTo;
+ const hasAccountingConnections = PolicyUtils.hasAccountingConnections(policy);
const isQuickSettingsFlow = !!backTo;
+ if (hasAccountingConnections) {
+ return ;
+ }
+
return (
tag.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE || isOffline);
const threeDotsMenuItems = useMemo(() => {
- const menuItems: PopoverMenuItem[] = [
- {
+ const menuItems: PopoverMenuItem[] = [];
+ if (!PolicyUtils.hasAccountingConnections(policy)) {
+ menuItems.push({
icon: Expensicons.Table,
text: translate('spreadsheet.importSpreadsheet'),
onSelected: () => {
@@ -308,8 +309,8 @@ function WorkspaceTagsPage({route}: WorkspaceTagsPageProps) {
: ROUTES.WORKSPACE_TAGS_IMPORT.getRoute(policyID),
);
},
- },
- ];
+ });
+ }
if (hasVisibleTags) {
menuItems.push({
@@ -330,7 +331,7 @@ function WorkspaceTagsPage({route}: WorkspaceTagsPageProps) {
}
return menuItems;
- }, [translate, hasVisibleTags, isOffline, policyID, isQuickSettingsFlow, backTo]);
+ }, [policy, hasVisibleTags, translate, isOffline, isQuickSettingsFlow, policyID, backTo]);
const getHeaderText = () => (