-
- {inboxIssueId && (
-
- )}
+
+ {filter &&
}
+
+
+
+ {inboxIssueId && (
+
+ )}
+
);
});
diff --git a/plane-src/apps/web/core/components/rich-filters/filters-toggle.tsx b/plane-src/apps/web/core/components/rich-filters/filters-toggle.tsx
index 5764c52..0178b46 100644
--- a/plane-src/apps/web/core/components/rich-filters/filters-toggle.tsx
+++ b/plane-src/apps/web/core/components/rich-filters/filters-toggle.tsx
@@ -16,6 +16,7 @@ import { AddFilterButton } from "@/components/rich-filters/add-filters/button";
type TFiltersToggleProps
= {
filter: IFilterInstance
| undefined;
+ showAddFilterButtonWhenEmpty?: boolean;
};
const COMMON_CLASSNAME =
@@ -24,13 +25,13 @@ const COMMON_CLASSNAME =
export const FiltersToggle = observer(function FiltersToggle
(
props: TFiltersToggleProps
) {
- const { filter } = props;
+ const { filter, showAddFilterButtonWhenEmpty = true } = props;
// derived values
const hasAnyConditions = (filter?.allConditionsForDisplay.length ?? 0) > 0;
const isFilterRowVisible = filter?.isVisible ?? false;
const hasUpdates = filter?.canUpdateView === true && filter?.hasChanges === true;
const showFilterRowChangesPill = hasUpdates || hasAnyConditions === true;
- const showAddFilterButton = !hasAnyConditions && !isFilterRowVisible && !hasUpdates;
+ const showAddFilterButton = showAddFilterButtonWhenEmpty && !hasAnyConditions && !isFilterRowVisible && !hasUpdates;
const handleToggleFilter = () => {
if (!filter) {
diff --git a/plane-src/apps/web/core/components/rich-filters/i18n.ts b/plane-src/apps/web/core/components/rich-filters/i18n.ts
index 79b69cb..46ce39a 100644
--- a/plane-src/apps/web/core/components/rich-filters/i18n.ts
+++ b/plane-src/apps/web/core/components/rich-filters/i18n.ts
@@ -9,6 +9,8 @@ const FILTER_LABEL_MAP: Record = {
Label: "Метка",
Labels: "Метки",
Project: "Проект",
+ Projects: "Проекты",
+ Contour: "Контур",
"Created by": "Автор",
"Created at": "Дата создания",
"Updated at": "Дата обновления",
diff --git a/plane-src/apps/web/core/components/work-item-filters/filters-toggle.tsx b/plane-src/apps/web/core/components/work-item-filters/filters-toggle.tsx
index 17021b4..45622b3 100644
--- a/plane-src/apps/web/core/components/work-item-filters/filters-toggle.tsx
+++ b/plane-src/apps/web/core/components/work-item-filters/filters-toggle.tsx
@@ -24,5 +24,5 @@ export const WorkItemFiltersToggle = observer(function WorkItemFiltersToggle(pro
// derived values
const filter = getFilter(entityType, entityId);
- return ;
+ return ;
});
diff --git a/plane-src/apps/web/core/store/external-contours/project-external-contours-board.store.ts b/plane-src/apps/web/core/store/external-contours/project-external-contours-board.store.ts
index 1814e18..37771a7 100644
--- a/plane-src/apps/web/core/store/external-contours/project-external-contours-board.store.ts
+++ b/plane-src/apps/web/core/store/external-contours/project-external-contours-board.store.ts
@@ -50,6 +50,7 @@ export interface IProjectExternalContoursBoardStore {
isFiltering: boolean;
isSortingDefault: boolean;
clearFilters: (workspaceSlug: string, projectId: string) => Promise;
+ replaceFilters: (workspaceSlug: string, projectId: string, filters: Partial) => Promise;
updateFilters: (workspaceSlug: string, projectId: string, filters: Partial) => Promise;
updateSorting: (workspaceSlug: string, projectId: string, sorting: TExternalContourBoardSorting) => Promise;
upsertBoardItems: (items: TExternalContourRequest[]) => void;
@@ -99,6 +100,7 @@ export class ProjectExternalContoursBoardStore implements IProjectExternalContou
clearFilters: action,
fetchBoard: action,
handleCurrentTab: action,
+ replaceFilters: action,
updateFilters: action,
updateSorting: action,
upsertBoardItems: action,
@@ -161,6 +163,15 @@ export class ProjectExternalContoursBoardStore implements IProjectExternalContou
await this.fetchBoard(workspaceSlug, projectId);
};
+ replaceFilters = async (
+ workspaceSlug: string,
+ projectId: string,
+ filters: Partial
+ ) => {
+ this.filters = sanitizeBoardFilters(filters);
+ await this.fetchBoard(workspaceSlug, projectId);
+ };
+
updateSorting = async (workspaceSlug: string, projectId: string, sorting: TExternalContourBoardSorting) => {
this.sorting = sorting;
await this.fetchBoard(workspaceSlug, projectId);
diff --git a/plane-src/packages/types/src/external-contours.ts b/plane-src/packages/types/src/external-contours.ts
index a276290..9e74823 100644
--- a/plane-src/packages/types/src/external-contours.ts
+++ b/plane-src/packages/types/src/external-contours.ts
@@ -105,6 +105,7 @@ export type TExternalContourRequestResponse = TPaginationInfo & {
export type TExternalContourBoardFilter = {
direction?: TExternalContourBoardDirection[];
status?: TExternalContourRequest["status"] | TExternalContourRequest["status"][];
+ state_groups?: string[];
state_ids?: string[];
priority?: string[];
assignee_ids?: string[];
@@ -114,6 +115,9 @@ export type TExternalContourBoardFilter = {
source_project_ids?: string[];
target_project_ids?: string[];
label_ids?: string[];
+ target_date_exact?: string;
+ target_date_from?: string;
+ target_date_to?: string;
has_unread_updates?: boolean;
search?: string;
};
diff --git a/plane-src/packages/utils/src/work-item-filters/configs/filters/project.ts b/plane-src/packages/utils/src/work-item-filters/configs/filters/project.ts
index 81e33ff..2074725 100644
--- a/plane-src/packages/utils/src/work-item-filters/configs/filters/project.ts
+++ b/plane-src/packages/utils/src/work-item-filters/configs/filters/project.ts
@@ -24,7 +24,7 @@ export const getProjectFilterConfig =
(params: TCreateProjectFilterParams) =>
createFilterConfig({
id: key,
- label: "Projects",
+ label: params.filterLabel ?? "Projects",
...params,
icon: params.filterIcon,
supportedOperatorConfigsMap: new Map([
diff --git a/plane-src/packages/utils/src/work-item-filters/configs/filters/shared.ts b/plane-src/packages/utils/src/work-item-filters/configs/filters/shared.ts
index 0343fd3..979cb9b 100644
--- a/plane-src/packages/utils/src/work-item-filters/configs/filters/shared.ts
+++ b/plane-src/packages/utils/src/work-item-filters/configs/filters/shared.ts
@@ -33,6 +33,7 @@ export const getSupportedDateOperators = (params: TCreateDateFilterParams): TOpe
*/
export type TCreateProjectFilterParams = TCreateFilterConfigParams &
IFilterIconConfig & {
+ filterLabel?: string;
projects: IProject[];
};