From 0aaeb16ea7eda0fecd9be40c4a121a1cf67b4f61 Mon Sep 17 00:00:00 2001 From: Wahyu Ramadhan Date: Tue, 27 Jun 2023 09:17:22 +0700 Subject: [PATCH 1/2] Fix health by budget --- src/views/Dashboard/Components/index.js | 2 +- src/views/Dashboard/DashboardBOD.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/Dashboard/Components/index.js b/src/views/Dashboard/Components/index.js index ab99df1..68afd54 100644 --- a/src/views/Dashboard/Components/index.js +++ b/src/views/Dashboard/Components/index.js @@ -106,7 +106,7 @@ export const HealthByBudget = ({status}) => { let bgColor = '#52AC0B'; // on-budget if (status && status !== '-') { if (status === 'warning') bgColor = '#ED7014'; - else if (status === 'danger') bgColor = '#D0312D'; + else if (status === 'overrun') bgColor = '#D0312D'; } return (
diff --git a/src/views/Dashboard/DashboardBOD.js b/src/views/Dashboard/DashboardBOD.js index 9f8c8f7..fff92ef 100644 --- a/src/views/Dashboard/DashboardBOD.js +++ b/src/views/Dashboard/DashboardBOD.js @@ -347,7 +347,7 @@ const DashboardBOD = () => { "invoice": item.invoice?.invoiced ? toRupiah(item.invoice.invoiced) : '-', "cash_in": item.invoice?.paid ? toRupiah(item.invoice.paid) : '-', "outstanding_balance": outstanding_balance, - "budget": , + "budget": , "schedule": }) }); From 9d8f2013456d5027f2fc1184b83de8506dd6e1a6 Mon Sep 17 00:00:00 2001 From: Wahyu Ramadhan Date: Sun, 2 Jul 2023 13:51:57 +0700 Subject: [PATCH 2/2] Initial linear curve --- src/containers/DefaultLayout/DefaultLayout.js | 21 ++++++++++-- src/routes.js | 1 + src/views/Dashboard/DashboardProject.js | 21 +++++++++++- .../SimproV2/CreatedProyek/DialogHierarchy.js | 1 + src/views/SimproV2/CreatedProyek/index.js | 34 +++++++++++++++++-- 5 files changed, 72 insertions(+), 6 deletions(-) diff --git a/src/containers/DefaultLayout/DefaultLayout.js b/src/containers/DefaultLayout/DefaultLayout.js index 280fa71..0ef378c 100644 --- a/src/containers/DefaultLayout/DefaultLayout.js +++ b/src/containers/DefaultLayout/DefaultLayout.js @@ -1,5 +1,5 @@ import React, { Component, Suspense, Divider } from 'react'; -import { Redirect, Route, Switch } from 'react-router-dom'; +import { Redirect, Route, Switch, withRouter } from 'react-router-dom'; import * as router from 'react-router-dom'; import { Button, Container, UncontrolledDropdown, DropdownItem, DropdownMenu, DropdownToggle, Nav, NavItem } from 'reactstrap'; import axios from 'axios'; @@ -229,10 +229,25 @@ class DefaultLayout extends Component { } render() { + const { location } = this.props; + const { pathname } = location; + let renderSidebar = false + + if (pathname.includes("/dashboard-project")) { + // Remove the base URL and hash + const path = pathname.replace("/dashboard-project/", ""); + + // Split the remaining path by "/" + const parts = path.split("/"); + if (parts[2] == "1") { + renderSidebar = true + } + } + return (
- {!window.location.href.includes("dashboard-project") ? ( + {!window.location.href.includes("dashboard-project") || renderSidebar ? ( {/*