diff --git a/src/actions/HTS/Linkage/linkageNumberNotLinkedByFacilityActions.js b/src/actions/HTS/Linkage/linkageNumberNotLinkedByFacilityActions.js index d7619e89..4095bb47 100644 --- a/src/actions/HTS/Linkage/linkageNumberNotLinkedByFacilityActions.js +++ b/src/actions/HTS/Linkage/linkageNumberNotLinkedByFacilityActions.js @@ -39,10 +39,10 @@ export const fetchLinkageNumberNotLinkedByFacility = () => async (dispatch, getS : '', fromDate: getState().filters.fromDate ? moment(getState().filters.fromDate, 'MMM YYYY').format('YYYYMM') - : moment().subtract(2, 'month').add(17, 'days').format('YYYYMM'), + : moment().subtract(2, 'month').add(10, 'days').format('YYYYMM'), toDate: getState().filters.toDate ? moment(getState().filters.toDate, 'MMM YYYY').format('YYYYMM') - : moment().subtract(2, 'month').add(17, 'days').format('YYYYMM'), + : moment().subtract(2, 'month').add(10, 'days').format('YYYYMM'), }; const response = await getAll('hts/linkageNumberNotLinkedByFacility', params); dispatch({ type: actionTypes.HTS_LINKAGE_NUMBER_NOT_LINKED_BY_FACILITY_FETCH, payload: { filtered: getState().filters.filtered, list: response }}); diff --git a/src/actions/HTS/Linkage/linkagePositiveTrendsActions.js b/src/actions/HTS/Linkage/linkagePositiveTrendsActions.js index a0352888..138ac575 100644 --- a/src/actions/HTS/Linkage/linkagePositiveTrendsActions.js +++ b/src/actions/HTS/Linkage/linkagePositiveTrendsActions.js @@ -37,7 +37,7 @@ export const fetchLinkagePositiveTrends = () => async (dispatch, getState) => { : '', fromDate: getState().filters.fromDate ? moment(getState().filters.fromDate, 'MMM YYYY').format('YYYYMM') - : moment().subtract(12, 'month').add(17, 'days').format('YYYYMM'), + : moment().subtract(12, 'month').add(10, 'days').format('YYYYMM'), toDate: getState().filters.toDate ? moment(getState().filters.toDate, 'MMM YYYY').format('YYYYMM') : moment().format('YYYYMM'), diff --git a/src/selectors/CT/CurrentOnArt/currentOnArt.js b/src/selectors/CT/CurrentOnArt/currentOnArt.js index 7b5e51b3..ee6573a7 100644 --- a/src/selectors/CT/CurrentOnArt/currentOnArt.js +++ b/src/selectors/CT/CurrentOnArt/currentOnArt.js @@ -19,4 +19,4 @@ export const getCurrentOnArt = createSelector( return list.TXCURR; } -); \ No newline at end of file +); diff --git a/src/views/HTS/Linkage/LinkageByAgeSex.js b/src/views/HTS/Linkage/LinkageByAgeSex.js index 4b9bdeb7..b7fa2629 100644 --- a/src/views/HTS/Linkage/LinkageByAgeSex.js +++ b/src/views/HTS/Linkage/LinkageByAgeSex.js @@ -25,13 +25,13 @@ const LinkageByAgeSex = () => { ? moment(filters.fromDate, 'MMM YYYY').format('YYYYMM') : moment() .subtract(2, 'month') - .add(17, 'days') + .add(10, 'days') .format('YYYYMM'), toDate: filters.toDate ? moment(filters.toDate, 'MMM YYYY').format('YYYYMM') : moment() .subtract(2, 'month') - .add(17, 'days') + .add(10, 'days') .format('YYYYMM'), }; params.month = filters.fromDate ? moment(filters.fromDate, "MMM YYYY").format("MM") : ''; @@ -65,8 +65,14 @@ const LinkageByAgeSex = () => { } } for(let i = 0; i < result.length; i++) { + let ageGroup = result[i].AgeGroup + if([" Under 1", "01 to 04"].includes(result[i].AgeGroup)){ + ageGroup = "Under 5" + }else if(["05 to 09"].includes(result[i].AgeGroup)){ + ageGroup = "5 to 9" + } let sexIndex = sexCategories.indexOf(result[i].Gender.toUpperCase()); - let ageIndex = ageCategories.indexOf(result[i].AgeGroup); + let ageIndex = ageCategories.indexOf(ageGroup); if(sexIndex === -1 || ageIndex === -1) { // unsupported continue; } diff --git a/src/views/HTS/Linkage/LinkageByCounty.js b/src/views/HTS/Linkage/LinkageByCounty.js index 4abf3edc..e71b1255 100644 --- a/src/views/HTS/Linkage/LinkageByCounty.js +++ b/src/views/HTS/Linkage/LinkageByCounty.js @@ -24,13 +24,13 @@ const LinkageByCounty = () => { fromDate: filters.fromDate ? moment(filters.fromDate, 'MMM YYYY').format('YYYYMM') : moment().subtract(2, 'month') - .add(17, 'days') + .add(10, 'days') .format('YYYYMM'), toDate: filters.toDate ? moment(filters.toDate, 'MMM YYYY').format('YYYYMM') : moment() .subtract(2, 'month') - .add(17, 'days') + .add(10, 'days') .format('YYYYMM'), }; params.month = filters.fromDate ? moment(filters.fromDate, "MMM YYYY").format("MM") : ''; diff --git a/src/views/HTS/Linkage/LinkageByPartner.js b/src/views/HTS/Linkage/LinkageByPartner.js index bcfcb604..32e3af94 100644 --- a/src/views/HTS/Linkage/LinkageByPartner.js +++ b/src/views/HTS/Linkage/LinkageByPartner.js @@ -25,13 +25,13 @@ const LinkageByPartner = () => { ? moment(filters.fromDate, 'MMM YYYY').format('YYYYMM') : moment() .subtract(2, 'month') - .add(17, 'days') + .add(10, 'days') .format('YYYYMM'), toDate: filters.toDate ? moment(filters.toDate, 'MMM YYYY').format('YYYYMM') : moment() .subtract(2, 'month') - .add(17, 'days') + .add(10, 'days') .format('YYYYMM'), }; params.month = filters.fromDate ? moment(filters.fromDate, "MMM YYYY").format("MM") : ''; diff --git a/src/views/HTS/Linkage/LinkageByStrategyEntryPoint.js b/src/views/HTS/Linkage/LinkageByStrategyEntryPoint.js index b51785b7..73eed476 100644 --- a/src/views/HTS/Linkage/LinkageByStrategyEntryPoint.js +++ b/src/views/HTS/Linkage/LinkageByStrategyEntryPoint.js @@ -26,13 +26,13 @@ const LinkageByStrategyEntryPoint = () => { ? moment(filters.fromDate, 'MMM YYYY').format('YYYYMM') : moment() .subtract(2, 'month') - .add(17, 'days') + .add(10, 'days') .format('YYYYMM'), toDate: filters.toDate ? moment(filters.toDate, 'MMM YYYY').format('YYYYMM') : moment() .subtract(2, 'month') - .add(17, 'days') + .add(10, 'days') .format('YYYYMM'), }; params.month = filters.fromDate ? moment(filters.fromDate, "MMM YYYY").format("MM") : ''; @@ -78,13 +78,13 @@ const LinkageByStrategyEntryPoint = () => { ? moment(filters.fromDate, 'MMM YYYY').format('YYYYMM') : moment() .subtract(2, 'month') - .add(17, 'days') + .add(10, 'days') .format('YYYYMM'), toDate: filters.toDate ? moment(filters.toDate, 'MMM YYYY').format('YYYYMM') : moment() .subtract(2, 'month') - .add(17, 'days') + .add(10, 'days') .format('YYYYMM'), }; params.month = filters.fromDate ? moment(filters.fromDate, "MMM YYYY").format("MM") : ''; diff --git a/src/views/HTS/Linkage/LinkageNumberPositive.js b/src/views/HTS/Linkage/LinkageNumberPositive.js index 1162b407..3416d3b3 100644 --- a/src/views/HTS/Linkage/LinkageNumberPositive.js +++ b/src/views/HTS/Linkage/LinkageNumberPositive.js @@ -23,12 +23,12 @@ const LinkageNumberPositive = () => { : new Date().getFullYear(), fromDate: filters.fromDate ? moment(filters.fromDate, 'MMM YYYY').format('YYYYMM') - : moment().subtract(14, 'month').format('YYYYMM'), + : moment().subtract(10, 'month').format('YYYYMM'), toDate: filters.toDate ? moment(filters.toDate, 'MMM YYYY').format('YYYYMM') : moment() .subtract(2, 'month') - .add(17, 'days') + .add(10, 'days') .format('YYYYMM'), }; // params.month = filters.fromDate ? moment(filters.fromDate, "MMM YYYY").format("MM") : ''; diff --git a/src/views/HTS/Linkage/LinkageOverview.js b/src/views/HTS/Linkage/LinkageOverview.js index b4c3633d..84663b06 100644 --- a/src/views/HTS/Linkage/LinkageOverview.js +++ b/src/views/HTS/Linkage/LinkageOverview.js @@ -37,13 +37,13 @@ const LinkageOverview = () => { ? moment(filters.fromDate, 'MMM YYYY').format('YYYYMM') : moment() .subtract(2, 'month') - .add(17, 'days') + .add(10, 'days') .format('YYYYMM'), toDate: filters.toDate ? moment(filters.toDate, 'MMM YYYY').format('YYYYMM') : moment() .subtract(2, 'month') - .add(17, 'days') + .add(10, 'days') .format('YYYYMM'), }; const result = await getAll('hts/linkageBySex', params); @@ -60,7 +60,7 @@ const LinkageOverview = () => { femaleLinked: 0, femaleLinkedPercent: 0, } - + for(let i = 0; i < result.length; i++) { data.totalPositive = data.totalPositive + parseInt(result[i].positive); data.totalLinked = data.totalLinked + parseInt(result[i].linked); diff --git a/src/views/HTS/PNS/PNSPositivityTrends.js b/src/views/HTS/PNS/PNSPositivityTrends.js index 30b50ce6..c16940cf 100644 --- a/src/views/HTS/PNS/PNSPositivityTrends.js +++ b/src/views/HTS/PNS/PNSPositivityTrends.js @@ -56,8 +56,8 @@ const PNSPositivityTrends = () => { if((year.toString() === fullYear.toString()) && (result_month <= lastYearMonth && result_year.toString() === lastFullYear.toString())) { continue; } - let positiveR = parseInt(result[i].positive, 10) + parseInt(result2[i] ? result2[i].positive:0, 10); - let positiveRT = parseInt(result3[i].positive ? result3[i].positive:0, 10); + let positiveR = parseInt(result[i].positive, 10) + parseInt(result2[i] ? result2[i]?.positive:0, 10); + let positiveRT = parseInt(result3[i]?.positive ? result3[i]?.positive:0, 10); tested.push(positiveRT); months.push(monthNames[result[i].month] + ' ' + result_year.toString()); linked.push(positiveR); diff --git a/src/views/HTS/Uptake/Uptake.js b/src/views/HTS/Uptake/Uptake.js index 1ab7da62..124f5541 100644 --- a/src/views/HTS/Uptake/Uptake.js +++ b/src/views/HTS/Uptake/Uptake.js @@ -8,7 +8,6 @@ import UptakeOverview from './UptakeOverview'; import UptakeByAgeSex from './UptakeByAgeSex'; import UptakeByCounty from './UptakeByCounty'; import UptakeByPartner from './UptakeByPartner'; -import UptakeByPopulationType from './UptakeByPopulationType'; import UptakeMonthsSinceLastTest from './UptakeMonthsSinceLastTest'; import UptakeTBScreeningAndTBOutcome from './UptakeTBScreeningAndTBOutcome'; import UptakeTestingStrategy from './UptakeTestingStrategy'; diff --git a/src/views/HTS/Uptake/UptakeByAgeSex.js b/src/views/HTS/Uptake/UptakeByAgeSex.js index 20de33c1..bf176230 100644 --- a/src/views/HTS/Uptake/UptakeByAgeSex.js +++ b/src/views/HTS/Uptake/UptakeByAgeSex.js @@ -20,21 +20,21 @@ const UptakeByAgeSex = () => { project: filters.projects, year: filters.fromDate ? moment(filters.fromDate, 'MMM YYYY').format('YYYY') - : moment().subtract(2, 'month').add(17, 'days').format('YYYY'), + : moment().subtract(2, 'month').add(10, 'days').format('YYYY'), month: filters.fromDate ? moment(filters.fromDate, 'MMM YYYY').format('MM') - : moment().subtract(2, 'month').add(17, 'days').format('MM'), + : moment().subtract(2, 'month').add(10, 'days').format('MM'), fromDate: filters.fromDate ? moment(filters.fromDate, 'MMM YYYY').format('YYYYMM') : moment() .subtract(2, 'month') - .add(17, 'days') + .add(10, 'days') .format('YYYYMM'), toDate: filters.toDate ? moment(filters.toDate, 'MMM YYYY').format('YYYYMM') : moment() .subtract(2, 'month') - .add(17, 'days') + .add(10, 'days') .format('YYYYMM'), }; // params.month = filters.fromDate ? moment(filters.fromDate, "MMM YYYY").format("MM") : ''; diff --git a/src/views/HTS/Uptake/UptakeByCounty.js b/src/views/HTS/Uptake/UptakeByCounty.js index 653fbe77..06f372c3 100644 --- a/src/views/HTS/Uptake/UptakeByCounty.js +++ b/src/views/HTS/Uptake/UptakeByCounty.js @@ -20,21 +20,21 @@ const UptakeByCounty = () => { project: filters.projects, year: filters.fromDate ? moment(filters.fromDate, 'MMM YYYY').format('YYYY') - : moment().subtract(2, 'month').add(17, 'days').format('YYYY'), + : moment().subtract(2, 'month').add(10, 'days').format('YYYY'), month: filters.fromDate ? moment(filters.fromDate, 'MMM YYYY').format('MM') - : moment().subtract(2, 'month').add(17, 'days').format('MM'), + : moment().subtract(2, 'month').add(10, 'days').format('MM'), fromDate: filters.fromDate ? moment(filters.fromDate, 'MMM YYYY').format('YYYYMM') : moment() .subtract(2, 'month') - .add(17, 'days') + .add(10, 'days') .format('YYYYMM'), toDate: filters.toDate ? moment(filters.toDate, 'MMM YYYY').format('YYYYMM') : moment() .subtract(2, 'month') - .add(17, 'days') + .add(10, 'days') .format('YYYYMM'), }; // params.month = filters.fromDate ? moment(filters.fromDate, "MMM YYYY").format("MM") : ''; diff --git a/src/views/HTS/Uptake/UptakeByPartner.js b/src/views/HTS/Uptake/UptakeByPartner.js index 0229285b..15850d3d 100644 --- a/src/views/HTS/Uptake/UptakeByPartner.js +++ b/src/views/HTS/Uptake/UptakeByPartner.js @@ -20,21 +20,21 @@ const UptakeByPartner = () => { project: filters.projects, year: filters.fromDate ? moment(filters.fromDate, 'MMM YYYY').format('YYYY') - : moment().subtract(2, 'month').add(17, 'days').format('YYYY'), + : moment().subtract(2, 'month').add(10, 'days').format('YYYY'), month: filters.fromDate ? moment(filters.fromDate, 'MMM YYYY').format('MM') - : moment().subtract(2, 'month').add(17, 'days').format('MM'), + : moment().subtract(2, 'month').add(10, 'days').format('MM'), fromDate: filters.fromDate ? moment(filters.fromDate, 'MMM YYYY').format('YYYYMM') : moment() .subtract(2, 'month') - .add(17, 'days') + .add(10, 'days') .format('YYYYMM'), toDate: filters.toDate ? moment(filters.toDate, 'MMM YYYY').format('YYYYMM') : moment() .subtract(2, 'month') - .add(17, 'days') + .add(10, 'days') .format('YYYYMM'), }; // params.month = filters.fromDate ? moment(filters.fromDate, "MMM YYYY").format("MM") : ''; diff --git a/src/views/HTS/Uptake/UptakeMonthsSinceLastTest.js b/src/views/HTS/Uptake/UptakeMonthsSinceLastTest.js index 53b03e33..a09710b5 100644 --- a/src/views/HTS/Uptake/UptakeMonthsSinceLastTest.js +++ b/src/views/HTS/Uptake/UptakeMonthsSinceLastTest.js @@ -20,21 +20,21 @@ const UptakeMonthsSinceLastTest = () => { project: filters.projects, year: filters.fromDate ? moment(filters.fromDate, 'MMM YYYY').format('YYYY') - : moment().subtract(2, 'month').add(17, 'days').format('YYYY'), + : moment().subtract(2, 'month').add(10, 'days').format('YYYY'), month: filters.fromDate ? moment(filters.fromDate, 'MMM YYYY').format('MM') - : moment().subtract(2, 'month').add(17, 'days').format('MM'), + : moment().subtract(2, 'month').add(10, 'days').format('MM'), fromDate: filters.fromDate ? moment(filters.fromDate, 'MMM YYYY').format('YYYYMM') : moment() .subtract(2, 'month') - .add(17, 'days') + .add(10, 'days') .format('YYYYMM'), toDate: filters.toDate ? moment(filters.toDate, 'MMM YYYY').format('YYYYMM') : moment() .subtract(2, 'month') - .add(17, 'days') + .add(10, 'days') .format('YYYYMM'), }; // params.month = filters.fromDate ? moment(filters.fromDate, "MMM YYYY").format("MM") : ''; diff --git a/src/views/HTS/Uptake/UptakeNumberTestedAndPositivity.js b/src/views/HTS/Uptake/UptakeNumberTestedAndPositivity.js index be0385d6..5b079338 100644 --- a/src/views/HTS/Uptake/UptakeNumberTestedAndPositivity.js +++ b/src/views/HTS/Uptake/UptakeNumberTestedAndPositivity.js @@ -24,11 +24,11 @@ const UptakeNumberTestedAndPositivity = () => { fromDate: filters.fromDate ? moment(filters.fromDate, 'MMM YYYY').format('YYYYMM') : moment().subtract(2, 'month') - .add(17, 'days') + .add(10, 'days') .format('YYYYMM'), toDate: filters.toDate ? moment(filters.toDate, 'MMM YYYY').format('YYYYMM') - : moment().subtract(2, 'month').add(17, 'days').format('YYYYMM'), + : moment().subtract(2, 'month').add(10, 'days').format('YYYYMM'), }; // params.month = filters.fromDate ? moment(filters.fromDate, "MMM YYYY").format("MM") : ''; const result = await getAll('hts/numberTestedAndPositivity', params); diff --git a/src/views/HTS/Uptake/UptakeOverview.js b/src/views/HTS/Uptake/UptakeOverview.js index d7096280..9501833b 100644 --- a/src/views/HTS/Uptake/UptakeOverview.js +++ b/src/views/HTS/Uptake/UptakeOverview.js @@ -29,21 +29,21 @@ const UptakeOverview = () => { project: filters.projects, year: filters.fromDate ? moment(filters.fromDate, 'MMM YYYY').format('YYYY') - : moment().subtract(2, 'month').add(17, 'days').format('YYYY'), + : moment().subtract(2, 'month').add(10, 'days').format('YYYY'), month: filters.fromDate ? moment(filters.fromDate, 'MMM YYYY').format('MM') - : moment().subtract(2, 'month').add(17, 'days').format('MM'), + : moment().subtract(2, 'month').add(10, 'days').format('MM'), fromDate: filters.fromDate ? moment(filters.fromDate, 'MMM YYYY').format('YYYYMM') : moment() .subtract(2, 'month') - .add(17, 'days') + .add(10, 'days') .format('YYYYMM'), toDate: filters.toDate ? moment(filters.toDate, 'MMM YYYY').format('YYYYMM') : moment() .subtract(2, 'month') - .add(17, 'days') + .add(10, 'days') .format('YYYYMM'), }; const result = await getAll('hts/uptakeBySex', params); diff --git a/src/views/HTS/Uptake/UptakeTBScreeningAndTBOutcome.js b/src/views/HTS/Uptake/UptakeTBScreeningAndTBOutcome.js index e57ecb8a..c72c7ca7 100644 --- a/src/views/HTS/Uptake/UptakeTBScreeningAndTBOutcome.js +++ b/src/views/HTS/Uptake/UptakeTBScreeningAndTBOutcome.js @@ -21,21 +21,21 @@ const UptakeTBScreeningAndTBOutcome = () => { project: filters.projects, year: filters.fromDate ? moment(filters.fromDate, 'MMM YYYY').format('YYYY') - : moment().subtract(2, 'month').add(17, 'days').format('YYYY'), + : moment().subtract(2, 'month').add(10, 'days').format('YYYY'), month: filters.fromDate ? moment(filters.fromDate, 'MMM YYYY').format('MM') - : moment().subtract(2, 'month').add(17, 'days').format('MM'), + : moment().subtract(2, 'month').add(10, 'days').format('MM'), fromDate: filters.fromDate ? moment(filters.fromDate, 'MMM YYYY').format('YYYYMM') : moment() .subtract(2, 'month') - .add(17, 'days') + .add(10, 'days') .format('YYYYMM'), toDate: filters.toDate ? moment(filters.toDate, 'MMM YYYY').format('YYYYMM') : moment() .subtract(2, 'month') - .add(17, 'days') + .add(10, 'days') .format('YYYYMM'), }; // params.month = filters.fromDate ? moment(filters.fromDate, "MMM YYYY").format("MM") : ''; diff --git a/src/views/HTS/Uptake/UptakeTestingStrategy.js b/src/views/HTS/Uptake/UptakeTestingStrategy.js index 3d57a6d9..b6d3f4b8 100644 --- a/src/views/HTS/Uptake/UptakeTestingStrategy.js +++ b/src/views/HTS/Uptake/UptakeTestingStrategy.js @@ -21,21 +21,21 @@ const UptakeTestingStrategy = () => { project: filters.projects, year: filters.fromDate ? moment(filters.fromDate, 'MMM YYYY').format('YYYY') - : moment().subtract(2, 'month').add(17, 'days').format('YYYY'), + : moment().subtract(2, 'month').add(10, 'days').format('YYYY'), month: filters.fromDate ? moment(filters.fromDate, 'MMM YYYY').format('MM') - : moment().subtract(2, 'month').add(17, 'days').format('MM'), + : moment().subtract(2, 'month').add(10, 'days').format('MM'), fromDate: filters.fromDate ? moment(filters.fromDate, 'MMM YYYY').format('YYYYMM') : moment() .subtract(2, 'month') - .add(17, 'days') + .add(10, 'days') .format('YYYYMM'), toDate: filters.toDate ? moment(filters.toDate, 'MMM YYYY').format('YYYYMM') : moment() .subtract(2, 'month') - .add(17, 'days') + .add(10, 'days') .format('YYYYMM'), }; // params.month = filters.fromDate ? moment(filters.fromDate, "MMM YYYY").format("MM") : ''; @@ -76,21 +76,21 @@ const UptakeTestingStrategy = () => { project: filters.projects, year: filters.fromDate ? moment(filters.fromDate, 'MMM YYYY').format('YYYY') - : moment().subtract(2, 'month').add(17, 'days').format('YYYY'), + : moment().subtract(2, 'month').add(10, 'days').format('YYYY'), month: filters.fromDate ? moment(filters.fromDate, 'MMM YYYY').format('MM') - : moment().subtract(2, 'month').add(17, 'days').format('MM'), + : moment().subtract(2, 'month').add(10, 'days').format('MM'), fromDate: filters.fromDate ? moment(filters.fromDate, 'MMM YYYY').format('YYYYMM') : moment() .subtract(2, 'month') - .add(17, 'days') + .add(10, 'days') .format('YYYYMM'), toDate: filters.toDate ? moment(filters.toDate, 'MMM YYYY').format('YYYYMM') : moment() .subtract(2, 'month') - .add(17, 'days') + .add(10, 'days') .format('YYYYMM'), }; // params.month = filters.fromDate ? moment(filters.fromDate, "MMM YYYY").format("MM") : ''; diff --git a/src/views/HTS/Uptake/UptakeTypeAndSelfTest.js b/src/views/HTS/Uptake/UptakeTypeAndSelfTest.js index 86a01630..49463f9c 100644 --- a/src/views/HTS/Uptake/UptakeTypeAndSelfTest.js +++ b/src/views/HTS/Uptake/UptakeTypeAndSelfTest.js @@ -21,21 +21,21 @@ const UptakeTypeAndSelfTest = () => { project: filters.projects, year: filters.fromDate ? moment(filters.fromDate, 'MMM YYYY').format('YYYY') - : moment().subtract(2, 'month').add(17, 'days').format('YYYY'), + : moment().subtract(2, 'month').add(10, 'days').format('YYYY'), month: filters.fromDate ? moment(filters.fromDate, 'MMM YYYY').format('MM') - : moment().subtract(2, 'month').add(17, 'days').format('MM'), + : moment().subtract(2, 'month').add(10, 'days').format('MM'), fromDate: filters.fromDate ? moment(filters.fromDate, 'MMM YYYY').format('YYYYMM') : moment() .subtract(2, 'month') - .add(17, 'days') + .add(10, 'days') .format('YYYYMM'), toDate: filters.toDate ? moment(filters.toDate, 'MMM YYYY').format('YYYYMM') : moment() .subtract(2, 'month') - .add(17, 'days') + .add(10, 'days') .format('YYYYMM'), }; // params.month = filters.fromDate ? moment(filters.fromDate, "MMM YYYY").format("MM") : ''; @@ -76,21 +76,21 @@ const UptakeTypeAndSelfTest = () => { project: filters.projects, year: filters.fromDate ? moment(filters.fromDate, 'MMM YYYY').format('YYYY') - : moment().subtract(2, 'month').add(17, 'days').format('YYYY'), + : moment().subtract(2, 'month').add(10, 'days').format('YYYY'), month: filters.fromDate ? moment(filters.fromDate, 'MMM YYYY').format('MM') - : moment().subtract(2, 'month').add(17, 'days').format('MM'), + : moment().subtract(2, 'month').add(10, 'days').format('MM'), fromDate: filters.fromDate ? moment(filters.fromDate, 'MMM YYYY').format('YYYYMM') : moment() .subtract(2, 'month') - .add(17, 'days') + .add(10, 'days') .format('YYYYMM'), toDate: filters.toDate ? moment(filters.toDate, 'MMM YYYY').format('YYYYMM') : moment() .subtract(2, 'month') - .add(17, 'days') + .add(10, 'days') .format('YYYYMM'), }; // params.month = filters.fromDate ? moment(filters.fromDate, "MMM YYYY").format("MM") : '';