Skip to content

Commit

Permalink
fix: tasks view labels + filters
Browse files Browse the repository at this point in the history
  • Loading branch information
stepan662 committed Dec 12, 2024
1 parent 1f9391a commit f5336b4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
3 changes: 1 addition & 2 deletions webapp/src/ee/task/components/taskFilter/TaskFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,7 @@ export const TaskFilter = ({
size: 1000,
},
options: {
enabled:
!project && Boolean(value.agencies?.length) && config.billing.enabled,
enabled: Boolean(value.agencies?.length) && config.billing.enabled,
keepPreviousData: true,
},
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { SubfilterAssignees } from './SubfilterAssignees';
import { SubfilterLanguages } from './SubfilterLanguages';
import { SubfilterProjects } from './SubfilterProjects';
import { SubfilterAgencies } from './SubfilterAgencies';
import { useConfig, useEnabledFeatures } from 'tg.globalContext/helpers';
import { useConfig } from 'tg.globalContext/helpers';

type SimpleProjectModel = components['schemas']['SimpleProjectModel'];
type TaskType = components['schemas']['TaskModel']['type'];
Expand Down Expand Up @@ -59,10 +59,8 @@ export const TaskFilterPopover: React.FC<Props> = ({
const debouncedOnChange = useDebouncedCallback(onChange, 200);

const config = useConfig();
const { isEnabled } = useEnabledFeatures();

const agencyVisible =
config.billing.enabled && isEnabled('ORDER_TRANSLATION');
const agencyVisible = config.billing.enabled;

function handleChange(value: TaskFilterType) {
setValue(value);
Expand Down Expand Up @@ -115,7 +113,7 @@ export const TaskFilterPopover: React.FC<Props> = ({
/>
)}

{project && agencyVisible && (
{agencyVisible && (
<SubfilterAgencies
value={value.agencies ?? []}
onChange={(agencies) => handleChange({ ...value, agencies })}
Expand Down

0 comments on commit f5336b4

Please sign in to comment.