|
|
@ -101,8 +101,11 @@ const DashboardCustomer = () => { |
|
|
|
|
|
|
|
|
|
|
|
const getProjectDetail = async () => { |
|
|
|
const getProjectDetail = async () => { |
|
|
|
setIsReadyProjectDetail(false); |
|
|
|
setIsReadyProjectDetail(false); |
|
|
|
const URL = `${BASE_OSPRO}/api/project/detail/${PROJECT_ID}`; |
|
|
|
let URL = `${BASE_OSPRO}/api/project/detail/${PROJECT_ID}`; |
|
|
|
const result = await axios.get(URL, HEADER).then(res => res).catch(err => err.response) |
|
|
|
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); |
|
|
|
console.log('getProjectDetail', result); |
|
|
|
if (!result) { |
|
|
|
if (!result) { |
|
|
|
NotificationManager.error(`Could not connect to internet.`, "Failed"); |
|
|
|
NotificationManager.error(`Could not connect to internet.`, "Failed"); |
|
|
@ -195,7 +198,9 @@ const DashboardCustomer = () => { |
|
|
|
const URL = `${BASE_OSPRO}/api/project/get-overdue-activities`; |
|
|
|
const URL = `${BASE_OSPRO}/api/project/get-overdue-activities`; |
|
|
|
const payload = { |
|
|
|
const payload = { |
|
|
|
"id": PROJECT_ID.toString(), |
|
|
|
"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) |
|
|
|
const result = await axios.post(URL, payload, HEADER).then(res => res).catch(err => err.response) |
|
|
|
console.log('getOverdueActivities', result); |
|
|
|
console.log('getOverdueActivities', result); |
|
|
|