diff --git a/src/CONST.ts b/src/CONST.ts index 437ee4e7fd424..7915851e0cd29 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -620,7 +620,6 @@ const CONST = { COMPANY_CARD_FEEDS: 'companyCardFeeds', DIRECT_FEEDS: 'directFeeds', NETSUITE_USA_TAX: 'netsuiteUsaTax', - NEW_DOT_COPILOT: 'newDotCopilot', COMBINED_TRACK_SUBMIT: 'combinedTrackSubmit', CATEGORY_AND_TAG_APPROVERS: 'categoryAndTagApprovers', PER_DIEM: 'newDotPerDiem', diff --git a/src/components/AccountSwitcher.tsx b/src/components/AccountSwitcher.tsx index ad58294c0cc8c..d35877129a84a 100644 --- a/src/components/AccountSwitcher.tsx +++ b/src/components/AccountSwitcher.tsx @@ -5,7 +5,6 @@ import {useOnyx} from 'react-native-onyx'; import useCurrentUserPersonalDetails from '@hooks/useCurrentUserPersonalDetails'; import useLocalize from '@hooks/useLocalize'; import useNetwork from '@hooks/useNetwork'; -import usePermissions from '@hooks/usePermissions'; import useResponsiveLayout from '@hooks/useResponsiveLayout'; import useTheme from '@hooks/useTheme'; import useThemeStyles from '@hooks/useThemeStyles'; @@ -34,7 +33,6 @@ function AccountSwitcher() { const theme = useTheme(); const {translate} = useLocalize(); const {isOffline} = useNetwork(); - const {canUseNewDotCopilot} = usePermissions(); const {shouldUseNarrowLayout} = useResponsiveLayout(); const [account] = useOnyx(ONYXKEYS.ACCOUNT); const [session] = useOnyx(ONYXKEYS.SESSION); @@ -47,7 +45,7 @@ function AccountSwitcher() { const delegators = account?.delegatedAccess?.delegators ?? []; const isActingAsDelegate = !!account?.delegatedAccess?.delegate ?? false; - const canSwitchAccounts = canUseNewDotCopilot && (delegators.length > 0 || isActingAsDelegate); + const canSwitchAccounts = delegators.length > 0 || isActingAsDelegate; const createBaseMenuItem = ( personalDetails: PersonalDetails | undefined, diff --git a/src/libs/Permissions.ts b/src/libs/Permissions.ts index a02a456c48fe4..009724e73e93c 100644 --- a/src/libs/Permissions.ts +++ b/src/libs/Permissions.ts @@ -36,10 +36,6 @@ function canUseNetSuiteUSATax(betas: OnyxEntry): boolean { return !!betas?.includes(CONST.BETAS.NETSUITE_USA_TAX) || canUseAllBetas(betas); } -function canUseNewDotCopilot(betas: OnyxEntry): boolean { - return !!betas?.includes(CONST.BETAS.NEW_DOT_COPILOT) || canUseAllBetas(betas); -} - function canUseCategoryAndTagApprovers(betas: OnyxEntry): boolean { return !!betas?.includes(CONST.BETAS.CATEGORY_AND_TAG_APPROVERS) || canUseAllBetas(betas); } @@ -69,7 +65,6 @@ export default { canUseCompanyCardFeeds, canUseDirectFeeds, canUseNetSuiteUSATax, - canUseNewDotCopilot, canUseCombinedTrackSubmit, canUseCategoryAndTagApprovers, canUsePerDiem, diff --git a/src/pages/settings/Security/SecuritySettingsPage.tsx b/src/pages/settings/Security/SecuritySettingsPage.tsx index ec82000d06c82..16b9ada4c9b59 100644 --- a/src/pages/settings/Security/SecuritySettingsPage.tsx +++ b/src/pages/settings/Security/SecuritySettingsPage.tsx @@ -21,7 +21,6 @@ import Section from '@components/Section'; import Text from '@components/Text'; import TextLink from '@components/TextLink'; import useLocalize from '@hooks/useLocalize'; -import usePermissions from '@hooks/usePermissions'; import useResponsiveLayout from '@hooks/useResponsiveLayout'; import useThemeStyles from '@hooks/useThemeStyles'; import useWaitForNavigation from '@hooks/useWaitForNavigation'; @@ -46,7 +45,6 @@ function SecuritySettingsPage() { const {translate} = useLocalize(); const waitForNavigate = useWaitForNavigation(); const {shouldUseNarrowLayout} = useResponsiveLayout(); - const {canUseNewDotCopilot} = usePermissions(); const {windowWidth} = useWindowDimensions(); const personalDetails = usePersonalDetails(); @@ -236,50 +234,48 @@ function SecuritySettingsPage() { shouldUseSingleExecution /> - {!!canUseNewDotCopilot && ( - -
( - - {translate('delegate.copilotDelegatedAccessDescription')} - - {translate('common.learnMore')} - - - )} - isCentralPane - subtitleMuted - titleStyles={styles.accountSettingsSectionTitle} - childrenStyles={styles.pt5} - > - {hasDelegates && ( - <> - {translate('delegate.membersCanAccessYourAccount')} - - - )} - {!isActingAsDelegate && ( - Navigation.navigate(ROUTES.SETTINGS_ADD_DELEGATE)} - shouldShowRightIcon - wrapperStyle={[styles.sectionMenuItemTopDescription, styles.mb6]} - /> - )} - {hasDelegators && ( - <> - {translate('delegate.youCanAccessTheseAccounts')} - - - )} -
-
- )} + +
( + + {translate('delegate.copilotDelegatedAccessDescription')} + + {translate('common.learnMore')} + + + )} + isCentralPane + subtitleMuted + titleStyles={styles.accountSettingsSectionTitle} + childrenStyles={styles.pt5} + > + {hasDelegates && ( + <> + {translate('delegate.membersCanAccessYourAccount')} + + + )} + {!isActingAsDelegate && ( + Navigation.navigate(ROUTES.SETTINGS_ADD_DELEGATE)} + shouldShowRightIcon + wrapperStyle={[styles.sectionMenuItemTopDescription, styles.mb6]} + /> + )} + {hasDelegators && ( + <> + {translate('delegate.youCanAccessTheseAccounts')} + + + )} +
+
}