From 2748133bd0c57429c760e8222824cdc12f176df3 Mon Sep 17 00:00:00 2001 From: Ankush Deshmukh Date: Fri, 10 Nov 2023 13:06:23 +0530 Subject: [PATCH] Fix: Show Priority icon in custom analytics table. (#2744) --- packages/ui/src/icons/priority-icon.tsx | 21 +++++++++++-------- .../analytics/custom-analytics/table.tsx | 1 - web/components/inbox/issue-card.tsx | 8 +++---- .../filters/applied-filters/priority.tsx | 12 +---------- web/components/project/priority-select.tsx | 10 +-------- 5 files changed, 18 insertions(+), 34 deletions(-) diff --git a/packages/ui/src/icons/priority-icon.tsx b/packages/ui/src/icons/priority-icon.tsx index 36c6fa18f..2c2e012e9 100644 --- a/packages/ui/src/icons/priority-icon.tsx +++ b/packages/ui/src/icons/priority-icon.tsx @@ -18,18 +18,21 @@ export const PriorityIcon: React.FC = ({ }) => { if (!className || className === "") className = "h-3.5 w-3.5"; + // Convert to lowercase for string comparison + const lowercasePriority = priority?.toLowerCase(); + return ( <> - {priority === "urgent" ? ( - - ) : priority === "high" ? ( - - ) : priority === "medium" ? ( - - ) : priority === "low" ? ( - + {lowercasePriority === "urgent" ? ( + + ) : lowercasePriority === "high" ? ( + + ) : lowercasePriority === "medium" ? ( + + ) : lowercasePriority === "low" ? ( + ) : ( - + )} ); diff --git a/web/components/analytics/custom-analytics/table.tsx b/web/components/analytics/custom-analytics/table.tsx index 5c7bb1146..1d578b0d8 100644 --- a/web/components/analytics/custom-analytics/table.tsx +++ b/web/components/analytics/custom-analytics/table.tsx @@ -69,7 +69,6 @@ export const AnalyticsTable: React.FC = ({ analytics, barGraphData, param }`} > {params.x_axis === "priority" ? ( - // TODO: incorrect priority icon being rendered ) : ( = (props) => {
diff --git a/web/components/issues/issue-layouts/filters/applied-filters/priority.tsx b/web/components/issues/issue-layouts/filters/applied-filters/priority.tsx index 198589a26..2ea704b84 100644 --- a/web/components/issues/issue-layouts/filters/applied-filters/priority.tsx +++ b/web/components/issues/issue-layouts/filters/applied-filters/priority.tsx @@ -20,17 +20,7 @@ export const AppliedPriorityFilters: React.FC = observer((props) => {
{priority}