From bd25091ffa48718082e485ef47c4e761953eee3b Mon Sep 17 00:00:00 2001 From: cbrianbet Date: Wed, 17 Apr 2024 11:23:01 +0300 Subject: [PATCH] updated rr export files --- src/views/RR/RROverview.js | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/src/views/RR/RROverview.js b/src/views/RR/RROverview.js index cd5594b7..00b6db23 100644 --- a/src/views/RR/RROverview.js +++ b/src/views/RR/RROverview.js @@ -50,7 +50,7 @@ const RROverview = () => { partner: filters.partners, agency: filters.agencies, project: filters.projects, - fromDate: filters.fromDate ? filters.fromDate : moment().format("MMM YYYY") + fromDate: filters.fromDate || moment().format("MMM YYYY") }; params.period = filters.fromDate ? moment(params.fromDate, "MMM YYYY").startOf('month').subtract(1, 'month').format('YYYY,M') : @@ -147,11 +147,9 @@ const RROverview = () => { partner: filters.partners, agency: filters.agencies, project: filters.projects, - fromDate: filters.fromDate - ? filters.fromDate - : moment() - .subtract(16, 'days') - .format('MMM YYYY'), + fromDate: filters.fromDate || moment() + .subtract(16, 'days') + .format('MMM YYYY'), }; params.period = filters.fromDate ? moment(params.fromDate, 'MMM YYYY') @@ -296,14 +294,10 @@ const RROverview = () => { sub_county: l.subCounty, agency: l.Agency, partner: l.Partner, - reporting_date: filters.fromDate - ? filters.fromDate - : moment() - .startOf('month') - .subtract(2, 'month') - .add(16, 'days') - - .format('MMM YYYY'), + reporting_date: filters.fromDate || moment() + .subtract(2, 'month') + .add(16, 'days') + .format('MMM YYYY'), }) )} text="Download facilities not reporting" @@ -351,12 +345,10 @@ const RROverview = () => { sub_county: l.Subcounty, agency: l.Agency, partner: l.Partner, - reporting_date: filters.fromDate - ? filters.fromDate - : moment() - .startOf('month') - .subtract(1, 'month') - .format('MMM YYYY'), + reporting_date: filters.fromDate || moment() + .startOf('month') + .subtract(1, 'month') + .format('MMM YYYY'), number_of_uploads: l.NumberOfUploads, }) )}