π₯π₯π₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.
TypeScript boardsbug-trackerdjangodockerganttissue-trackerjirajira-alternativekanbanlinearpostgresqlproduct-managementproject-managementproject-planningpythonreactredistypesciptvitework-management
chore: added current cycle to cycle dropdown (#6376)
Vamsi Krishna76fdb81249fb
diff --git a/web/core/components/dropdowns/cycle/cycle-options.tsx b/web/core/components/dropdowns/cycle/cycle-options.tsxindex cd4f4d997d..e720fb78c9 100644--- a/web/core/components/dropdowns/cycle/cycle-options.tsx+++ b/web/core/components/dropdowns/cycle/cycle-options.tsx@@ -31,10 +31,11 @@ type CycleOptionsProps = {placement: Placement | undefined;isOpen: boolean;canRemoveCycle: boolean;+ currentCycleId?: string;};export const CycleOptions: FC<CycleOptionsProps> = observer((props) => {- const { projectId, isOpen, referenceElement, placement, canRemoveCycle } = props;+ const { projectId, isOpen, referenceElement, placement, canRemoveCycle, currentCycleId } = props;//state hooksconst [query, setQuery] = useState("");const [popperElement, setPopperElement] = useState<HTMLDivElement | null>(null);@@ -68,6 +69,7 @@ export const CycleOptions: FC<CycleOptionsProps> = observer((props) => {const cycleIds = (getProjectCycleIds(projectId) ?? [])?.filter((cycleId) => {const cycleDetails = getCycleById(cycleId);+ if (currentCycleId && currentCycleId === cycleId) return false;return cycleDetails?.status ? (cycleDetails?.status.toLowerCase() != "completed" ? true : false) : true;});diff --git a/web/core/components/dropdowns/cycle/index.tsx b/web/core/components/dropdowns/cycle/index.tsxindex 9eb20ba2d9..98124a0a19 100644--- a/web/core/components/dropdowns/cycle/index.tsx+++ b/web/core/components/dropdowns/cycle/index.tsx@@ -26,6 +26,7 @@ type Props = TDropdownProps & {value: string | null;canRemoveCycle?: boolean;renderByDefault?: boolean;+ currentCycleId?: string;};export const CycleDropdown: React.FC<Props> = observer((props) => {@@ -49,6 +50,7 @@ export const CycleDropdown: React.FC<Props> = observer((props) => {value,canRemoveCycle = true,renderByDefault = true,+ currentCycleId,} = props;// states@@ -145,6 +147,7 @@ export const CycleDropdown: React.FC<Props> = observer((props) => {placement={placement}referenceElement={referenceElement}canRemoveCycle={canRemoveCycle}+ currentCycleId={currentCycleId}/>)}</ComboDropDown>