From a26cf199f792fa9fc8d529fa56bc91640177992b Mon Sep 17 00:00:00 2001 From: guru_sainath Date: Mon, 3 Jun 2024 21:53:17 +0530 Subject: [PATCH] fix: updated the issue create sorting --- web/components/estimates/delete/modal.tsx | 4 ++-- web/components/estimates/points/create-root.tsx | 12 +++++------- web/components/estimates/points/edit-root.tsx | 2 +- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/web/components/estimates/delete/modal.tsx b/web/components/estimates/delete/modal.tsx index 83f0f49cc..dc72e83be 100644 --- a/web/components/estimates/delete/modal.tsx +++ b/web/components/estimates/delete/modal.tsx @@ -60,8 +60,8 @@ export const DeleteEstimateModal: FC = observer((props) => {/* estimate steps */}
-
- Deleting the estimate {estimate?.name} +
+ Deleting the estimate {estimate?.name}  system will remove it from all issues permanently. This action cannot be undone. If you add estimates again, you will need to update all the issues.
diff --git a/web/components/estimates/points/create-root.tsx b/web/components/estimates/points/create-root.tsx index 244ec0727..1f9315b4f 100644 --- a/web/components/estimates/points/create-root.tsx +++ b/web/components/estimates/points/create-root.tsx @@ -7,8 +7,6 @@ import { Button, Sortable } from "@plane/ui"; import { EstimatePointCreate, EstimatePointItemPreview } from "@/components/estimates/points"; // constants import { maxEstimatesCount } from "@/constants/estimates"; -// hooks -import { useEstimate } from "@/hooks/store"; type TEstimatePointCreateRoot = { workspaceSlug: string; @@ -22,8 +20,6 @@ type TEstimatePointCreateRoot = { export const EstimatePointCreateRoot: FC = observer((props) => { // props const { workspaceSlug, projectId, estimateId, estimateType, estimatePoints, setEstimatePoints } = props; - // hooks - const { asJson: estimate, updateEstimateSortOrder } = useEstimate(estimateId); // states const [estimatePointCreate, setEstimatePointCreate] = useState(undefined); @@ -76,13 +72,14 @@ export const EstimatePointCreateRoot: FC = observer((p const handleDragEstimatePoints = (updatedEstimatedOrder: TEstimatePointsObject[]) => { const updatedEstimateKeysOrder = updatedEstimatedOrder.map((item, index) => ({ ...item, key: index + 1 })); - updateEstimateSortOrder(workspaceSlug, projectId, updatedEstimateKeysOrder); + setEstimatePoints(() => updatedEstimateKeysOrder); }; if (!workspaceSlug || !projectId) return <>; return (
-
{estimate?.type}
+
{estimateType}
+
= observer((p keyExtractor={(item: TEstimatePointsObject) => item?.id?.toString() || item.value.toString()} />
+ {estimatePointCreate && estimatePointCreate.map((estimatePoint) => ( = observer((p }) } > - Add {estimate?.type} + Add {estimateType} )}
diff --git a/web/components/estimates/points/edit-root.tsx b/web/components/estimates/points/edit-root.tsx index f1277c515..d0416138c 100644 --- a/web/components/estimates/points/edit-root.tsx +++ b/web/components/estimates/points/edit-root.tsx @@ -2,7 +2,7 @@ import { FC, Fragment, useState } from "react"; import { observer } from "mobx-react"; import { Plus } from "lucide-react"; import { TEstimatePointsObject } from "@plane/types"; -import { Button, Draggable, Sortable, TOAST_TYPE, setToast } from "@plane/ui"; +import { Button, Sortable, TOAST_TYPE, setToast } from "@plane/ui"; // components import { EstimatePointItemPreview, EstimatePointCreate } from "@/components/estimates/points"; // constants