Browse Source

fix bug overdue & Summary

pull/1/head
wahyuun 1 year ago
parent
commit
1e8c6e8007
  1. 13
      src/views/Dashboard/DashboardCustomer.js

13
src/views/Dashboard/DashboardCustomer.js

@ -101,8 +101,11 @@ const DashboardCustomer = () => {
const getProjectDetail = async () => {
setIsReadyProjectDetail(false);
const URL = `${BASE_OSPRO}/api/project/detail/${PROJECT_ID}`;
const result = await axios.get(URL, HEADER).then(res => res).catch(err => err.response)
let URL = `${BASE_OSPRO}/api/project/detail/${PROJECT_ID}`;
URL = `${BASE_OSPRO}/api/project/detail/${PROJECT_ID}/${GANTT_ID}/1`
const result = await axios.get(URL, HEADER)
.then(res => res)
.catch(err => err.response)
console.log('getProjectDetail', result);
if (!result) {
NotificationManager.error(`Could not connect to internet.`, "Failed");
@ -195,7 +198,9 @@ const DashboardCustomer = () => {
const URL = `${BASE_OSPRO}/api/project/get-overdue-activities`;
const payload = {
"id": PROJECT_ID.toString(),
"till_date": moment(new Date()).format('YYYY-MM-DD')
"till_date": moment(new Date()).format('YYYY-MM-DD'),
'gantt': GANTT_ID.toString(),
'scurve': SCURVE ? SCURVE.toString() : null
}
const result = await axios.post(URL, payload, HEADER).then(res => res).catch(err => err.response)
console.log('getOverdueActivities', result);
@ -431,7 +436,7 @@ const DashboardCustomer = () => {
<div style={{ display: 'flex', flexDirection: 'row', marginBottom: 10 }}>
<div style={{ flex: 20, display: 'flex', flexDirection: 'column' }}>
<div style={{fontSize: 16, fontWeight: 'bold', marginBottom: 10}}>Project</div>
<div style={{fontSize: 14}}>{isReadyProjectDetail
<div style={{fontSize: 14}}>{isReadyProjectDetail
? projectName
? calculationStatus
? projectName + " - S-Curve Ready"

Loading…
Cancel
Save