diff --git a/src/actions/bmdashboard/issueChartActions.js b/src/actions/bmdashboard/issueChartActions.js index 12f8b4ad4f8..6a0f34a503a 100644 --- a/src/actions/bmdashboard/issueChartActions.js +++ b/src/actions/bmdashboard/issueChartActions.js @@ -53,10 +53,8 @@ const formatFilters = ({ projectIds, startDate, endDate } = {}) => { ) { formatted.projectIds = Array.isArray(projectIds) ? projectIds.join(',') : projectIds.trim(); } - if (startDate !== undefined && startDate !== '') { + if (startDate !== undefined && startDate !== '' && endDate !== undefined && endDate !== '') { formatted.startDate = startDate; - } - if (endDate !== undefined && endDate !== '') { formatted.endDate = endDate; } return formatted; @@ -69,7 +67,7 @@ export const fetchLongestOpenIssues = filters => async dispatch => { const response = await axios.get(ENDPOINTS.BM_LONGEST_OPEN_ISSUES, { params: formattedFilters, }); - dispatch({ type: FETCH_LONGEST_OPEN_ISSUES_SUCCESS, payload: response.data }); + dispatch({ type: FETCH_LONGEST_OPEN_ISSUES_SUCCESS, payload: response.data.data }); } catch (error) { dispatch({ type: FETCH_LONGEST_OPEN_ISSUES_FAILURE, @@ -85,7 +83,7 @@ export const fetchMostExpensiveIssues = filters => async dispatch => { const response = await axios.get(ENDPOINTS.BM_MOST_EXPENSIVE_ISSUES, { params: formattedFilters, }); - dispatch({ type: FETCH_MOST_EXPENSIVE_ISSUES_SUCCESS, payload: response.data }); + dispatch({ type: FETCH_MOST_EXPENSIVE_ISSUES_SUCCESS, payload: response.data.data }); } catch (error) { dispatch({ type: FETCH_MOST_EXPENSIVE_ISSUES_FAILURE, diff --git a/src/components/BMDashboard/InteractiveMap/InteractiveMap.jsx b/src/components/BMDashboard/InteractiveMap/InteractiveMap.jsx index 6163c0f3d4e..5cae710a9b2 100644 --- a/src/components/BMDashboard/InteractiveMap/InteractiveMap.jsx +++ b/src/components/BMDashboard/InteractiveMap/InteractiveMap.jsx @@ -541,17 +541,17 @@ export default function InteractiveMap() {
{name}
{`Hours: ${value} hrs`}
{`Percentage: ${percent}%`}
@@ -298,17 +300,13 @@ export default function DistributionLaborHours() { {filteredData.map((entry, index) => (