From 38a63f9e5ded67806896c6952a90e890ceae9d2c Mon Sep 17 00:00:00 2001 From: Muhammad Sulaiman Yusuf Date: Tue, 18 Oct 2022 14:41:42 +0700 Subject: [PATCH] bug fix --- src/components/BottomModal/BottomModal.js | 10 +++++----- src/views/Dashboard/DashboardCustomer.js | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/BottomModal/BottomModal.js b/src/components/BottomModal/BottomModal.js index 1e57f88..69b04c3 100644 --- a/src/components/BottomModal/BottomModal.js +++ b/src/components/BottomModal/BottomModal.js @@ -44,8 +44,9 @@ const BottomModal = ({title, tableHeader, tableData, closeModal, isReady}) => { if (key === 'project_name') { let URL = `/#/dashboard-project/${item['id']}/${item['last_gantt_id']}`; row.push({item[key]}) - } - else { + } else if(key === 'last_gantt_id') { + } else if(key === 'id') { + } else { row.push({item[key]}) } }) @@ -58,7 +59,6 @@ const BottomModal = ({title, tableHeader, tableData, closeModal, isReady}) => { - {tableHeader && tableHeader.length > 0 && tableHeader.map((item, idx) => ( @@ -78,7 +78,7 @@ const BottomModal = ({title, tableHeader, tableData, closeModal, isReady}) => {
#{item.title}
) } - + return ( // // @@ -174,4 +174,4 @@ const BottomModal = ({title, tableHeader, tableData, closeModal, isReady}) => { ) } -export default BottomModal; \ No newline at end of file +export default BottomModal; diff --git a/src/views/Dashboard/DashboardCustomer.js b/src/views/Dashboard/DashboardCustomer.js index 6b7e3b4..613bf44 100644 --- a/src/views/Dashboard/DashboardCustomer.js +++ b/src/views/Dashboard/DashboardCustomer.js @@ -115,7 +115,7 @@ const DashboardCustomer = () => { const payload = { "project_id": PROJECT_ID.toString(), "period": "week", - "end_date": moment(new Date()).format('YYYY-MM-DD') + // "end_date": moment(new Date()).format('YYYY-MM-DD') } const result = await axios.post(URL, payload, HEADER).then(res => res).catch(err => err.response) console.log('getSCurve', result);