From f1f716e8f6bfc8cf4f93f023f614a864962661af Mon Sep 17 00:00:00 2001 From: Aaryan Khandelwal <65252264+aaryan610@users.noreply.github.com> Date: Tue, 11 Apr 2023 18:17:47 +0530 Subject: [PATCH] fix: estimates bugs (#785) * fix: dashboard workspace activity mutation * fix: minor bugs --- .../estimates/estimate-points-modal.tsx | 2 +- .../components/estimates/single-estimate.tsx | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/apps/app/components/estimates/estimate-points-modal.tsx b/apps/app/components/estimates/estimate-points-modal.tsx index f478f0a5b..b14c33c03 100644 --- a/apps/app/components/estimates/estimate-points-modal.tsx +++ b/apps/app/components/estimates/estimate-points-modal.tsx @@ -337,7 +337,7 @@ export const EstimatePointsModal: React.FC = ({ isOpen, data, estimate, o
handleClose()}>Cancel - {data + {data && data.length > 0 ? isSubmitting ? "Updating Points..." : "Update Points" diff --git a/apps/app/components/estimates/single-estimate.tsx b/apps/app/components/estimates/single-estimate.tsx index f65002937..1d626f5fd 100644 --- a/apps/app/components/estimates/single-estimate.tsx +++ b/apps/app/components/estimates/single-estimate.tsx @@ -107,14 +107,16 @@ export const SingleEstimate: React.FC = ({

- {projectDetails?.estimate !== estimate.id && ( - -
- - Use estimate -
-
- )} + {projectDetails?.estimate !== estimate.id && + estimatePoints && + estimatePoints.length > 0 && ( + +
+ + Use estimate +
+
+ )} setIsEstimatePointsModalOpen(true)}>