Skip to content

Commit

Permalink
updated rr export files
Browse files Browse the repository at this point in the history
  • Loading branch information
cbrianbet committed Apr 17, 2024
1 parent f030ca7 commit bd25091
Showing 1 changed file with 12 additions and 20 deletions.
32 changes: 12 additions & 20 deletions src/views/RR/RROverview.js
Original file line number Diff line number Diff line change
Expand Up @@ -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') :
Expand Down Expand Up @@ -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')
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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,
})
)}
Expand Down

0 comments on commit bd25091

Please sign in to comment.