From 628cb6b637e0f10e98a42ad11b656359e0d631a9 Mon Sep 17 00:00:00 2001 From: Muhammad Sulaiman Yusuf Date: Tue, 18 Oct 2022 05:55:05 +0700 Subject: [PATCH 1/4] uji teori --- src/containers/DefaultLayout/DefaultLayout.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/containers/DefaultLayout/DefaultLayout.js b/src/containers/DefaultLayout/DefaultLayout.js index e2e7f66..af29be9 100644 --- a/src/containers/DefaultLayout/DefaultLayout.js +++ b/src/containers/DefaultLayout/DefaultLayout.js @@ -269,7 +269,9 @@ class DefaultLayout extends Component { )} /> ) : (null); })} - + { this.state.role_id == 28 ? ( + + ) : } From 8910bd730d69c37917ccd6f69e0b08cb32c8ecec Mon Sep 17 00:00:00 2001 From: Muhammad Sulaiman Yusuf Date: Tue, 18 Oct 2022 06:10:56 +0700 Subject: [PATCH 2/4] redirect client login --- src/containers/DefaultLayout/DefaultLayout.js | 4 +--- src/views/Pages/Login/Login.js | 3 +++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/containers/DefaultLayout/DefaultLayout.js b/src/containers/DefaultLayout/DefaultLayout.js index af29be9..17045f1 100644 --- a/src/containers/DefaultLayout/DefaultLayout.js +++ b/src/containers/DefaultLayout/DefaultLayout.js @@ -269,9 +269,7 @@ class DefaultLayout extends Component { )} /> ) : (null); })} - { this.state.role_id == 28 ? ( - - ) : } + diff --git a/src/views/Pages/Login/Login.js b/src/views/Pages/Login/Login.js index d788e92..bc66be8 100644 --- a/src/views/Pages/Login/Login.js +++ b/src/views/Pages/Login/Login.js @@ -108,6 +108,9 @@ class Login extends Component { let resData = result.data.data window.localStorage.setItem('menu_login', JSON.stringify(resData)); this.setState({ loader: false }) + if(role_id == 48){ + this.props.history.push("/dashboard-customer/48/50"); + } this.props.history.push("/dashboard"); } else { NotificationManager.error('Login Failed', 'Failed'); From e942e5eccc1c063b01d81037198fa5ad0cb89ab4 Mon Sep 17 00:00:00 2001 From: Muhammad Sulaiman Yusuf Date: Tue, 18 Oct 2022 06:16:52 +0700 Subject: [PATCH 3/4] redirect client login --- src/views/Pages/Login/Login.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/Pages/Login/Login.js b/src/views/Pages/Login/Login.js index bc66be8..77915fc 100644 --- a/src/views/Pages/Login/Login.js +++ b/src/views/Pages/Login/Login.js @@ -108,7 +108,7 @@ class Login extends Component { let resData = result.data.data window.localStorage.setItem('menu_login', JSON.stringify(resData)); this.setState({ loader: false }) - if(role_id == 48){ + if(role_id == 28){ this.props.history.push("/dashboard-customer/48/50"); } this.props.history.push("/dashboard"); From 4a18187c891c6ae8abb1521d796c0a80bb3a32f9 Mon Sep 17 00:00:00 2001 From: Muhammad Sulaiman Yusuf Date: Tue, 18 Oct 2022 06:30:20 +0700 Subject: [PATCH 4/4] update endpoint gantt customer --- src/views/Dashboard/DashboardCustomer.js | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/views/Dashboard/DashboardCustomer.js b/src/views/Dashboard/DashboardCustomer.js index ce3045e..6b7e3b4 100644 --- a/src/views/Dashboard/DashboardCustomer.js +++ b/src/views/Dashboard/DashboardCustomer.js @@ -34,10 +34,7 @@ const DashboardCustomer = () => { } } const { PROJECT_ID, GANTT_ID } = useParams(); - // const URL_GANTT = `http://103.73.125.81:8446/index.html?base_url=http://103.73.125.81:8444/api&gantt_id=${GANTT_ID}&proyek_id=${PROJECT_ID}&token=${token}&ro=1`; - // const URL_GANTT = `https://adw-gantt.ospro.id/index.html?base_url=${BASE_OSPRO}/api&gantt_id=${GANTT_ID}&proyek_id=${PROJECT_ID}&token=${token}&ro=1`; - // const URL_GANTT = ''; - const URL_GANTT = `http://192.168.1.104:8446/view-mode/index.html?base_url=${BASE_OSPRO}/api&gantt_id=${GANTT_ID}&proyek_id=${PROJECT_ID}&token=${token}&ro=1`; + const URL_GANTT = `https://adw-gantt.ospro.id/view-mode/index.html?base_url=${BASE_OSPRO}/api&gantt_id=${GANTT_ID}&proyek_id=${PROJECT_ID}&token=${token}&ro=1`; const mapRef = useRef() const [projectName, setProjectName] = useState(""); const [projectManagerName, setProjectManagerName] = useState(''); @@ -64,7 +61,7 @@ const DashboardCustomer = () => { const [healthBySchedule, setHealthBySchedule] = useState('-'); const [healthByBudget, setHealthByBudget] = useState('-'); const [reportDistribution, setReportDistribution] = useState([]); - + useEffect(() => { getProjectDetail(); getSCurve() @@ -316,7 +313,7 @@ const DashboardCustomer = () => { if (reportDistribution.length > 0) { reportDistribution.map((item, idx) => { L.marker([item.lat, item.lon]).addTo(mymap).bindPopup(PopupContent(item)) - }); + }); } } }, [mymap, reportDistribution]) @@ -347,7 +344,7 @@ const DashboardCustomer = () => {
{!isReadyComments && } {isReadyComments && comments && comments.length < 1 &&
No comments found.
} - {comments && comments.length > 0 && comments.map((item, idx) => + {comments && comments.length > 0 && comments.map((item, idx) => )}
@@ -497,13 +494,13 @@ const DashboardCustomer = () => { {isReadySCurve ? : - + }
{isReadySCurve ? : - + }