From 653bdbe649f16685b298ec450ebeb2e2b13973a7 Mon Sep 17 00:00:00 2001 From: Anmol Singh Bhatia <121005188+anmolsinghbhatia@users.noreply.github.com> Date: Thu, 8 Aug 2024 20:10:53 +0530 Subject: [PATCH] chore: state progress color consistency (#787) --- web/core/constants/cycle.ts | 24 ------------------- web/ee/components/active-cycles/progress.tsx | 6 ++--- .../cycles/active-cycles/progress.tsx | 8 +++---- 3 files changed, 7 insertions(+), 31 deletions(-) diff --git a/web/core/constants/cycle.ts b/web/core/constants/cycle.ts index 26addbfbc3..8ea15c5bc1 100644 --- a/web/core/constants/cycle.ts +++ b/web/core/constants/cycle.ts @@ -127,27 +127,3 @@ export const WORKSPACE_ACTIVE_CYCLES_DETAILS = [ icon: Microscope, }, ]; - -// ee -export const WORKSPACE_ACTIVE_CYCLE_STATE_GROUPS_DETAILS = [ - { - key: "completed_issues", - title: "Completed", - color: "#6490FE", - }, - { - key: "started_issues", - title: "Started", - color: "#FDD97F", - }, - { - key: "unstarted_issues", - title: "Unstarted", - color: "#FEB055", - }, - { - key: "backlog_issues", - title: "Backlog", - color: "#F0F0F3", - }, -]; diff --git a/web/ee/components/active-cycles/progress.tsx b/web/ee/components/active-cycles/progress.tsx index ad0711e517..91f2f979a7 100644 --- a/web/ee/components/active-cycles/progress.tsx +++ b/web/ee/components/active-cycles/progress.tsx @@ -6,7 +6,7 @@ import { LinearProgressIndicator } from "@plane/ui"; // components import { EmptyState } from "@/components/empty-state"; // constants -import { WORKSPACE_ACTIVE_CYCLE_STATE_GROUPS_DETAILS } from "@/constants/cycle"; +import { PROGRESS_STATE_GROUPS_DETAILS } from "@/constants/common"; import { EmptyStateType } from "@/constants/empty-state"; export type ActiveCycleProgressProps = { @@ -16,7 +16,7 @@ export type ActiveCycleProgressProps = { export const ActiveCycleProgress: FC = (props) => { const { cycle } = props; - const progressIndicatorData = WORKSPACE_ACTIVE_CYCLE_STATE_GROUPS_DETAILS.map((group, index) => ({ + const progressIndicatorData = PROGRESS_STATE_GROUPS_DETAILS.map((group, index) => ({ id: index, name: group.title, value: cycle.total_issues > 0 ? (cycle[group.key as keyof ICycle] as number) : 0, @@ -57,7 +57,7 @@ export const ActiveCycleProgress: FC = (props) => { {group} diff --git a/web/ee/components/cycles/active-cycles/progress.tsx b/web/ee/components/cycles/active-cycles/progress.tsx index 52c3d159f6..31cebc7232 100644 --- a/web/ee/components/cycles/active-cycles/progress.tsx +++ b/web/ee/components/cycles/active-cycles/progress.tsx @@ -4,7 +4,7 @@ import { ICycle } from "@plane/types"; // ui import { LinearProgressIndicator, Loader } from "@plane/ui"; // constants -import { WORKSPACE_ACTIVE_CYCLE_STATE_GROUPS_DETAILS } from "@/constants/cycle"; +import { PROGRESS_STATE_GROUPS_DETAILS } from "@/constants/common"; export type ActiveCycleProgressProps = { cycle: ICycle; @@ -13,7 +13,7 @@ export type ActiveCycleProgressProps = { export const ActiveCycleProgress: FC = (props) => { const { cycle } = props; - const progressIndicatorData = WORKSPACE_ACTIVE_CYCLE_STATE_GROUPS_DETAILS.map((group, index) => ({ + const progressIndicatorData = PROGRESS_STATE_GROUPS_DETAILS.map((group, index) => ({ id: index, name: group.title, value: cycle.total_issues > 0 ? (cycle[group.key as keyof ICycle] as number) : 0, @@ -60,7 +60,7 @@ export const ActiveCycleProgress: FC = (props) => { {group} @@ -78,7 +78,7 @@ export const ActiveCycleProgress: FC = (props) => { {group}