Open michaelkohn opened 2 weeks ago
There are two parts to accomplishing the feature as mentioned above:
webapp/src/ts/components/filters/analytics-filter/analytics-filter.component.html
that emits an event. webapp/src/ts/modules/analytics/analytics.component.ts
and forwarded to webapp/src/ts/modules/analytics/analytics-target-aggregates.component.ts
webapp/src/ts/modules/analytics/analytics-target-aggregates-sidebar-filter.component.html
filter with the radio buttons that determine the aggregate targets displayed by webapp/src/ts/modules/analytics/analytics-target-aggregates.component.ts
onPeriodChange()
which updates a value this.selectedPeriod
and calls getTargetAggregates()
codethis.targetAggregatesService.getAggregates()
code to accept and forward the selectedPeriod
value (default being current month).getPreviousIntervalTag
similar to the existing getCurrentIntervalTag method that gets the data for previous month.fetchLatestTargetDocs
to receive the selectedPeriod
flag and either fetch current or previous month records.this month
or last month
text depending on the value of selectedPeriod
@michaelkohn Overall I would say it's a weeks worth of work (If I have not overlooked something)
@latin-panda Please share your thoughts on my conceptual plan and whether I may have overlooked anything.
@ralfudx Heads up on what I may be working on soon, once I start I will share my testing plan and get your thoughts on it.
Overall I would say it's a weeks worth of work (If I have not overlooked something)
I would add 1 extra week for test coverage (mobile and desktop devices) and UI fixes for device resolution
@Benmuiruri, Can you try hardcoding a previous period in fetchLatestTargetDocs
and see if CHT can generate the targets of previous months? Because if CHT doesn't generate accurate targets, we need to fix it, and it will increase the development timeline
This feature needs data from previous months, so app builders need to consider that when configuring purging.
This filter is only for target aggregates, right?
@latin-panda I was able to hardcode the previous period.
I got the results I expected -> 2 death reports. In the console, I see the data I expect -> 2 death reports fetched for (05 - May)
Period
And in this second screenshot I see the data I expect -> 3 death reports fetched for (06 - June)
Period
That's good news, thanks @Benmuiruri!
The first deliverable of this work will be:
@Benmuiruri Can you please split the task into smaller tickets?
You can create a add-filters-aggregte-targets
branch for this feature, and then we merge smaller PRs into that branch.
When the work is 100% ready, we merge add-filters-aggregte-targets
into master
for release.
@ralfudx how can you best support us on this work? Ideas:
I have broken down the EPIC: Filter aggregate targets by facility_id into its 4 deliverables.
Once that EPIC is complete, most of the work will have been done. The remaining component to complete EPIC: View previous reporting period in aggregate targets will be:
@latin-panda thanks for initiating ideas around this - I'll have a deeper look at the epic and sync with @Benmuiruri to better understand the deliverables
Users with access to Aggregate Targets can now view data from the previous reporting period. This includes the high level aggregates (in the list view) as well as the detail view (each CHW's individual contribution). This capability is only for aggregate targets, not personal targets.
Figma mockups