diff --git a/apps/app/components/core/issues-view.tsx b/apps/app/components/core/issues-view.tsx index 4a561f1bb..5668aaa6e 100644 --- a/apps/app/components/core/issues-view.tsx +++ b/apps/app/components/core/issues-view.tsx @@ -33,6 +33,7 @@ import { import { ExclamationIcon, getStateGroupIcon } from "components/icons"; // helpers import { getStatesList } from "helpers/state.helper"; +import { replaceUnderscoreIfSnakeCase } from "helpers/string.helper"; // types import { CycleIssueResponse, @@ -424,8 +425,13 @@ export const IssuesView: React.FC = ({ {Object.keys(filters).map((key) => { if (filters[key as keyof typeof filters] !== null) return ( -
- {key}: +
+ + {replaceUnderscoreIfSnakeCase(key)}: + {filters[key as keyof IIssueFilterOptions] === null || (filters[key as keyof IIssueFilterOptions]?.length ?? 0) <= 0 ? ( None @@ -536,7 +542,7 @@ export const IssuesView: React.FC = ({ return (

{member?.first_name} @@ -577,7 +583,7 @@ export const IssuesView: React.FC = ({ return (

{member?.first_name} @@ -621,7 +627,6 @@ export const IssuesView: React.FC = ({ ); })}

- {Object.keys(filters).length > 0 && nullFilters.length !== Object.keys(filters).length && ( = ({ priority: null, assignees: null, labels: null, + created_by: null, }) } - className="mt-2 flex items-center gap-x-1 text-xs" + className="mt-2 flex items-center gap-x-1 rounded-full border bg-white px-3 py-1.5 text-xs" > Clear all filters @@ -684,7 +690,7 @@ export const IssuesView: React.FC = ({ isNotEmpty ? ( <> {isCompleted && ( -
+
Completed cycles are not editable.
diff --git a/apps/app/components/views/form.tsx b/apps/app/components/views/form.tsx index 8a9dd2e95..cafb7b85b 100644 --- a/apps/app/components/views/form.tsx +++ b/apps/app/components/views/form.tsx @@ -153,7 +153,7 @@ export const ViewForm: React.FC = ({ />
-
+
{Object.keys(filters ?? {}).map((key) => { const queryKey = key as keyof typeof filters; if (queryKey === "state") @@ -163,7 +163,7 @@ export const ViewForm: React.FC = ({ const state = statesList.find((state) => state.id === stateID); if (!state) return null; return ( -
+
{getStateGroupIcon(state?.group, "16", "16", state?.color)} {state?.name}
@@ -175,7 +175,7 @@ export const ViewForm: React.FC = ({ return (
{filters.priority?.map((priority) => ( -
+
{getPriorityIcon(priority)} {priority}
@@ -190,7 +190,7 @@ export const ViewForm: React.FC = ({ if (!member) return null; return ( -
+
{member.member.first_name && member.member.first_name !== "" ? member.member.first_name