diff --git a/web/components/modules/applied-filters/root.tsx b/web/components/modules/applied-filters/root.tsx index 3011df084..e48b8562f 100644 --- a/web/components/modules/applied-filters/root.tsx +++ b/web/components/modules/applied-filters/root.tsx @@ -1,5 +1,5 @@ import { X } from "lucide-react"; -import { TModuleFilters } from "@plane/types"; +import { TModuleDisplayFilters, TModuleFilters } from "@plane/types"; // components import { AppliedDateFilters, AppliedMembersFilters, AppliedStatusFilters } from "@/components/modules"; // helpers @@ -8,19 +8,30 @@ import { replaceUnderscoreIfSnakeCase } from "@/helpers/string.helper"; type Props = { appliedFilters: TModuleFilters; + isFavoriteFilterApplied?: boolean; handleClearAllFilters: () => void; + handleDisplayFiltersUpdate?: (updatedDisplayProperties: Partial) => void; handleRemoveFilter: (key: keyof TModuleFilters, value: string | null) => void; alwaysAllowEditing?: boolean; + isArchived?: boolean; }; const MEMBERS_FILTERS = ["lead", "members"]; const DATE_FILTERS = ["start_date", "target_date"]; export const ModuleAppliedFiltersList: React.FC = (props) => { - const { appliedFilters, handleClearAllFilters, handleRemoveFilter, alwaysAllowEditing } = props; + const { + appliedFilters, + isFavoriteFilterApplied, + handleClearAllFilters, + handleRemoveFilter, + handleDisplayFiltersUpdate, + alwaysAllowEditing, + isArchived = false, + } = props; - if (!appliedFilters) return null; - if (Object.keys(appliedFilters).length === 0) return null; + if (!appliedFilters && !isFavoriteFilterApplied) return null; + if (Object.keys(appliedFilters).length === 0 && !isFavoriteFilterApplied) return null; const isEditingAllowed = alwaysAllowEditing; @@ -73,6 +84,33 @@ export const ModuleAppliedFiltersList: React.FC = (props) => { ); })} + {!isArchived && isFavoriteFilterApplied && ( +
+
+ Modules +
+ Favorite + {isEditingAllowed && ( + + )} +
+
+
+ )} {isEditingAllowed && (