diff --git a/src/CONST.ts b/src/CONST.ts index fab8cf0fdaf6..e7a5d10b81ae 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -477,7 +477,6 @@ const CONST = { P2P_DISTANCE_REQUESTS: 'p2pDistanceRequests', SPOTNANA_TRAVEL: 'spotnanaTravel', REPORT_FIELDS_FEATURE: 'reportFieldsFeature', - WORKSPACE_FEEDS: 'workspaceFeeds', COMPANY_CARD_FEEDS: 'companyCardFeeds', DIRECT_FEEDS: 'directFeeds', NETSUITE_USA_TAX: 'netsuiteUsaTax', diff --git a/src/libs/Permissions.ts b/src/libs/Permissions.ts index 9fd94dcb86b8..de3afbabadc2 100644 --- a/src/libs/Permissions.ts +++ b/src/libs/Permissions.ts @@ -25,10 +25,6 @@ function canUseSpotnanaTravel(betas: OnyxEntry): boolean { return !!betas?.includes(CONST.BETAS.SPOTNANA_TRAVEL) || canUseAllBetas(betas); } -function canUseWorkspaceFeeds(betas: OnyxEntry): boolean { - return !!betas?.includes(CONST.BETAS.WORKSPACE_FEEDS) || canUseAllBetas(betas); -} - function canUseCompanyCardFeeds(betas: OnyxEntry): boolean { return !!betas?.includes(CONST.BETAS.COMPANY_CARD_FEEDS) || canUseAllBetas(betas); } @@ -86,7 +82,6 @@ export default { canUseDupeDetection, canUseP2PDistanceRequests, canUseSpotnanaTravel, - canUseWorkspaceFeeds, canUseCompanyCardFeeds, canUseDirectFeeds, canUseNetSuiteUSATax, diff --git a/src/pages/workspace/WorkspaceMoreFeaturesPage.tsx b/src/pages/workspace/WorkspaceMoreFeaturesPage.tsx index a743140278f7..54d8401a99f8 100644 --- a/src/pages/workspace/WorkspaceMoreFeaturesPage.tsx +++ b/src/pages/workspace/WorkspaceMoreFeaturesPage.tsx @@ -62,7 +62,7 @@ function WorkspaceMoreFeaturesPage({policy, route}: WorkspaceMoreFeaturesPagePro const styles = useThemeStyles(); const {shouldUseNarrowLayout} = useResponsiveLayout(); const {translate} = useLocalize(); - const {canUseWorkspaceFeeds, canUseWorkspaceRules, canUseCompanyCardFeeds} = usePermissions(); + const {canUseWorkspaceRules, canUseCompanyCardFeeds} = usePermissions(); const hasAccountingConnection = !isEmptyObject(policy?.connections); const isAccountingEnabled = !!policy?.areConnectionsEnabled || !isEmptyObject(policy?.connections); const isSyncTaxEnabled = @@ -100,11 +100,7 @@ function WorkspaceMoreFeaturesPage({policy, route}: WorkspaceMoreFeaturesPagePro DistanceRate.enablePolicyDistanceRates(policyID, isEnabled); }, }, - ]; - - // TODO remove this when feature will be fully done, and move spend item inside spendItems array - if (canUseWorkspaceFeeds) { - spendItems.push({ + { icon: Illustrations.HandCard, titleTranslationKey: 'workspace.moreFeatures.expensifyCard.title', subtitleTranslationKey: 'workspace.moreFeatures.expensifyCard.subtitle', @@ -120,8 +116,8 @@ function WorkspaceMoreFeaturesPage({policy, route}: WorkspaceMoreFeaturesPagePro disabledAction: () => { setIsDisableExpensifyCardWarningModalOpen(true); }, - }); - } + }, + ]; if (canUseCompanyCardFeeds) { spendItems.push({ diff --git a/src/pages/workspace/accounting/PolicyAccountingPage.tsx b/src/pages/workspace/accounting/PolicyAccountingPage.tsx index e0ba62f2abe7..0f02e350d91a 100644 --- a/src/pages/workspace/accounting/PolicyAccountingPage.tsx +++ b/src/pages/workspace/accounting/PolicyAccountingPage.tsx @@ -73,7 +73,7 @@ function PolicyAccountingPage({policy}: PolicyAccountingPageProps) { const [isDisconnectModalOpen, setIsDisconnectModalOpen] = useState(false); const [datetimeToRelative, setDateTimeToRelative] = useState(''); const threeDotsMenuContainerRef = useRef(null); - const {canUseWorkspaceFeeds, canUseNewDotQBD} = usePermissions(); + const {canUseNewDotQBD} = usePermissions(); const {startIntegrationFlow, popoverAnchorRefs} = useAccountingContext(); const route = useRoute(); @@ -315,7 +315,7 @@ function PolicyAccountingPage({policy}: PolicyAccountingPageProps) { }, ]; - if (!canUseWorkspaceFeeds || !policy?.areExpensifyCardsEnabled) { + if (!policy?.areExpensifyCardsEnabled) { configurationOptions.splice(2, 1); } @@ -370,7 +370,6 @@ function PolicyAccountingPage({policy}: PolicyAccountingPageProps) { styles.pb0, styles.mt5, styles.popoverMenuIcon, - canUseWorkspaceFeeds, styles.justifyContentCenter, connectionSyncProgress?.stageInProgress, datetimeToRelative,