ems-frontend icon indicating copy to clipboard operation
ems-frontend copied to clipboard

Ab#68346 supporting aggregations on reference data

Open MwanPygmay opened this issue 2 years ago • 1 comments

Description

Added front-end support for reference data and aggregations for reference data: in summary cards, in charts, in map layers and in grids. As in layers, origin can now be chosen between 'reference data' and 'resource'. The way to build aggregations pipelines is the same as for resources, but only 'filter', 'group' and 'sort' are supported. /!\ Generates some ValueChangedAfterItHasBeenCheckedError but I do think this is more related to the way we handle the settings logic in general.

Ticket

Please insert link to ticket back: https://github.com/ReliefApplications/oort-backend/pull/671

Type of change

Please delete options that are not relevant.

  • [x] New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Created a static reference data, and a resource that mimics the reference data. Tried to create summary cards and pie charts for both, with all supported pipelines, and by changing the order. All operators for 'group' are tested. Tried to create a grid from a reference data aggregation. Tried to create a layer from an aggregation of reference data. The traditional way is still supported, the aggregation is not mandatory.

Screenshots

Screenshot from 2023-07-11 16-50-50 Screenshot from 2023-07-12 09-37-21 Screenshot from 2023-07-12 09-40-41

Selected aggregation data display for text widget image Aggregation configuration modal with a reference data image

Checklist:

( * == Mandatory )

  • [x] * My code follows the style guidelines of this project
  • [x] * Linting does not generate new warnings
  • [x] * I have performed a self-review of my own code
  • [x] * I have commented my code, particularly in hard-to-understand areas
  • [x] * I have put JSDoc comment in all required places
  • [x] * My changes generate no new warnings
  • [x] * I have included screenshots describing my changes if relevant
  • [x] * I have selected labels in the Pull Request, according to the changes with code brings
  • [ ] I have made corresponding changes to the documentation ( if required )
  • [ ] I have added tests that prove my fix is effective or that my feature works
  • [ ] New and existing unit tests pass locally with my changes
  • [ ] Any dependent changes have been merged and published in downstream modules

MwanPygmay avatar Jul 12 '23 07:07 MwanPygmay

@AntoineRelief Added ui and form logic to the text widget for reference datas image Only thing missing would be to add the query builder for the selected reference data to fetch the items, I'll do that first thing in the morning tomorrow 👍

Kr, Unai

unai-reliefapp avatar Oct 09 '23 15:10 unai-reliefapp