From 93fec2c67843e884872fae099e5c0d10d66b48e8 Mon Sep 17 00:00:00 2001 From: Anmol Singh Bhatia <121005188+anmolsinghbhatia@users.noreply.github.com> Date: Fri, 18 Aug 2023 14:23:13 +0530 Subject: [PATCH] fix: completed cycle validation , style: assignee count alignment fix (#1901) * style: assignee count alignment fix * fix: completed cycle validation --- apps/app/components/cycles/single-cycle-card.tsx | 3 +-- apps/app/components/cycles/single-cycle-list.tsx | 3 +-- apps/app/components/ui/avatar.tsx | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/apps/app/components/cycles/single-cycle-card.tsx b/apps/app/components/cycles/single-cycle-card.tsx index 8808940f1..0822ba26a 100644 --- a/apps/app/components/cycles/single-cycle-card.tsx +++ b/apps/app/components/cycles/single-cycle-card.tsx @@ -45,7 +45,6 @@ type TSingleStatProps = { handleDeleteCycle: () => void; handleAddToFavorites: () => void; handleRemoveFromFavorites: () => void; - isCompleted?: boolean; }; const stateGroups = [ @@ -82,7 +81,6 @@ export const SingleCycleCard: React.FC = ({ handleDeleteCycle, handleAddToFavorites, handleRemoveFromFavorites, - isCompleted = false, }) => { const router = useRouter(); const { workspaceSlug, projectId } = router.query; @@ -90,6 +88,7 @@ export const SingleCycleCard: React.FC = ({ const { setToastAlert } = useToast(); const cycleStatus = getDateRangeStatus(cycle.start_date, cycle.end_date); + const isCompleted = cycleStatus === "completed"; const endDate = new Date(cycle.end_date ?? ""); const startDate = new Date(cycle.start_date ?? ""); diff --git a/apps/app/components/cycles/single-cycle-list.tsx b/apps/app/components/cycles/single-cycle-list.tsx index 813264986..7518568ed 100644 --- a/apps/app/components/cycles/single-cycle-list.tsx +++ b/apps/app/components/cycles/single-cycle-list.tsx @@ -34,7 +34,6 @@ type TSingleStatProps = { handleDeleteCycle: () => void; handleAddToFavorites: () => void; handleRemoveFromFavorites: () => void; - isCompleted?: boolean; }; const stateGroups = [ @@ -113,7 +112,6 @@ export const SingleCycleList: React.FC = ({ handleDeleteCycle, handleAddToFavorites, handleRemoveFromFavorites, - isCompleted = false, }) => { const router = useRouter(); const { workspaceSlug, projectId } = router.query; @@ -121,6 +119,7 @@ export const SingleCycleList: React.FC = ({ const { setToastAlert } = useToast(); const cycleStatus = getDateRangeStatus(cycle.start_date, cycle.end_date); + const isCompleted = cycleStatus === "completed"; const endDate = new Date(cycle.end_date ?? ""); const startDate = new Date(cycle.start_date ?? ""); diff --git a/apps/app/components/ui/avatar.tsx b/apps/app/components/ui/avatar.tsx index 8cd09fe6e..d60baa56e 100644 --- a/apps/app/components/ui/avatar.tsx +++ b/apps/app/components/ui/avatar.tsx @@ -106,7 +106,7 @@ export const AssigneesList: React.FC = ({ ))} {users.length > length ? (
-
+
{users.length - length}