From 6a18afb5f0b1622f8d7df3d61548aad90bb03aa0 Mon Sep 17 00:00:00 2001 From: BrtqKr Date: Fri, 19 Apr 2024 16:54:31 +0200 Subject: [PATCH] remove feature wrapper --- .../workspace/AccessOrNotFoundWrapper.tsx | 49 ++++-- .../FeatureEnabledAccessOrNotFoundWrapper.tsx | 74 --------- .../workspace/WorkspaceMoreFeaturesPage.tsx | 5 +- .../accounting/PolicyAccountingPage.tsx | 98 ++++++------ .../qbo/QuickbooksChartOfAccountsPage.tsx | 69 ++++---- .../accounting/qbo/QuickbooksClassesPage.tsx | 83 +++++----- .../qbo/QuickbooksCustomersPage.tsx | 83 +++++----- .../accounting/qbo/QuickbooksImportPage.tsx | 53 +++---- .../qbo/QuickbooksLocationsPage.tsx | 89 +++++------ .../accounting/qbo/QuickbooksTaxesPage.tsx | 65 ++++---- .../categories/CategorySettingsPage.tsx | 106 ++++++------- .../categories/CreateCategoryPage.tsx | 40 +++-- .../workspace/categories/EditCategoryPage.tsx | 44 +++--- .../categories/WorkspaceCategoriesPage.tsx | 122 +++++++-------- .../WorkspaceCategoriesSettingsPage.tsx | 66 ++++---- .../distanceRates/CreateDistanceRatePage.tsx | 66 ++++---- .../PolicyDistanceRateDetailsPage.tsx | 130 ++++++++------- .../PolicyDistanceRateEditPage.tsx | 74 +++++---- .../distanceRates/PolicyDistanceRatesPage.tsx | 120 +++++++------- .../PolicyDistanceRatesSettingsPage.tsx | 74 +++++---- .../members/WorkspaceMemberDetailsPage.tsx | 5 +- .../members/WorkspaceOwnerChangeErrorPage.tsx | 5 +- .../WorkspaceOwnerChangeSuccessPage.tsx | 5 +- .../WorkspaceOwnerChangeWrapperPage.tsx | 5 +- src/pages/workspace/tags/EditTagPage.tsx | 66 ++++---- src/pages/workspace/tags/TagSettingsPage.tsx | 122 +++++++-------- .../workspace/tags/WorkspaceCreateTagPage.tsx | 64 ++++---- .../workspace/tags/WorkspaceEditTagsPage.tsx | 62 ++++---- .../workspace/tags/WorkspaceTagsPage.tsx | 121 +++++++------- .../tags/WorkspaceTagsSettingsPage.tsx | 88 +++++------ src/pages/workspace/taxes/NamePage.tsx | 74 +++++---- src/pages/workspace/taxes/ValuePage.tsx | 80 +++++----- .../taxes/WorkspaceCreateTaxPage.tsx | 104 ++++++------ .../workspace/taxes/WorkspaceEditTaxPage.tsx | 148 +++++++++--------- .../workspace/taxes/WorkspaceTaxesPage.tsx | 110 +++++++------ .../WorkspaceTaxesSettingsCustomTaxName.tsx | 72 +++++---- .../WorkspaceTaxesSettingsForeignCurrency.tsx | 50 +++--- .../taxes/WorkspaceTaxesSettingsPage.tsx | 60 ++++--- ...orkspaceTaxesSettingsWorkspaceCurrency.tsx | 50 +++--- .../WorkspaceAutoReportingFrequencyPage.tsx | 6 +- ...orkspaceAutoReportingMonthlyOffsetPage.tsx | 6 +- .../WorkspaceWorkflowsApproverPage.tsx | 6 +- .../workflows/WorkspaceWorkflowsPage.tsx | 6 +- .../workflows/WorkspaceWorkflowsPayerPage.tsx | 5 +- 44 files changed, 1361 insertions(+), 1469 deletions(-) delete mode 100644 src/pages/workspace/FeatureEnabledAccessOrNotFoundWrapper.tsx diff --git a/src/pages/workspace/AccessOrNotFoundWrapper.tsx b/src/pages/workspace/AccessOrNotFoundWrapper.tsx index 333aba514168..29896eb5b6d0 100644 --- a/src/pages/workspace/AccessOrNotFoundWrapper.tsx +++ b/src/pages/workspace/AccessOrNotFoundWrapper.tsx @@ -2,6 +2,7 @@ import React, {useEffect} from 'react'; import type {OnyxEntry} from 'react-native-onyx'; import {withOnyx} from 'react-native-onyx'; +import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView'; import FullscreenLoadingIndicator from '@components/FullscreenLoadingIndicator'; import Navigation from '@libs/Navigation/Navigation'; import * as PolicyUtils from '@libs/PolicyUtils'; @@ -10,6 +11,8 @@ import * as Policy from '@userActions/Policy'; import ONYXKEYS from '@src/ONYXKEYS'; import ROUTES from '@src/ROUTES'; import type * as OnyxTypes from '@src/types/onyx'; +import type {PolicyFeatureName} from '@src/types/onyx/Policy'; +import callOrReturn from '@src/types/utils/callOrReturn'; import {isEmptyObject} from '@src/types/utils/EmptyObject'; const POLICY_ACCESS_VARIANTS = { @@ -36,38 +39,64 @@ type AccessOrNotFoundWrapperProps = AccessOrNotFoundWrapperOnyxProps & { /** Defines which types of access should be verified */ accessVariants?: PolicyAccessVariant[]; + + /** The current feature name that the user tries to get access to */ + featureName?: PolicyFeatureName; }; -function AccessOrNotFoundWrapper({accessVariants = ['ADMIN', 'PAID'], ...props}: AccessOrNotFoundWrapperProps) { - const isPolicyIDInRoute = !!props.policyID?.length; +type PageNotFoundFallackProps = Pick & {showFullScreenFallback: boolean}; + +function PageNotFoundFallback({policyID, showFullScreenFallback}: PageNotFoundFallackProps) { + return showFullScreenFallback ? ( + Navigation.goBack(ROUTES.SETTINGS_WORKSPACES)} + shouldForceFullScreen + /> + ) : ( + Navigation.goBack(ROUTES.WORKSPACE_PROFILE.getRoute(policyID))} /> + ); +} + +function AccessOrNotFoundWrapper({accessVariants = [], ...props}: AccessOrNotFoundWrapperProps) { + const {policy, policyID, featureName, isLoadingReportData} = props; + + const isPolicyIDInRoute = !!policyID?.length; useEffect(() => { - if (!isPolicyIDInRoute || !isEmptyObject(props.policy)) { + if (!isPolicyIDInRoute || !isEmptyObject(policy)) { // If the workspace is not required or is already loaded, we don't need to call the API return; } - Policy.openWorkspace(props.policyID, []); + Policy.openWorkspace(policyID, []); // eslint-disable-next-line react-hooks/exhaustive-deps - }, [isPolicyIDInRoute, props.policyID]); + }, [isPolicyIDInRoute, policyID]); - const shouldShowFullScreenLoadingIndicator = props.isLoadingReportData !== false && (!Object.entries(props.policy ?? {}).length || !props.policy?.id); + const shouldShowFullScreenLoadingIndicator = isLoadingReportData !== false && (!Object.entries(policy ?? {}).length || !policy?.id); + const isFeatureEnabled = featureName ? PolicyUtils.isPolicyFeatureEnabled(policy, featureName) : true; const pageUnaccessible = accessVariants.reduce((acc, variant) => { const accessFunction = POLICY_ACCESS_VARIANTS[variant]; - return acc || accessFunction(props.policy); + return acc || accessFunction(policy); }, false); - const shouldShowNotFoundPage = isEmptyObject(props.policy) || !props.policy?.id || pageUnaccessible; + + const shouldShowNotFoundPage = isEmptyObject(policy) || (Object.keys(policy).length === 1 && !isEmptyObject(policy.errors)) || !policy?.id || pageUnaccessible || !isFeatureEnabled; if (shouldShowFullScreenLoadingIndicator) { return ; } if (shouldShowNotFoundPage) { - return Navigation.goBack(ROUTES.WORKSPACE_PROFILE.getRoute(props.policyID))} />; + return ( + + ); } - return typeof props.children === 'function' ? props.children(props) : props.children; + return callOrReturn(props.children, props); } export default withOnyx({ diff --git a/src/pages/workspace/FeatureEnabledAccessOrNotFoundWrapper.tsx b/src/pages/workspace/FeatureEnabledAccessOrNotFoundWrapper.tsx deleted file mode 100644 index 3bcdc1fe3303..000000000000 --- a/src/pages/workspace/FeatureEnabledAccessOrNotFoundWrapper.tsx +++ /dev/null @@ -1,74 +0,0 @@ -/* eslint-disable rulesdir/no-negated-variables */ -import React, {useEffect} from 'react'; -import type {OnyxEntry} from 'react-native-onyx'; -import {withOnyx} from 'react-native-onyx'; -import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView'; -import FullscreenLoadingIndicator from '@components/FullscreenLoadingIndicator'; -import Navigation from '@libs/Navigation/Navigation'; -import * as PolicyUtils from '@libs/PolicyUtils'; -import * as Policy from '@userActions/Policy'; -import ONYXKEYS from '@src/ONYXKEYS'; -import ROUTES from '@src/ROUTES'; -import type * as OnyxTypes from '@src/types/onyx'; -import type {PolicyFeatureName} from '@src/types/onyx/Policy'; -import {isEmptyObject} from '@src/types/utils/EmptyObject'; - -type FeatureEnabledAccessOrNotFoundOnyxProps = { - /** The report currently being looked at */ - policy: OnyxEntry; - - /** Indicated whether the report data is loading */ - isLoadingReportData: OnyxEntry; -}; - -type FeatureEnabledAccessOrNotFoundComponentProps = FeatureEnabledAccessOrNotFoundOnyxProps & { - /** The children to render */ - children: ((props: FeatureEnabledAccessOrNotFoundOnyxProps) => React.ReactNode) | React.ReactNode; - - /** The report currently being looked at */ - policyID: string; - - /** The current feature name that the user tries to get access */ - featureName: PolicyFeatureName; -}; - -function FeatureEnabledAccessOrNotFoundComponent(props: FeatureEnabledAccessOrNotFoundComponentProps) { - const isPolicyIDInRoute = !!props.policyID?.length; - const shouldShowFullScreenLoadingIndicator = props.isLoadingReportData !== false && (!Object.entries(props.policy ?? {}).length || !props.policy?.id); - const shouldShowNotFoundPage = isEmptyObject(props.policy) || !props.policy?.id || !PolicyUtils.isPolicyFeatureEnabled(props.policy, props.featureName); - - useEffect(() => { - if (!isPolicyIDInRoute || !isEmptyObject(props.policy)) { - // If the workspace is not required or is already loaded, we don't need to call the API - return; - } - - Policy.openWorkspace(props.policyID, []); - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [isPolicyIDInRoute, props.policyID]); - - if (shouldShowFullScreenLoadingIndicator) { - return ; - } - - if (shouldShowNotFoundPage) { - return ( - Navigation.goBack(ROUTES.SETTINGS_WORKSPACES)} - shouldForceFullScreen - /> - ); - } - - return typeof props.children === 'function' ? props.children(props) : props.children; -} - -export default withOnyx({ - policy: { - key: ({policyID}) => `${ONYXKEYS.COLLECTION.POLICY}${policyID ?? ''}`, - }, - isLoadingReportData: { - key: ONYXKEYS.IS_LOADING_REPORT_DATA, - }, -})(FeatureEnabledAccessOrNotFoundComponent); diff --git a/src/pages/workspace/WorkspaceMoreFeaturesPage.tsx b/src/pages/workspace/WorkspaceMoreFeaturesPage.tsx index 46603c0712de..e904e6848ff2 100644 --- a/src/pages/workspace/WorkspaceMoreFeaturesPage.tsx +++ b/src/pages/workspace/WorkspaceMoreFeaturesPage.tsx @@ -195,7 +195,10 @@ function WorkspaceMoreFeaturesPage({policy, route}: WorkspaceMoreFeaturesPagePro ); return ( - + - + - - - - -
- -
-
-
- { - removePolicyConnection(policyID, CONST.POLICY.CONNECTIONS.NAME.QBO); - setIsDisconnectModalOpen(false); - }} - onCancel={() => setIsDisconnectModalOpen(false)} - prompt={translate('workspace.accounting.disconnectPrompt')} - confirmText={translate('workspace.accounting.disconnect')} - cancelText={translate('common.cancel')} - danger - /> -
-
+ + + +
+ +
+
+
+ { + removePolicyConnection(policyID, CONST.POLICY.CONNECTIONS.NAME.QBO); + setIsDisconnectModalOpen(false); + }} + onCancel={() => setIsDisconnectModalOpen(false)} + prompt={translate('workspace.accounting.disconnectPrompt')} + confirmText={translate('workspace.accounting.disconnect')} + cancelText={translate('common.cancel')} + danger + /> +
); } diff --git a/src/pages/workspace/accounting/qbo/QuickbooksChartOfAccountsPage.tsx b/src/pages/workspace/accounting/qbo/QuickbooksChartOfAccountsPage.tsx index 8401d0deb9ab..053df1d3e585 100644 --- a/src/pages/workspace/accounting/qbo/QuickbooksChartOfAccountsPage.tsx +++ b/src/pages/workspace/accounting/qbo/QuickbooksChartOfAccountsPage.tsx @@ -10,7 +10,6 @@ import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import * as Connections from '@libs/actions/connections'; import AccessOrNotFoundWrapper from '@pages/workspace/AccessOrNotFoundWrapper'; -import FeatureEnabledAccessOrNotFoundWrapper from '@pages/workspace/FeatureEnabledAccessOrNotFoundWrapper'; import withPolicy from '@pages/workspace/withPolicy'; import type {WithPolicyProps} from '@pages/workspace/withPolicy'; import variables from '@styles/variables'; @@ -27,46 +26,42 @@ function QuickbooksChartOfAccountsPage({policy}: WithPolicyProps) { - - - - - {translate('workspace.qbo.accountsDescription')} - - - {translate('workspace.qbo.accountsSwitchTitle')} - - - - - Connections.updatePolicyConnectionConfig( - policyID, - CONST.POLICY.CONNECTIONS.NAME.QBO, - CONST.QUICKBOOKS_IMPORTS.ENABLE_NEW_CATEGORIES, - isSwitchOn ? CONST.INTEGRATION_ENTITY_MAP_TYPES.NONE : CONST.INTEGRATION_ENTITY_MAP_TYPES.TAG, - ) - } - /> - - - + + + {translate('workspace.qbo.accountsDescription')} + - {translate('workspace.qbo.accountsSwitchDescription')} + {translate('workspace.qbo.accountsSwitchTitle')} - - - + + + + Connections.updatePolicyConnectionConfig( + policyID, + CONST.POLICY.CONNECTIONS.NAME.QBO, + CONST.QUICKBOOKS_IMPORTS.ENABLE_NEW_CATEGORIES, + isSwitchOn ? CONST.INTEGRATION_ENTITY_MAP_TYPES.NONE : CONST.INTEGRATION_ENTITY_MAP_TYPES.TAG, + ) + } + /> + + + + + {translate('workspace.qbo.accountsSwitchDescription')} + + + ); } diff --git a/src/pages/workspace/accounting/qbo/QuickbooksClassesPage.tsx b/src/pages/workspace/accounting/qbo/QuickbooksClassesPage.tsx index c16ba8b687dc..d0407bd264e3 100644 --- a/src/pages/workspace/accounting/qbo/QuickbooksClassesPage.tsx +++ b/src/pages/workspace/accounting/qbo/QuickbooksClassesPage.tsx @@ -11,7 +11,6 @@ import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import * as Connections from '@libs/actions/connections'; import AccessOrNotFoundWrapper from '@pages/workspace/AccessOrNotFoundWrapper'; -import FeatureEnabledAccessOrNotFoundWrapper from '@pages/workspace/FeatureEnabledAccessOrNotFoundWrapper'; import withPolicy from '@pages/workspace/withPolicy'; import type {WithPolicyProps} from '@pages/workspace/withPolicy'; import variables from '@styles/variables'; @@ -29,53 +28,49 @@ function QuickbooksClassesPage({policy}: WithPolicyProps) { - - - - - {translate('workspace.qbo.classesDescription')} - - - {translate('workspace.qbo.import')} - - - - - Connections.updatePolicyConnectionConfig( - policyID, - CONST.POLICY.CONNECTIONS.NAME.QBO, - CONST.QUICKBOOKS_IMPORTS.SYNC_CLASSES, - isSwitchOn ? CONST.INTEGRATION_ENTITY_MAP_TYPES.NONE : CONST.INTEGRATION_ENTITY_MAP_TYPES.TAG, - ) - } - /> - - + + + {translate('workspace.qbo.classesDescription')} + + + {translate('workspace.qbo.import')} - {isSwitchOn && ( - - + + + Connections.updatePolicyConnectionConfig( + policyID, + CONST.POLICY.CONNECTIONS.NAME.QBO, + CONST.QUICKBOOKS_IMPORTS.SYNC_CLASSES, + isSwitchOn ? CONST.INTEGRATION_ENTITY_MAP_TYPES.NONE : CONST.INTEGRATION_ENTITY_MAP_TYPES.TAG, + ) + } /> - - )} - - - + + + + {isSwitchOn && ( + + + + )} + + ); } diff --git a/src/pages/workspace/accounting/qbo/QuickbooksCustomersPage.tsx b/src/pages/workspace/accounting/qbo/QuickbooksCustomersPage.tsx index 05c4a5608e75..ac84448f8796 100644 --- a/src/pages/workspace/accounting/qbo/QuickbooksCustomersPage.tsx +++ b/src/pages/workspace/accounting/qbo/QuickbooksCustomersPage.tsx @@ -11,7 +11,6 @@ import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import * as Connections from '@libs/actions/connections'; import AccessOrNotFoundWrapper from '@pages/workspace/AccessOrNotFoundWrapper'; -import FeatureEnabledAccessOrNotFoundWrapper from '@pages/workspace/FeatureEnabledAccessOrNotFoundWrapper'; import withPolicy from '@pages/workspace/withPolicy'; import type {WithPolicyProps} from '@pages/workspace/withPolicy'; import variables from '@styles/variables'; @@ -28,53 +27,49 @@ function QuickbooksCustomersPage({policy}: WithPolicyProps) { - - - - - {translate('workspace.qbo.customersDescription')} - - - {translate('workspace.qbo.import')} - - - - - Connections.updatePolicyConnectionConfig( - policyID, - CONST.POLICY.CONNECTIONS.NAME.QBO, - CONST.QUICKBOOKS_IMPORTS.SYNC_CUSTOMERS, - isSwitchOn ? CONST.INTEGRATION_ENTITY_MAP_TYPES.NONE : CONST.INTEGRATION_ENTITY_MAP_TYPES.TAG, - ) - } - /> - - + + + {translate('workspace.qbo.customersDescription')} + + + {translate('workspace.qbo.import')} - {isSwitchOn && ( - - + + + Connections.updatePolicyConnectionConfig( + policyID, + CONST.POLICY.CONNECTIONS.NAME.QBO, + CONST.QUICKBOOKS_IMPORTS.SYNC_CUSTOMERS, + isSwitchOn ? CONST.INTEGRATION_ENTITY_MAP_TYPES.NONE : CONST.INTEGRATION_ENTITY_MAP_TYPES.TAG, + ) + } /> - - )} - - - + + + + {isSwitchOn && ( + + + + )} + + ); } diff --git a/src/pages/workspace/accounting/qbo/QuickbooksImportPage.tsx b/src/pages/workspace/accounting/qbo/QuickbooksImportPage.tsx index 04bc26e9ff8c..8d7fc83cde78 100644 --- a/src/pages/workspace/accounting/qbo/QuickbooksImportPage.tsx +++ b/src/pages/workspace/accounting/qbo/QuickbooksImportPage.tsx @@ -9,7 +9,6 @@ import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@navigation/Navigation'; import AccessOrNotFoundWrapper from '@pages/workspace/AccessOrNotFoundWrapper'; -import FeatureEnabledAccessOrNotFoundWrapper from '@pages/workspace/FeatureEnabledAccessOrNotFoundWrapper'; import withPolicy from '@pages/workspace/withPolicy'; import type {WithPolicyProps} from '@pages/workspace/withPolicy'; import CONST from '@src/CONST'; @@ -71,36 +70,32 @@ function QuickbooksImportPage({policy}: WithPolicyProps) { - - - - - {translate('workspace.qbo.importDescription')} - {sections.map((section) => ( - - - - ))} - - - + + + {translate('workspace.qbo.importDescription')} + {sections.map((section) => ( + + + + ))} + + ); } diff --git a/src/pages/workspace/accounting/qbo/QuickbooksLocationsPage.tsx b/src/pages/workspace/accounting/qbo/QuickbooksLocationsPage.tsx index 22d689063b0a..f36e1c950b64 100644 --- a/src/pages/workspace/accounting/qbo/QuickbooksLocationsPage.tsx +++ b/src/pages/workspace/accounting/qbo/QuickbooksLocationsPage.tsx @@ -11,7 +11,6 @@ import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import * as Connections from '@libs/actions/connections'; import AccessOrNotFoundWrapper from '@pages/workspace/AccessOrNotFoundWrapper'; -import FeatureEnabledAccessOrNotFoundWrapper from '@pages/workspace/FeatureEnabledAccessOrNotFoundWrapper'; import withPolicy from '@pages/workspace/withPolicy'; import type {WithPolicyProps} from '@pages/workspace/withPolicy'; import variables from '@styles/variables'; @@ -29,56 +28,52 @@ function QuickbooksLocationsPage({policy}: WithPolicyProps) { - - - - - {translate('workspace.qbo.locationsDescription')} - - - {translate('workspace.qbo.import')} - - - - - Connections.updatePolicyConnectionConfig( - policyID, - CONST.POLICY.CONNECTIONS.NAME.QBO, - CONST.QUICKBOOKS_IMPORTS.SYNC_LOCATIONS, - isSwitchOn ? CONST.INTEGRATION_ENTITY_MAP_TYPES.NONE : CONST.INTEGRATION_ENTITY_MAP_TYPES.TAG, - ) - } - /> - - + + + {translate('workspace.qbo.locationsDescription')} + + + {translate('workspace.qbo.import')} - {isSwitchOn && ( - - + + + Connections.updatePolicyConnectionConfig( + policyID, + CONST.POLICY.CONNECTIONS.NAME.QBO, + CONST.QUICKBOOKS_IMPORTS.SYNC_LOCATIONS, + isSwitchOn ? CONST.INTEGRATION_ENTITY_MAP_TYPES.NONE : CONST.INTEGRATION_ENTITY_MAP_TYPES.TAG, + ) + } /> - - )} - - {translate('workspace.qbo.locationsAdditionalDescription')} - - - - + + + + {isSwitchOn && ( + + + + )} + + {translate('workspace.qbo.locationsAdditionalDescription')} + + + ); } diff --git a/src/pages/workspace/accounting/qbo/QuickbooksTaxesPage.tsx b/src/pages/workspace/accounting/qbo/QuickbooksTaxesPage.tsx index 8745876f33ab..b30af0912544 100644 --- a/src/pages/workspace/accounting/qbo/QuickbooksTaxesPage.tsx +++ b/src/pages/workspace/accounting/qbo/QuickbooksTaxesPage.tsx @@ -10,7 +10,6 @@ import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import * as Connections from '@libs/actions/connections'; import AccessOrNotFoundWrapper from '@pages/workspace/AccessOrNotFoundWrapper'; -import FeatureEnabledAccessOrNotFoundWrapper from '@pages/workspace/FeatureEnabledAccessOrNotFoundWrapper'; import withPolicy from '@pages/workspace/withPolicy'; import type {WithPolicyProps} from '@pages/workspace/withPolicy'; import variables from '@styles/variables'; @@ -26,43 +25,39 @@ function QuickbooksTaxesPage({policy}: WithPolicyProps) { - - - - - {translate('workspace.qbo.taxesDescription')} - - - {translate('workspace.qbo.import')} - - - - - Connections.updatePolicyConnectionConfig( - policyID, - CONST.POLICY.CONNECTIONS.NAME.QBO, - CONST.QUICKBOOKS_IMPORTS.SYNC_TAXES, - isSwitchOn ? CONST.INTEGRATION_ENTITY_MAP_TYPES.NONE : CONST.INTEGRATION_ENTITY_MAP_TYPES.TAG, - ) - } - /> - - + + + {translate('workspace.qbo.taxesDescription')} + + + {translate('workspace.qbo.import')} - - - + + + + Connections.updatePolicyConnectionConfig( + policyID, + CONST.POLICY.CONNECTIONS.NAME.QBO, + CONST.QUICKBOOKS_IMPORTS.SYNC_TAXES, + isSwitchOn ? CONST.INTEGRATION_ENTITY_MAP_TYPES.NONE : CONST.INTEGRATION_ENTITY_MAP_TYPES.TAG, + ) + } + /> + + + + + ); } diff --git a/src/pages/workspace/categories/CategorySettingsPage.tsx b/src/pages/workspace/categories/CategorySettingsPage.tsx index 00ce700ecd36..6bde0a156704 100644 --- a/src/pages/workspace/categories/CategorySettingsPage.tsx +++ b/src/pages/workspace/categories/CategorySettingsPage.tsx @@ -20,7 +20,6 @@ import Navigation from '@libs/Navigation/Navigation'; import type {SettingsNavigatorParamList} from '@navigation/types'; import NotFoundPage from '@pages/ErrorPage/NotFoundPage'; import AccessOrNotFoundWrapper from '@pages/workspace/AccessOrNotFoundWrapper'; -import FeatureEnabledAccessOrNotFoundWrapper from '@pages/workspace/FeatureEnabledAccessOrNotFoundWrapper'; import * as Policy from '@userActions/Policy'; import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; @@ -70,61 +69,60 @@ function CategorySettingsPage({route, policyCategories}: CategorySettingsPagePro ]; return ( - - + - - - setDeleteCategoryConfirmModalVisible(false)} - title={translate('workspace.categories.deleteCategory')} - prompt={translate('workspace.categories.deleteCategoryPrompt')} - confirmText={translate('common.delete')} - cancelText={translate('common.cancel')} - danger - /> - - Policy.clearCategoryErrors(route.params.policyID, route.params.categoryName)} - > - - - {translate('workspace.categories.enableCategory')} - - + + setDeleteCategoryConfirmModalVisible(false)} + title={translate('workspace.categories.deleteCategory')} + prompt={translate('workspace.categories.deleteCategoryPrompt')} + confirmText={translate('common.delete')} + cancelText={translate('common.cancel')} + danger + /> + + Policy.clearCategoryErrors(route.params.policyID, route.params.categoryName)} + > + + + {translate('workspace.categories.enableCategory')} + - - - - - - - + + + + + + + ); } diff --git a/src/pages/workspace/categories/CreateCategoryPage.tsx b/src/pages/workspace/categories/CreateCategoryPage.tsx index 391021e7329d..994bdbe88f93 100644 --- a/src/pages/workspace/categories/CreateCategoryPage.tsx +++ b/src/pages/workspace/categories/CreateCategoryPage.tsx @@ -10,7 +10,6 @@ import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; import type {SettingsNavigatorParamList} from '@navigation/types'; import AccessOrNotFoundWrapper from '@pages/workspace/AccessOrNotFoundWrapper'; -import FeatureEnabledAccessOrNotFoundWrapper from '@pages/workspace/FeatureEnabledAccessOrNotFoundWrapper'; import * as Policy from '@userActions/Policy'; import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; @@ -37,27 +36,26 @@ function CreateCategoryPage({route, policyCategories}: CreateCategoryPageProps) ); return ( - - + - - - - - + + + ); } diff --git a/src/pages/workspace/categories/EditCategoryPage.tsx b/src/pages/workspace/categories/EditCategoryPage.tsx index 27e226f878c2..5ae11da1f541 100644 --- a/src/pages/workspace/categories/EditCategoryPage.tsx +++ b/src/pages/workspace/categories/EditCategoryPage.tsx @@ -10,7 +10,6 @@ import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; import type {SettingsNavigatorParamList} from '@navigation/types'; import AccessOrNotFoundWrapper from '@pages/workspace/AccessOrNotFoundWrapper'; -import FeatureEnabledAccessOrNotFoundWrapper from '@pages/workspace/FeatureEnabledAccessOrNotFoundWrapper'; import * as Policy from '@userActions/Policy'; import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; @@ -59,29 +58,28 @@ function EditCategoryPage({route, policyCategories}: EditCategoryPageProps) { ); return ( - - + - - Navigation.goBack(ROUTES.WORKSPACE_CATEGORY_SETTINGS.getRoute(route.params.policyID, route.params.categoryName))} - /> - - - + Navigation.goBack(ROUTES.WORKSPACE_CATEGORY_SETTINGS.getRoute(route.params.policyID, route.params.categoryName))} + /> + + ); } diff --git a/src/pages/workspace/categories/WorkspaceCategoriesPage.tsx b/src/pages/workspace/categories/WorkspaceCategoriesPage.tsx index c7accdd79ed6..ebb371c81fba 100644 --- a/src/pages/workspace/categories/WorkspaceCategoriesPage.tsx +++ b/src/pages/workspace/categories/WorkspaceCategoriesPage.tsx @@ -30,7 +30,6 @@ import Navigation from '@libs/Navigation/Navigation'; import * as PolicyUtils from '@libs/PolicyUtils'; import type {WorkspacesCentralPaneNavigatorParamList} from '@navigation/types'; import AccessOrNotFoundWrapper from '@pages/workspace/AccessOrNotFoundWrapper'; -import FeatureEnabledAccessOrNotFoundWrapper from '@pages/workspace/FeatureEnabledAccessOrNotFoundWrapper'; import * as Policy from '@userActions/Policy'; import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; @@ -247,70 +246,69 @@ function WorkspaceCategoriesPage({policy, policyCategories, route}: WorkspaceCat const shouldShowEmptyState = !categoryList.some((category) => category.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE) && !isLoading; return ( - - + - - - {!isSmallScreenWidth && getHeaderButtons()} - - setDeleteCategoriesConfirmModalVisible(false)} - title={translate(selectedCategoriesArray.length === 1 ? 'workspace.categories.deleteCategory' : 'workspace.categories.deleteCategories')} - prompt={translate(selectedCategoriesArray.length === 1 ? 'workspace.categories.deleteCategoryPrompt' : 'workspace.categories.deleteCategoriesPrompt')} - confirmText={translate('common.delete')} - cancelText={translate('common.cancel')} - danger + {!isSmallScreenWidth && getHeaderButtons()} + + setDeleteCategoriesConfirmModalVisible(false)} + title={translate(selectedCategoriesArray.length === 1 ? 'workspace.categories.deleteCategory' : 'workspace.categories.deleteCategories')} + prompt={translate(selectedCategoriesArray.length === 1 ? 'workspace.categories.deleteCategoryPrompt' : 'workspace.categories.deleteCategoriesPrompt')} + confirmText={translate('common.delete')} + cancelText={translate('common.cancel')} + danger + /> + {isSmallScreenWidth && {getHeaderButtons()}} + + {translate('workspace.categories.subtitle')} + + {isLoading && ( + + )} + {shouldShowEmptyState && ( + - {isSmallScreenWidth && {getHeaderButtons()}} - - {translate('workspace.categories.subtitle')} - - {isLoading && ( - - )} - {shouldShowEmptyState && ( - - )} - {!shouldShowEmptyState && !isLoading && ( - - )} - - + )} + {!shouldShowEmptyState && !isLoading && ( + + )} + ); } diff --git a/src/pages/workspace/categories/WorkspaceCategoriesSettingsPage.tsx b/src/pages/workspace/categories/WorkspaceCategoriesSettingsPage.tsx index 2a5af39a5337..c377b8c3505d 100644 --- a/src/pages/workspace/categories/WorkspaceCategoriesSettingsPage.tsx +++ b/src/pages/workspace/categories/WorkspaceCategoriesSettingsPage.tsx @@ -14,7 +14,6 @@ import {setWorkspaceRequiresCategory} from '@libs/actions/Policy'; import * as OptionsListUtils from '@libs/OptionsListUtils'; import type {SettingsNavigatorParamList} from '@navigation/types'; import AccessOrNotFoundWrapper from '@pages/workspace/AccessOrNotFoundWrapper'; -import FeatureEnabledAccessOrNotFoundWrapper from '@pages/workspace/FeatureEnabledAccessOrNotFoundWrapper'; import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; import type SCREENS from '@src/SCREENS'; @@ -37,40 +36,39 @@ function WorkspaceCategoriesSettingsPage({route, policyCategories}: WorkspaceCat const hasEnabledOptions = OptionsListUtils.hasEnabledOptions(policyCategories ?? {}); return ( - - - {({policy}) => ( - - - - - - - {translate('workspace.categories.requiresCategory')} - - + + {({policy}) => ( + + + + + + + {translate('workspace.categories.requiresCategory')} + - - - - )} - + + + + + )} ); } diff --git a/src/pages/workspace/distanceRates/CreateDistanceRatePage.tsx b/src/pages/workspace/distanceRates/CreateDistanceRatePage.tsx index 228a64d4a2ee..3e16d49284fa 100644 --- a/src/pages/workspace/distanceRates/CreateDistanceRatePage.tsx +++ b/src/pages/workspace/distanceRates/CreateDistanceRatePage.tsx @@ -15,7 +15,6 @@ import {getOptimisticRateName, validateRateValue} from '@libs/PolicyDistanceRate import Navigation from '@navigation/Navigation'; import type {SettingsNavigatorParamList} from '@navigation/types'; import AccessOrNotFoundWrapper from '@pages/workspace/AccessOrNotFoundWrapper'; -import FeatureEnabledAccessOrNotFoundWrapper from '@pages/workspace/FeatureEnabledAccessOrNotFoundWrapper'; import {createPolicyDistanceRate, generateCustomUnitID} from '@userActions/Policy'; import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; @@ -59,41 +58,40 @@ function CreateDistanceRatePage({policy, route}: CreateDistanceRatePageProps) { }; return ( - - + - + - - - - - - + + + ); } diff --git a/src/pages/workspace/distanceRates/PolicyDistanceRateDetailsPage.tsx b/src/pages/workspace/distanceRates/PolicyDistanceRateDetailsPage.tsx index 7e215054b1b6..3e2558385266 100644 --- a/src/pages/workspace/distanceRates/PolicyDistanceRateDetailsPage.tsx +++ b/src/pages/workspace/distanceRates/PolicyDistanceRateDetailsPage.tsx @@ -19,7 +19,6 @@ import * as ErrorUtils from '@libs/ErrorUtils'; import Navigation from '@libs/Navigation/Navigation'; import type {SettingsNavigatorParamList} from '@navigation/types'; import AccessOrNotFoundWrapper from '@pages/workspace/AccessOrNotFoundWrapper'; -import FeatureEnabledAccessOrNotFoundWrapper from '@pages/workspace/FeatureEnabledAccessOrNotFoundWrapper'; import * as Policy from '@userActions/Policy'; import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; @@ -92,74 +91,73 @@ function PolicyDistanceRateDetailsPage({policy, route}: PolicyDistanceRateDetail }; return ( - - + - - - - clearErrorFields('enabled')} - > - - {translate('workspace.distanceRates.enableRate')} - - - - clearErrorFields('rate')} - > - + + clearErrorFields('enabled')} + > + + {translate('workspace.distanceRates.enableRate')} + - - setIsWarningModalVisible(false)} - isVisible={isWarningModalVisible} - title={translate('workspace.distanceRates.oopsNotSoFast')} - prompt={translate('workspace.distanceRates.workspaceNeeds')} - confirmText={translate('common.buttonConfirm')} - shouldShowCancelButton={false} - /> - setIsDeleteModalVisible(false)} - prompt={translate('workspace.distanceRates.areYouSureDelete', {count: 1})} - confirmText={translate('common.delete')} - cancelText={translate('common.cancel')} - danger + + + clearErrorFields('rate')} + > + - - - + + setIsWarningModalVisible(false)} + isVisible={isWarningModalVisible} + title={translate('workspace.distanceRates.oopsNotSoFast')} + prompt={translate('workspace.distanceRates.workspaceNeeds')} + confirmText={translate('common.buttonConfirm')} + shouldShowCancelButton={false} + /> + setIsDeleteModalVisible(false)} + prompt={translate('workspace.distanceRates.areYouSureDelete', {count: 1})} + confirmText={translate('common.delete')} + cancelText={translate('common.cancel')} + danger + /> + + ); } diff --git a/src/pages/workspace/distanceRates/PolicyDistanceRateEditPage.tsx b/src/pages/workspace/distanceRates/PolicyDistanceRateEditPage.tsx index 805a0b4b111b..9517c94dfaa4 100644 --- a/src/pages/workspace/distanceRates/PolicyDistanceRateEditPage.tsx +++ b/src/pages/workspace/distanceRates/PolicyDistanceRateEditPage.tsx @@ -16,7 +16,6 @@ import Navigation from '@libs/Navigation/Navigation'; import {validateRateValue} from '@libs/PolicyDistanceRatesUtils'; import type {SettingsNavigatorParamList} from '@navigation/types'; import AccessOrNotFoundWrapper from '@pages/workspace/AccessOrNotFoundWrapper'; -import FeatureEnabledAccessOrNotFoundWrapper from '@pages/workspace/FeatureEnabledAccessOrNotFoundWrapper'; import * as Policy from '@userActions/Policy'; import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; @@ -56,46 +55,45 @@ function PolicyDistanceRateEditPage({policy, route}: PolicyDistanceRateEditPageP ); return ( - - + - Navigation.goBack()} + /> + - Navigation.goBack()} + - - - - - + + ); } diff --git a/src/pages/workspace/distanceRates/PolicyDistanceRatesPage.tsx b/src/pages/workspace/distanceRates/PolicyDistanceRatesPage.tsx index 768bfdadcb8a..0127de46feef 100644 --- a/src/pages/workspace/distanceRates/PolicyDistanceRatesPage.tsx +++ b/src/pages/workspace/distanceRates/PolicyDistanceRatesPage.tsx @@ -26,7 +26,6 @@ import * as DeviceCapabilities from '@libs/DeviceCapabilities'; import Navigation from '@libs/Navigation/Navigation'; import type {WorkspacesCentralPaneNavigatorParamList} from '@navigation/types'; import AccessOrNotFoundWrapper from '@pages/workspace/AccessOrNotFoundWrapper'; -import FeatureEnabledAccessOrNotFoundWrapper from '@pages/workspace/FeatureEnabledAccessOrNotFoundWrapper'; import * as Policy from '@userActions/Policy'; import ButtonWithDropdownMenu from '@src/components/ButtonWithDropdownMenu'; import CONST from '@src/CONST'; @@ -265,70 +264,69 @@ function PolicyDistanceRatesPage({policy, route}: PolicyDistanceRatesPageProps) ); return ( - - + - - - {!isSmallScreenWidth && headerButtons} - - {isSmallScreenWidth && {headerButtons}} - - {translate('workspace.distanceRates.centrallyManage')} - - {isLoading && ( - - )} - {Object.values(customUnitRates).length > 0 && ( - - )} - setIsWarningModalVisible(false)} - isVisible={isWarningModalVisible} - title={translate('workspace.distanceRates.oopsNotSoFast')} - prompt={translate('workspace.distanceRates.workspaceNeeds')} - confirmText={translate('common.buttonConfirm')} - shouldShowCancelButton={false} + {!isSmallScreenWidth && headerButtons} + + {isSmallScreenWidth && {headerButtons}} + + {translate('workspace.distanceRates.centrallyManage')} + + {isLoading && ( + - setIsDeleteModalVisible(false)} - prompt={translate('workspace.distanceRates.areYouSureDelete', {count: selectedDistanceRates.length})} - confirmText={translate('common.delete')} - cancelText={translate('common.cancel')} - danger + )} + {Object.values(customUnitRates).length > 0 && ( + - - + )} + setIsWarningModalVisible(false)} + isVisible={isWarningModalVisible} + title={translate('workspace.distanceRates.oopsNotSoFast')} + prompt={translate('workspace.distanceRates.workspaceNeeds')} + confirmText={translate('common.buttonConfirm')} + shouldShowCancelButton={false} + /> + setIsDeleteModalVisible(false)} + prompt={translate('workspace.distanceRates.areYouSureDelete', {count: selectedDistanceRates.length})} + confirmText={translate('common.delete')} + cancelText={translate('common.cancel')} + danger + /> + ); } diff --git a/src/pages/workspace/distanceRates/PolicyDistanceRatesSettingsPage.tsx b/src/pages/workspace/distanceRates/PolicyDistanceRatesSettingsPage.tsx index d99b15bb857e..4af3d96da8a7 100644 --- a/src/pages/workspace/distanceRates/PolicyDistanceRatesSettingsPage.tsx +++ b/src/pages/workspace/distanceRates/PolicyDistanceRatesSettingsPage.tsx @@ -14,7 +14,6 @@ import * as ErrorUtils from '@libs/ErrorUtils'; import * as OptionsListUtils from '@libs/OptionsListUtils'; import type {SettingsNavigatorParamList} from '@navigation/types'; import AccessOrNotFoundWrapper from '@pages/workspace/AccessOrNotFoundWrapper'; -import FeatureEnabledAccessOrNotFoundWrapper from '@pages/workspace/FeatureEnabledAccessOrNotFoundWrapper'; import * as Policy from '@userActions/Policy'; import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; @@ -67,50 +66,49 @@ function PolicyDistanceRatesSettingsPage({policy, policyCategories, route}: Poli }; return ( - - + - - - + + + clearErrorFields('attributes')} + > + + + {policy?.areCategoriesEnabled && OptionsListUtils.hasEnabledOptions(policyCategories ?? {}) && ( clearErrorFields('attributes')} + onClose={() => clearErrorFields('defaultCategory')} > - - {policy?.areCategoriesEnabled && OptionsListUtils.hasEnabledOptions(policyCategories ?? {}) && ( - clearErrorFields('defaultCategory')} - > - - - )} - - - + )} + + ); } diff --git a/src/pages/workspace/members/WorkspaceMemberDetailsPage.tsx b/src/pages/workspace/members/WorkspaceMemberDetailsPage.tsx index d9151e87553e..7c16a705d89f 100644 --- a/src/pages/workspace/members/WorkspaceMemberDetailsPage.tsx +++ b/src/pages/workspace/members/WorkspaceMemberDetailsPage.tsx @@ -128,7 +128,10 @@ function WorkspaceMemberDetailsPage({personalDetails, policy, route}: WorkspaceM }, [accountID, policyID]); return ( - + + + + - + - + - - - - - - + + ); } diff --git a/src/pages/workspace/tags/TagSettingsPage.tsx b/src/pages/workspace/tags/TagSettingsPage.tsx index 827487666fb4..f915722f0d1b 100644 --- a/src/pages/workspace/tags/TagSettingsPage.tsx +++ b/src/pages/workspace/tags/TagSettingsPage.tsx @@ -21,7 +21,6 @@ import * as PolicyUtils from '@libs/PolicyUtils'; import type {SettingsNavigatorParamList} from '@navigation/types'; import NotFoundPage from '@pages/ErrorPage/NotFoundPage'; import AccessOrNotFoundWrapper from '@pages/workspace/AccessOrNotFoundWrapper'; -import FeatureEnabledAccessOrNotFoundWrapper from '@pages/workspace/FeatureEnabledAccessOrNotFoundWrapper'; import * as Policy from '@userActions/Policy'; import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; @@ -66,69 +65,68 @@ function TagSettingsPage({route, policyTags}: TagSettingsPageProps) { }; return ( - - + - - setIsDeleteTagModalOpen(true), - }, - ]} - /> - setIsDeleteTagModalOpen(false)} - shouldSetModalVisibility={false} - prompt={translate('workspace.tags.deleteTagConfirmation')} - confirmText={translate('common.delete')} - cancelText={translate('common.cancel')} - danger - /> - - Policy.clearPolicyTagErrors(route.params.policyID, route.params.tagName)} - > - - - {translate('workspace.tags.enableTag')} - - + setIsDeleteTagModalOpen(true), + }, + ]} + /> + setIsDeleteTagModalOpen(false)} + shouldSetModalVisibility={false} + prompt={translate('workspace.tags.deleteTagConfirmation')} + confirmText={translate('common.delete')} + cancelText={translate('common.cancel')} + danger + /> + + Policy.clearPolicyTagErrors(route.params.policyID, route.params.tagName)} + > + + + {translate('workspace.tags.enableTag')} + - - - - - - - + + + + + + + ); } diff --git a/src/pages/workspace/tags/WorkspaceCreateTagPage.tsx b/src/pages/workspace/tags/WorkspaceCreateTagPage.tsx index 1c4718d93d82..ffc8f3e2c33e 100644 --- a/src/pages/workspace/tags/WorkspaceCreateTagPage.tsx +++ b/src/pages/workspace/tags/WorkspaceCreateTagPage.tsx @@ -18,7 +18,6 @@ import * as PolicyUtils from '@libs/PolicyUtils'; import * as ValidationUtils from '@libs/ValidationUtils'; import type {SettingsNavigatorParamList} from '@navigation/types'; import AccessOrNotFoundWrapper from '@pages/workspace/AccessOrNotFoundWrapper'; -import FeatureEnabledAccessOrNotFoundWrapper from '@pages/workspace/FeatureEnabledAccessOrNotFoundWrapper'; import * as Policy from '@userActions/Policy'; import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; @@ -68,41 +67,40 @@ function CreateTagPage({route, policyTags}: CreateTagPageProps) { ); return ( - - + - + - - - - - - + + ); } diff --git a/src/pages/workspace/tags/WorkspaceEditTagsPage.tsx b/src/pages/workspace/tags/WorkspaceEditTagsPage.tsx index 202d8bacbbd1..ee50e3bd4c95 100644 --- a/src/pages/workspace/tags/WorkspaceEditTagsPage.tsx +++ b/src/pages/workspace/tags/WorkspaceEditTagsPage.tsx @@ -17,7 +17,6 @@ import Navigation from '@libs/Navigation/Navigation'; import * as PolicyUtils from '@libs/PolicyUtils'; import type {SettingsNavigatorParamList} from '@navigation/types'; import AccessOrNotFoundWrapper from '@pages/workspace/AccessOrNotFoundWrapper'; -import FeatureEnabledAccessOrNotFoundWrapper from '@pages/workspace/FeatureEnabledAccessOrNotFoundWrapper'; import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; import type SCREENS from '@src/SCREENS'; @@ -56,39 +55,38 @@ function WorkspaceEditTagsPage({route, policyTags}: WorkspaceEditTagsPageProps) ); return ( - - + - + - - - - - - - - + + + + + ); } diff --git a/src/pages/workspace/tags/WorkspaceTagsPage.tsx b/src/pages/workspace/tags/WorkspaceTagsPage.tsx index 66ed33ad8237..db892131c792 100644 --- a/src/pages/workspace/tags/WorkspaceTagsPage.tsx +++ b/src/pages/workspace/tags/WorkspaceTagsPage.tsx @@ -256,70 +256,69 @@ function WorkspaceTagsPage({policyTags, route}: WorkspaceTagsPageProps) { }; return ( - - + - - - {!isSmallScreenWidth && getHeaderButtons()} - - setDeleteTagsConfirmModalVisible(false)} - title={translate(selectedTagsArray.length === 1 ? 'workspace.tags.deleteTag' : 'workspace.tags.deleteTags')} - prompt={translate(selectedTagsArray.length === 1 ? 'workspace.tags.deleteTagConfirmation' : 'workspace.tags.deleteTagsConfirmation')} - confirmText={translate('common.delete')} - cancelText={translate('common.cancel')} - danger + {!isSmallScreenWidth && getHeaderButtons()} + + setDeleteTagsConfirmModalVisible(false)} + title={translate(selectedTagsArray.length === 1 ? 'workspace.tags.deleteTag' : 'workspace.tags.deleteTags')} + prompt={translate(selectedTagsArray.length === 1 ? 'workspace.tags.deleteTagConfirmation' : 'workspace.tags.deleteTagsConfirmation')} + confirmText={translate('common.delete')} + cancelText={translate('common.cancel')} + danger + /> + {isSmallScreenWidth && {getHeaderButtons()}} + + {translate('workspace.tags.subtitle')} + + {isLoading && ( + + )} + {tagList.length === 0 && !isLoading && ( + - {isSmallScreenWidth && {getHeaderButtons()}} - - {translate('workspace.tags.subtitle')} - - {isLoading && ( - - )} - {tagList.length === 0 && !isLoading && ( - - )} - {tagList.length > 0 && !isLoading && ( - Policy.clearPolicyTagErrors(route.params.policyID, item.value)} - /> - )} - - + )} + {tagList.length > 0 && !isLoading && ( + Policy.clearPolicyTagErrors(route.params.policyID, item.value)} + /> + )} + ); } diff --git a/src/pages/workspace/tags/WorkspaceTagsSettingsPage.tsx b/src/pages/workspace/tags/WorkspaceTagsSettingsPage.tsx index e82e11588ebb..8c26d80b8ed5 100644 --- a/src/pages/workspace/tags/WorkspaceTagsSettingsPage.tsx +++ b/src/pages/workspace/tags/WorkspaceTagsSettingsPage.tsx @@ -16,7 +16,6 @@ import Navigation from '@libs/Navigation/Navigation'; import * as PolicyUtils from '@libs/PolicyUtils'; import type {SettingsNavigatorParamList} from '@navigation/types'; import AccessOrNotFoundWrapper from '@pages/workspace/AccessOrNotFoundWrapper'; -import FeatureEnabledAccessOrNotFoundWrapper from '@pages/workspace/FeatureEnabledAccessOrNotFoundWrapper'; import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; import ROUTES from '@src/ROUTES'; @@ -41,51 +40,50 @@ function WorkspaceTagsSettingsPage({route, policyTags}: WorkspaceTagsSettingsPag [route.params.policyID], ); return ( - - - {({policy}) => ( - - - - - - - {translate('workspace.tags.requiresTag')} - - + + {({policy}) => ( + + + + + + + {translate('workspace.tags.requiresTag')} + - - - Navigation.navigate(ROUTES.WORKSPACE_EDIT_TAGS.getRoute(route.params.policyID))} - shouldShowRightIcon - /> - - - - )} - + + + + Navigation.navigate(ROUTES.WORKSPACE_EDIT_TAGS.getRoute(route.params.policyID))} + shouldShowRightIcon + /> + + + + )} ); } diff --git a/src/pages/workspace/taxes/NamePage.tsx b/src/pages/workspace/taxes/NamePage.tsx index ee52b7273c8f..f42d6f7c9a21 100644 --- a/src/pages/workspace/taxes/NamePage.tsx +++ b/src/pages/workspace/taxes/NamePage.tsx @@ -17,7 +17,6 @@ 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 FeatureEnabledAccessOrNotFoundWrapper from '@pages/workspace/FeatureEnabledAccessOrNotFoundWrapper'; import type {WithPolicyAndFullscreenLoadingProps} from '@pages/workspace/withPolicyAndFullscreenLoading'; import withPolicyAndFullscreenLoading from '@pages/workspace/withPolicyAndFullscreenLoading'; import CONST from '@src/CONST'; @@ -68,45 +67,44 @@ function NamePage({ } return ( - - + - - + - - - - - - - + + + + + + ); } diff --git a/src/pages/workspace/taxes/ValuePage.tsx b/src/pages/workspace/taxes/ValuePage.tsx index 90b9eda860c4..c241ee8fba1b 100644 --- a/src/pages/workspace/taxes/ValuePage.tsx +++ b/src/pages/workspace/taxes/ValuePage.tsx @@ -16,7 +16,6 @@ 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 FeatureEnabledAccessOrNotFoundWrapper from '@pages/workspace/FeatureEnabledAccessOrNotFoundWrapper'; import type {WithPolicyAndFullscreenLoadingProps} from '@pages/workspace/withPolicyAndFullscreenLoading'; import withPolicyAndFullscreenLoading from '@pages/workspace/withPolicyAndFullscreenLoading'; import CONST from '@src/CONST'; @@ -54,49 +53,48 @@ function ValuePage({ } return ( - - + - + + - %} + ref={inputCallbackRef} /> - - - %} - ref={inputCallbackRef} - /> - - - + + ); } diff --git a/src/pages/workspace/taxes/WorkspaceCreateTaxPage.tsx b/src/pages/workspace/taxes/WorkspaceCreateTaxPage.tsx index 3b75664fd23a..121d32e1662b 100644 --- a/src/pages/workspace/taxes/WorkspaceCreateTaxPage.tsx +++ b/src/pages/workspace/taxes/WorkspaceCreateTaxPage.tsx @@ -15,7 +15,6 @@ import {createPolicyTax, getNextTaxCode, getTaxValueWithPercentage, validateTaxN import Navigation from '@libs/Navigation/Navigation'; import type {SettingsNavigatorParamList} from '@libs/Navigation/types'; import AccessOrNotFoundWrapper from '@pages/workspace/AccessOrNotFoundWrapper'; -import FeatureEnabledAccessOrNotFoundWrapper from '@pages/workspace/FeatureEnabledAccessOrNotFoundWrapper'; import type {WithPolicyAndFullscreenLoadingProps} from '@pages/workspace/withPolicyAndFullscreenLoading'; import withPolicyAndFullscreenLoading from '@pages/workspace/withPolicyAndFullscreenLoading'; import CONST from '@src/CONST'; @@ -62,59 +61,58 @@ function WorkspaceCreateTaxPage({ ); return ( - - + - - - - - - - (v ? getTaxValueWithPercentage(v) : '')} - description={translate('workspace.taxes.value')} - rightLabel={translate('common.required')} - hideCurrencySymbol - // The default currency uses 2 decimal places, so we substract it - extraDecimals={CONST.MAX_TAX_RATE_DECIMAL_PLACES - 2} - // We increase the amount max length to support the extra decimals. - amountMaxLength={CONST.MAX_TAX_RATE_DECIMAL_PLACES + CONST.MAX_TAX_RATE_INTEGER_PLACES} - extraSymbol={%} - /> - - - - - + + + + + + (v ? getTaxValueWithPercentage(v) : '')} + description={translate('workspace.taxes.value')} + rightLabel={translate('common.required')} + hideCurrencySymbol + // The default currency uses 2 decimal places, so we substract it + extraDecimals={CONST.MAX_TAX_RATE_DECIMAL_PLACES - 2} + // We increase the amount max length to support the extra decimals. + amountMaxLength={CONST.MAX_TAX_RATE_DECIMAL_PLACES + CONST.MAX_TAX_RATE_INTEGER_PLACES} + extraSymbol={%} + /> + + + + ); } diff --git a/src/pages/workspace/taxes/WorkspaceEditTaxPage.tsx b/src/pages/workspace/taxes/WorkspaceEditTaxPage.tsx index 649ccf7579a9..d4f46fbc2dd6 100644 --- a/src/pages/workspace/taxes/WorkspaceEditTaxPage.tsx +++ b/src/pages/workspace/taxes/WorkspaceEditTaxPage.tsx @@ -20,7 +20,6 @@ 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 FeatureEnabledAccessOrNotFoundWrapper from '@pages/workspace/FeatureEnabledAccessOrNotFoundWrapper'; import type {WithPolicyAndFullscreenLoadingProps} from '@pages/workspace/withPolicyAndFullscreenLoading'; import withPolicyAndFullscreenLoading from '@pages/workspace/withPolicyAndFullscreenLoading'; import CONST from '@src/CONST'; @@ -74,83 +73,82 @@ function WorkspaceEditTaxPage({ } return ( - - + - - - + + clearTaxRateFieldError(policyID, taxID, 'isDisabled')} + > + + + {translate('workspace.taxes.actions.enable')} + + + + + clearTaxRateFieldError(policyID, taxID, 'name')} + > + Navigation.navigate(ROUTES.WORKSPACE_TAX_NAME.getRoute(`${policyID}`, taxID))} /> - clearTaxRateFieldError(policyID, taxID, 'isDisabled')} - > - - - {translate('workspace.taxes.actions.enable')} - - - - - clearTaxRateFieldError(policyID, taxID, 'name')} - > - Navigation.navigate(ROUTES.WORKSPACE_TAX_NAME.getRoute(`${policyID}`, taxID))} - /> - - clearTaxRateFieldError(policyID, taxID, 'value')} - > - Navigation.navigate(ROUTES.WORKSPACE_TAX_VALUE.getRoute(`${policyID}`, taxID))} - /> - - - setIsDeleteModalVisible(false)} - prompt={translate('workspace.taxes.deleteTaxConfirmation')} - confirmText={translate('common.delete')} - cancelText={translate('common.cancel')} - danger - /> - - + + clearTaxRateFieldError(policyID, taxID, 'value')} + > + Navigation.navigate(ROUTES.WORKSPACE_TAX_VALUE.getRoute(`${policyID}`, taxID))} + /> + + + setIsDeleteModalVisible(false)} + prompt={translate('workspace.taxes.deleteTaxConfirmation')} + confirmText={translate('common.delete')} + cancelText={translate('common.cancel')} + danger + /> + ); } diff --git a/src/pages/workspace/taxes/WorkspaceTaxesPage.tsx b/src/pages/workspace/taxes/WorkspaceTaxesPage.tsx index afcb7ac08792..d1b6ad50bf3d 100644 --- a/src/pages/workspace/taxes/WorkspaceTaxesPage.tsx +++ b/src/pages/workspace/taxes/WorkspaceTaxesPage.tsx @@ -28,7 +28,6 @@ import Navigation from '@libs/Navigation/Navigation'; import * as PolicyUtils from '@libs/PolicyUtils'; import type {WorkspacesCentralPaneNavigatorParamList} from '@navigation/types'; import AccessOrNotFoundWrapper from '@pages/workspace/AccessOrNotFoundWrapper'; -import FeatureEnabledAccessOrNotFoundWrapper from '@pages/workspace/FeatureEnabledAccessOrNotFoundWrapper'; import withPolicyAndFullscreenLoading from '@pages/workspace/withPolicyAndFullscreenLoading'; import type {WithPolicyAndFullscreenLoadingProps} from '@pages/workspace/withPolicyAndFullscreenLoading'; import CONST from '@src/CONST'; @@ -237,66 +236,65 @@ function WorkspaceTaxesPage({ ); return ( - - + - - - {!isSmallScreenWidth && headerButtons} - + {!isSmallScreenWidth && headerButtons} + - {isSmallScreenWidth && {headerButtons}} + {isSmallScreenWidth && {headerButtons}} - - {translate('workspace.taxes.subtitle')} - - {isLoading && ( - - )} - (item.keyForList ? clearTaxRateError(policyID, item.keyForList, item.pendingAction) : undefined)} + + {translate('workspace.taxes.subtitle')} + + {isLoading && ( + - setIsDeleteModalVisible(false)} - prompt={ - selectedTaxesIDs.length > 1 - ? translate('workspace.taxes.deleteMultipleTaxConfirmation', {taxAmount: selectedTaxesIDs.length}) - : translate('workspace.taxes.deleteTaxConfirmation') - } - confirmText={translate('common.delete')} - cancelText={translate('common.cancel')} - danger - /> - - + )} + (item.keyForList ? clearTaxRateError(policyID, item.keyForList, item.pendingAction) : undefined)} + /> + setIsDeleteModalVisible(false)} + prompt={ + selectedTaxesIDs.length > 1 + ? translate('workspace.taxes.deleteMultipleTaxConfirmation', {taxAmount: selectedTaxesIDs.length}) + : translate('workspace.taxes.deleteTaxConfirmation') + } + confirmText={translate('common.delete')} + cancelText={translate('common.cancel')} + danger + /> + ); } diff --git a/src/pages/workspace/taxes/WorkspaceTaxesSettingsCustomTaxName.tsx b/src/pages/workspace/taxes/WorkspaceTaxesSettingsCustomTaxName.tsx index 073cd1b7adab..d5cb1c9d31e9 100644 --- a/src/pages/workspace/taxes/WorkspaceTaxesSettingsCustomTaxName.tsx +++ b/src/pages/workspace/taxes/WorkspaceTaxesSettingsCustomTaxName.tsx @@ -15,7 +15,6 @@ import Navigation from '@libs/Navigation/Navigation'; import type {SettingsNavigatorParamList} from '@libs/Navigation/types'; import * as ValidationUtils from '@libs/ValidationUtils'; import AccessOrNotFoundWrapper from '@pages/workspace/AccessOrNotFoundWrapper'; -import FeatureEnabledAccessOrNotFoundWrapper from '@pages/workspace/FeatureEnabledAccessOrNotFoundWrapper'; import type {WithPolicyAndFullscreenLoadingProps} from '@pages/workspace/withPolicyAndFullscreenLoading'; import withPolicyAndFullscreenLoading from '@pages/workspace/withPolicyAndFullscreenLoading'; import CONST from '@src/CONST'; @@ -54,44 +53,43 @@ function WorkspaceTaxesSettingsCustomTaxName({ }; return ( - - + - - + - - - - - - - + + + + + + ); } diff --git a/src/pages/workspace/taxes/WorkspaceTaxesSettingsForeignCurrency.tsx b/src/pages/workspace/taxes/WorkspaceTaxesSettingsForeignCurrency.tsx index d7aba1fa36a8..ebc756da5622 100644 --- a/src/pages/workspace/taxes/WorkspaceTaxesSettingsForeignCurrency.tsx +++ b/src/pages/workspace/taxes/WorkspaceTaxesSettingsForeignCurrency.tsx @@ -12,7 +12,6 @@ import type {SettingsNavigatorParamList} from '@libs/Navigation/types'; import type * as OptionsListUtils from '@libs/OptionsListUtils'; import * as TransactionUtils from '@libs/TransactionUtils'; import AccessOrNotFoundWrapper from '@pages/workspace/AccessOrNotFoundWrapper'; -import FeatureEnabledAccessOrNotFoundWrapper from '@pages/workspace/FeatureEnabledAccessOrNotFoundWrapper'; import type {WithPolicyAndFullscreenLoadingProps} from '@pages/workspace/withPolicyAndFullscreenLoading'; import withPolicyAndFullscreenLoading from '@pages/workspace/withPolicyAndFullscreenLoading'; import CONST from '@src/CONST'; @@ -43,33 +42,32 @@ function WorkspaceTaxesSettingsForeignCurrency({ }; return ( - - + - - {({insets}) => ( - <> - + {({insets}) => ( + <> + - - - - - )} - - + + + + + )} + ); } diff --git a/src/pages/workspace/taxes/WorkspaceTaxesSettingsPage.tsx b/src/pages/workspace/taxes/WorkspaceTaxesSettingsPage.tsx index 3ee015b6ad77..bb0f48f2daae 100644 --- a/src/pages/workspace/taxes/WorkspaceTaxesSettingsPage.tsx +++ b/src/pages/workspace/taxes/WorkspaceTaxesSettingsPage.tsx @@ -11,7 +11,6 @@ import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; import type {SettingsNavigatorParamList} from '@libs/Navigation/types'; import AccessOrNotFoundWrapper from '@pages/workspace/AccessOrNotFoundWrapper'; -import FeatureEnabledAccessOrNotFoundWrapper from '@pages/workspace/FeatureEnabledAccessOrNotFoundWrapper'; import withPolicyAndFullscreenLoading from '@pages/workspace/withPolicyAndFullscreenLoading'; import type {WithPolicyAndFullscreenLoadingProps} from '@pages/workspace/withPolicyAndFullscreenLoading'; import CONST from '@src/CONST'; @@ -54,37 +53,36 @@ function WorkspaceTaxesSettingsPage({ ); return ( - - + - - - - - {menuItems.map((item) => ( - - - - ))} - - - - + + + + {menuItems.map((item) => ( + + + + ))} + + + ); } diff --git a/src/pages/workspace/taxes/WorkspaceTaxesSettingsWorkspaceCurrency.tsx b/src/pages/workspace/taxes/WorkspaceTaxesSettingsWorkspaceCurrency.tsx index 78f0b9bb5904..1113ed3268a8 100644 --- a/src/pages/workspace/taxes/WorkspaceTaxesSettingsWorkspaceCurrency.tsx +++ b/src/pages/workspace/taxes/WorkspaceTaxesSettingsWorkspaceCurrency.tsx @@ -12,7 +12,6 @@ import type {SettingsNavigatorParamList} from '@libs/Navigation/types'; import type * as OptionsListUtils from '@libs/OptionsListUtils'; import * as TransactionUtils from '@libs/TransactionUtils'; import AccessOrNotFoundWrapper from '@pages/workspace/AccessOrNotFoundWrapper'; -import FeatureEnabledAccessOrNotFoundWrapper from '@pages/workspace/FeatureEnabledAccessOrNotFoundWrapper'; import type {WithPolicyAndFullscreenLoadingProps} from '@pages/workspace/withPolicyAndFullscreenLoading'; import withPolicyAndFullscreenLoading from '@pages/workspace/withPolicyAndFullscreenLoading'; import CONST from '@src/CONST'; @@ -39,33 +38,32 @@ function WorkspaceTaxesSettingsWorkspaceCurrency({ }; return ( - - + - - {({insets}) => ( - <> - + {({insets}) => ( + <> + - - - - - )} - - + + + + + )} + ); } diff --git a/src/pages/workspace/workflows/WorkspaceAutoReportingFrequencyPage.tsx b/src/pages/workspace/workflows/WorkspaceAutoReportingFrequencyPage.tsx index 5d2297f47ddd..07553baba356 100644 --- a/src/pages/workspace/workflows/WorkspaceAutoReportingFrequencyPage.tsx +++ b/src/pages/workspace/workflows/WorkspaceAutoReportingFrequencyPage.tsx @@ -15,7 +15,7 @@ import * as Localize from '@libs/Localize'; import Navigation from '@libs/Navigation/Navigation'; import type {WorkspacesCentralPaneNavigatorParamList} from '@libs/Navigation/types'; import * as PolicyUtils from '@libs/PolicyUtils'; -import FeatureEnabledAccessOrNotFoundWrapper from '@pages/workspace/FeatureEnabledAccessOrNotFoundWrapper'; +import AccessOrNotFoundWrapper from '@pages/workspace/AccessOrNotFoundWrapper'; import withPolicy from '@pages/workspace/withPolicy'; import type {WithPolicyOnyxProps} from '@pages/workspace/withPolicy'; import * as Policy from '@userActions/Policy'; @@ -118,7 +118,7 @@ function WorkspaceAutoReportingFrequencyPage({policy, route}: WorkspaceAutoRepor ); return ( - @@ -149,7 +149,7 @@ function WorkspaceAutoReportingFrequencyPage({policy, route}: WorkspaceAutoRepor
- + ); } diff --git a/src/pages/workspace/workflows/WorkspaceAutoReportingMonthlyOffsetPage.tsx b/src/pages/workspace/workflows/WorkspaceAutoReportingMonthlyOffsetPage.tsx index 0b44d6c565d1..614e17e5b9c9 100644 --- a/src/pages/workspace/workflows/WorkspaceAutoReportingMonthlyOffsetPage.tsx +++ b/src/pages/workspace/workflows/WorkspaceAutoReportingMonthlyOffsetPage.tsx @@ -10,7 +10,7 @@ import useLocalize from '@hooks/useLocalize'; import Navigation from '@libs/Navigation/Navigation'; import type {WorkspacesCentralPaneNavigatorParamList} from '@libs/Navigation/types'; import * as PolicyUtils from '@libs/PolicyUtils'; -import FeatureEnabledAccessOrNotFoundWrapper from '@pages/workspace/FeatureEnabledAccessOrNotFoundWrapper'; +import AccessOrNotFoundWrapper from '@pages/workspace/AccessOrNotFoundWrapper'; import withPolicy from '@pages/workspace/withPolicy'; import type {WithPolicyOnyxProps} from '@pages/workspace/withPolicy'; import * as Policy from '@userActions/Policy'; @@ -72,7 +72,7 @@ function WorkspaceAutoReportingMonthlyOffsetPage({policy, route}: WorkspaceAutoR }; return ( - @@ -104,7 +104,7 @@ function WorkspaceAutoReportingMonthlyOffsetPage({policy, route}: WorkspaceAutoR />
- + ); } diff --git a/src/pages/workspace/workflows/WorkspaceWorkflowsApproverPage.tsx b/src/pages/workspace/workflows/WorkspaceWorkflowsApproverPage.tsx index d32218616662..1b77838eba24 100644 --- a/src/pages/workspace/workflows/WorkspaceWorkflowsApproverPage.tsx +++ b/src/pages/workspace/workflows/WorkspaceWorkflowsApproverPage.tsx @@ -21,7 +21,7 @@ import * as OptionsListUtils from '@libs/OptionsListUtils'; import * as PersonalDetailsUtils from '@libs/PersonalDetailsUtils'; import * as PolicyUtils from '@libs/PolicyUtils'; import * as UserUtils from '@libs/UserUtils'; -import FeatureEnabledAccessOrNotFoundWrapper from '@pages/workspace/FeatureEnabledAccessOrNotFoundWrapper'; +import AccessOrNotFoundWrapper from '@pages/workspace/AccessOrNotFoundWrapper'; import withPolicyAndFullscreenLoading from '@pages/workspace/withPolicyAndFullscreenLoading'; import type {WithPolicyAndFullscreenLoadingProps} from '@pages/workspace/withPolicyAndFullscreenLoading'; import * as Policy from '@userActions/Policy'; @@ -165,7 +165,7 @@ function WorkspaceWorkflowsApproverPage({policy, personalDetails, isLoadingRepor }; return ( - @@ -196,7 +196,7 @@ function WorkspaceWorkflowsApproverPage({policy, personalDetails, isLoadingRepor /> - + ); } diff --git a/src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx b/src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx index 35412d768bcc..d5753f15c218 100644 --- a/src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx +++ b/src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx @@ -20,7 +20,7 @@ import Permissions from '@libs/Permissions'; import * as PersonalDetailsUtils from '@libs/PersonalDetailsUtils'; import * as PolicyUtils from '@libs/PolicyUtils'; import type {WorkspacesCentralPaneNavigatorParamList} from '@navigation/types'; -import FeatureEnabledAccessOrNotFoundWrapper from '@pages/workspace/FeatureEnabledAccessOrNotFoundWrapper'; +import AccessOrNotFoundWrapper from '@pages/workspace/AccessOrNotFoundWrapper'; import type {WithPolicyProps} from '@pages/workspace/withPolicy'; import withPolicy from '@pages/workspace/withPolicy'; import WorkspacePageWithSections from '@pages/workspace/WorkspacePageWithSections'; @@ -264,7 +264,7 @@ function WorkspaceWorkflowsPage({policy, betas, route}: WorkspaceWorkflowsPagePr const isLoading = Boolean(policy?.isLoading && policy?.reimbursementChoice === undefined); return ( - @@ -303,7 +303,7 @@ function WorkspaceWorkflowsPage({policy, betas, route}: WorkspaceWorkflowsPagePr - + ); } diff --git a/src/pages/workspace/workflows/WorkspaceWorkflowsPayerPage.tsx b/src/pages/workspace/workflows/WorkspaceWorkflowsPayerPage.tsx index 58f5d4c54e97..64a0fb88523a 100644 --- a/src/pages/workspace/workflows/WorkspaceWorkflowsPayerPage.tsx +++ b/src/pages/workspace/workflows/WorkspaceWorkflowsPayerPage.tsx @@ -175,7 +175,10 @@ function WorkspaceWorkflowsPayerPage({route, policy, personalDetails, isLoadingR ); return ( - +