From 8062623fa5476d483a8711d31672512ef1bbe3ba Mon Sep 17 00:00:00 2001 From: wahyu Date: Mon, 23 Oct 2023 09:10:20 +0700 Subject: [PATCH 1/2] bypass hierarchy check --- src/views/Dashboard/DashboardProject.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/Dashboard/DashboardProject.js b/src/views/Dashboard/DashboardProject.js index 2cf31c8..f8e59a3 100644 --- a/src/views/Dashboard/DashboardProject.js +++ b/src/views/Dashboard/DashboardProject.js @@ -357,7 +357,7 @@ const DashboardProject = () => { const getSCurve = async () => { setIsReadySCurve(false); let URL = `${BASE_OSPRO}/api/project/get-s-curve`; - if (SCURVE && SCURVE == "1" && isHierarchy) { + if (SCURVE && SCURVE == "1") { URL = `${BASE_OSPRO}/api/project/calculate-s-curve`; } From 13634db178f8a09198c532ba17766983f5a9052e Mon Sep 17 00:00:00 2001 From: wahyuun Date: Mon, 23 Oct 2023 09:34:34 +0700 Subject: [PATCH 2/2] update condition --- src/views/Dashboard/DashboardProject.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/views/Dashboard/DashboardProject.js b/src/views/Dashboard/DashboardProject.js index f2f812a..6ea12e2 100644 --- a/src/views/Dashboard/DashboardProject.js +++ b/src/views/Dashboard/DashboardProject.js @@ -126,8 +126,6 @@ const DashboardProject = () => { const [calculationStatus, setCalculationStatus] = useState(false); const [isHierarchy, setIsHierarchy] = useState(false); let history = useHistory(); - let location = useLocation(); - const isDashboardProject = location.pathname.includes('dashboard-project'); useEffect(() => { getProjectDetail(); @@ -1019,7 +1017,7 @@ const DashboardProject = () => { - +
{
- {isDashboardProject ? ( + {SCURVE ? (
{ - {isDashboardProject ? ( + {SCURVE ? (