@@ -28,7 +28,6 @@ import useLocalize from '@hooks/useLocalize';
2828import useMobileSelectionMode from '@hooks/useMobileSelectionMode' ;
2929import useNetwork from '@hooks/useNetwork' ;
3030import useOnyx from '@hooks/useOnyx' ;
31- import usePermissions from '@hooks/usePermissions' ;
3231import usePolicy from '@hooks/usePolicy' ;
3332import useResponsiveLayout from '@hooks/useResponsiveLayout' ;
3433import useSearchBackPress from '@hooks/useSearchBackPress' ;
@@ -112,7 +111,6 @@ function WorkspaceTagsPage({route}: WorkspaceTagsPageProps) {
112111 openPolicyTagsPage ( policyID ) ;
113112 } , [ policyID ] ) ;
114113 const isQuickSettingsFlow = route . name === SCREENS . SETTINGS_TAGS . SETTINGS_TAGS_ROOT ;
115- const { isBetaEnabled} = usePermissions ( ) ;
116114
117115 const tagsList = useMemo ( ( ) => {
118116 if ( isMultiLevelTags ) {
@@ -191,28 +189,27 @@ function WorkspaceTagsPage({route}: WorkspaceTagsPageProps) {
191189 enabled : true ,
192190 required : policyTagList . required ,
193191 isDisabledCheckbox : isSwitchDisabled ,
194- rightElement :
195- isBetaEnabled ( CONST . BETAS . MULTI_LEVEL_TAGS ) && hasDependentTags ? (
196- < ListItemRightCaretWithLabel
197- labelText = { translate ( 'workspace.tags.tagCount' , { count : Object . keys ( policyTagList ?. tags ?? { } ) . length } ) }
198- shouldShowCaret
199- />
200- ) : (
201- < Switch
202- isOn = { isSwitchEnabled }
203- accessibilityLabel = { translate ( 'workspace.tags.requiresTag' ) }
204- onToggle = { ( newValue : boolean ) => {
205- if ( isMakingLastRequiredTagListOptional ( policy , policyTags , [ policyTagList ] ) ) {
206- setIsCannotMakeLastTagOptionalModalVisible ( true ) ;
207- return ;
208- }
209-
210- updateWorkspaceRequiresTag ( newValue , policyTagList . orderWeight ) ;
211- } }
212- disabled = { isSwitchDisabled }
213- showLockIcon = { isMakingLastRequiredTagListOptional ( policy , policyTags , [ policyTagList ] ) }
214- />
215- ) ,
192+ rightElement : hasDependentTags ? (
193+ < ListItemRightCaretWithLabel
194+ labelText = { translate ( 'workspace.tags.tagCount' , { count : Object . keys ( policyTagList ?. tags ?? { } ) . length } ) }
195+ shouldShowCaret
196+ />
197+ ) : (
198+ < Switch
199+ isOn = { isSwitchEnabled }
200+ accessibilityLabel = { translate ( 'workspace.tags.requiresTag' ) }
201+ onToggle = { ( newValue : boolean ) => {
202+ if ( isMakingLastRequiredTagListOptional ( policy , policyTags , [ policyTagList ] ) ) {
203+ setIsCannotMakeLastTagOptionalModalVisible ( true ) ;
204+ return ;
205+ }
206+
207+ updateWorkspaceRequiresTag ( newValue , policyTagList . orderWeight ) ;
208+ } }
209+ disabled = { isSwitchDisabled }
210+ showLockIcon = { isMakingLastRequiredTagListOptional ( policy , policyTags , [ policyTagList ] ) }
211+ />
212+ ) ,
216213 } ;
217214 } ) ;
218215 }
@@ -241,7 +238,7 @@ function WorkspaceTagsPage({route}: WorkspaceTagsPageProps) {
241238 />
242239 ) ,
243240 } ) ) ;
244- } , [ isMultiLevelTags , policyTagLists , isBetaEnabled , hasDependentTags , translate , policy , policyTags , updateWorkspaceRequiresTag , updateWorkspaceTagEnabled ] ) ;
241+ } , [ isMultiLevelTags , policyTagLists , hasDependentTags , translate , policy , policyTags , updateWorkspaceRequiresTag , updateWorkspaceTagEnabled ] ) ;
245242
246243 const filterTag = useCallback ( ( tag : TagListItem , searchInput : string ) => {
247244 const tagText = StringUtils . normalize ( tag . text ?. toLowerCase ( ) ?? '' ) ;
@@ -286,7 +283,7 @@ function WorkspaceTagsPage({route}: WorkspaceTagsPageProps) {
286283 } ;
287284
288285 const getCustomListHeader = ( ) => {
289- if ( isBetaEnabled ( CONST . BETAS . MULTI_LEVEL_TAGS ) && hasDependentTags ) {
286+ if ( hasDependentTags ) {
290287 return (
291288 < CustomListHeader
292289 canSelectMultiple = { false }
@@ -345,18 +342,12 @@ function WorkspaceTagsPage({route}: WorkspaceTagsPageProps) {
345342 close ( ( ) => setIsOfflineModalVisible ( true ) ) ;
346343 return ;
347344 }
348- if ( isBetaEnabled ( CONST . BETAS . MULTI_LEVEL_TAGS ) ) {
349- Navigation . navigate (
350- isQuickSettingsFlow
351- ? ROUTES . SETTINGS_TAGS_IMPORT . getRoute ( policyID , ROUTES . SETTINGS_TAGS_ROOT . getRoute ( policyID , backTo ) )
352- : ROUTES . WORKSPACE_TAGS_IMPORT_OPTIONS . getRoute ( policyID ) ,
353- ) ;
354- } else {
355- Navigation . navigate (
356- isQuickSettingsFlow ? ROUTES . SETTINGS_TAGS_IMPORT . getRoute ( policyID , ROUTES . SETTINGS_TAGS_ROOT . getRoute ( policyID , backTo ) ) : ROUTES . WORKSPACE_TAGS_IMPORT . getRoute ( policyID ) ,
357- ) ;
358- }
359- } , [ backTo , isOffline , isQuickSettingsFlow , policyID , isBetaEnabled ] ) ;
345+ Navigation . navigate (
346+ isQuickSettingsFlow
347+ ? ROUTES . SETTINGS_TAGS_IMPORT . getRoute ( policyID , ROUTES . SETTINGS_TAGS_ROOT . getRoute ( policyID , backTo ) )
348+ : ROUTES . WORKSPACE_TAGS_IMPORT_OPTIONS . getRoute ( policyID ) ,
349+ ) ;
350+ } , [ backTo , isOffline , isQuickSettingsFlow , policyID ] ) ;
360351
361352 const hasAccountingConnections = hasAccountingConnectionsPolicyUtils ( policy ) ;
362353 const secondaryActions = useMemo ( ( ) => {
@@ -387,7 +378,7 @@ function WorkspaceTagsPage({route}: WorkspaceTagsPageProps) {
387378 return ;
388379 }
389380 close ( ( ) => {
390- if ( hasIndependentTags && isBetaEnabled ( CONST . BETAS . MULTI_LEVEL_TAGS ) ) {
381+ if ( hasIndependentTags ) {
391382 downloadMultiLevelIndependentTagsCSV ( policyID , ( ) => {
392383 setIsDownloadFailureModalVisible ( true ) ;
393384 } ) ;
@@ -403,7 +394,7 @@ function WorkspaceTagsPage({route}: WorkspaceTagsPageProps) {
403394 }
404395
405396 return menuItems ;
406- } , [ translate , navigateToTagsSettings , isBetaEnabled , hasDependentTags , hasVisibleTags , isOffline , policyID , hasIndependentTags , hasAccountingConnections , navigateToImportSpreadsheet ] ) ;
397+ } , [ translate , navigateToTagsSettings , hasDependentTags , hasVisibleTags , isOffline , policyID , hasIndependentTags , hasAccountingConnections , navigateToImportSpreadsheet ] ) ;
407398
408399 const getHeaderButtons = ( ) => {
409400 const selectedTagsObject = selectedTags . map ( ( key ) => policyTagLists . at ( 0 ) ?. tags ?. [ key ] ) ;
0 commit comments