From fba54041bf19b1af982bd52ec28b019eb518fbba Mon Sep 17 00:00:00 2001 From: Nguyen Viet Date: Mon, 26 Jul 2021 19:07:17 +0700 Subject: [PATCH] fix issue 4428 --- .../SimplePlan/ManageMilestones/ManageMilestones.jsx | 2 +- src/projects/detail/containers/DashboardContainer.jsx | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/projects/detail/components/SimplePlan/ManageMilestones/ManageMilestones.jsx b/src/projects/detail/components/SimplePlan/ManageMilestones/ManageMilestones.jsx index 241c378d4..fbaea6e1e 100644 --- a/src/projects/detail/components/SimplePlan/ManageMilestones/ManageMilestones.jsx +++ b/src/projects/detail/components/SimplePlan/ManageMilestones/ManageMilestones.jsx @@ -105,7 +105,7 @@ class ManageMilestones extends React.Component { {/* END DATE */} {/* STATUS */} {/* BUDGET */} - {/* COPILOTS */} + {/* */}{/* COPILOTS */} {isUpdatable && ()}{/* ACTION */} diff --git a/src/projects/detail/containers/DashboardContainer.jsx b/src/projects/detail/containers/DashboardContainer.jsx index 17b7a8c68..90d4ecbb9 100644 --- a/src/projects/detail/containers/DashboardContainer.jsx +++ b/src/projects/detail/containers/DashboardContainer.jsx @@ -304,9 +304,10 @@ class DashboardContainer extends React.Component { ) : (
- {((!hasPermission(PERMISSIONS.MANAGE_PROJECT_PLAN) && (!visiblePhases || visiblePhases.length === 0)) + {/* check if visiblePhases/phases is non-null and empty */} + {((!hasPermission(PERMISSIONS.MANAGE_PROJECT_PLAN) && (visiblePhases && visiblePhases.length === 0)) || (hasPermission(PERMISSIONS.MANAGE_PROJECT_PLAN) && - (!phases || phases.length === 0) && + (phases && phases.length === 0) && (!this.state.createGameplanPhases || this.state.createGameplanPhases.length === 0)) ) && (
@@ -332,7 +333,7 @@ class DashboardContainer extends React.Component { isCustomer={!hasPermission(PERMISSIONS.MANAGE_PROJECT_PLAN)} project={project} phases={phases} - milestones={this.state.createGameplanPhases || phases} + milestones={this.state.createGameplanPhases || visiblePhases || []} onChangeMilestones={(milestones) => { this.setState({createGameplanPhases: milestones}) }}