mirror of
https://github.com/lingble/twenty.git
synced 2025-10-29 11:52:28 +00:00
Added feature flag for advanced filter (#8194)
Added feature flag for advanced filter
This commit is contained in:
@@ -19,6 +19,7 @@ import { useSelectableList } from '@/ui/layout/selectable-list/hooks/useSelectab
|
||||
import { useRecoilComponentValueV2 } from '@/ui/utilities/state/component-state/hooks/useRecoilComponentValueV2';
|
||||
import { useGetCurrentView } from '@/views/hooks/useGetCurrentView';
|
||||
import { availableFilterDefinitionsComponentState } from '@/views/states/availableFilterDefinitionsComponentState';
|
||||
import { useIsFeatureEnabled } from '@/workspace/hooks/useIsFeatureEnabled';
|
||||
import { useRecoilValue } from 'recoil';
|
||||
import { isDefined } from 'twenty-ui';
|
||||
|
||||
@@ -139,10 +140,15 @@ export const ObjectFilterDropdownFilterSelect = ({
|
||||
const { currentViewId, currentViewWithCombinedFiltersAndSorts } =
|
||||
useGetCurrentView();
|
||||
|
||||
const isAdvancedFiltersEnabled = useIsFeatureEnabled(
|
||||
'IS_ADVANCED_FILTERS_ENABLED',
|
||||
);
|
||||
|
||||
const shouldShowAdvancedFilterButton =
|
||||
isDefined(currentViewId) &&
|
||||
isDefined(currentViewWithCombinedFiltersAndSorts?.objectMetadataId) &&
|
||||
isAdvancedFilterButtonVisible;
|
||||
isAdvancedFilterButtonVisible &&
|
||||
isAdvancedFiltersEnabled;
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
@@ -15,4 +15,5 @@ export type FeatureFlagKey =
|
||||
| 'IS_ANALYTICS_V2_ENABLED'
|
||||
| 'IS_SSO_ENABLED'
|
||||
| 'IS_UNIQUE_INDEXES_ENABLED'
|
||||
| 'IS_ARRAY_AND_JSON_FILTER_ENABLED';
|
||||
| 'IS_ARRAY_AND_JSON_FILTER_ENABLED'
|
||||
| 'IS_ADVANCED_FILTERS_ENABLED';
|
||||
|
||||
@@ -75,6 +75,11 @@ export const seedFeatureFlags = async (
|
||||
workspaceId: workspaceId,
|
||||
value: false,
|
||||
},
|
||||
{
|
||||
key: FeatureFlagKey.IsAdvancedFiltersEnabled,
|
||||
workspaceId: workspaceId,
|
||||
value: false,
|
||||
},
|
||||
])
|
||||
.execute();
|
||||
};
|
||||
|
||||
@@ -14,4 +14,5 @@ export enum FeatureFlagKey {
|
||||
IsGmailSendEmailScopeEnabled = 'IS_GMAIL_SEND_EMAIL_SCOPE_ENABLED',
|
||||
IsAnalyticsV2Enabled = 'IS_ANALYTICS_V2_ENABLED',
|
||||
IsUniqueIndexesEnabled = 'IS_UNIQUE_INDEXES_ENABLED',
|
||||
IsAdvancedFiltersEnabled = 'IS_ADVANCED_FILTERS_ENABLED',
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user