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

feat/AB#74292 People picker

Open TaiKamilla opened this issue 2 years ago • 6 comments

Description

This creates a dropdown with multiple selections, that allows to search for users

Useful links

Type of change

Please delete options that are not relevant.

  • [x] Bug fix (non-breaking change which fixes an issue)
  • [x] Improvement (refactor or addition to existing functionality)

Screenshots

https://github.com/ReliefApplications/oort-frontend/assets/15035750/075d4877-2e80-402f-9c50-2f39e985b917

Checklist:

( * == Mandatory )

  • [x] * I have set myself as assignee of the pull request
  • [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 put the ticket for review, adding the oort-frontend team to the list of reviewers
  • [ ] * I have commented my code, particularly in hard-to-understand areas
  • [ ] * 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
  • [ ] * 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 )
  • [x] I have added tests that prove my fix is effective or that my feature works
  • [x] New and existing unit tests pass locally with my changes
  • [ ] Any dependent changes have been merged and published in downstream modules

TaiKamilla avatar Sep 04 '23 14:09 TaiKamilla

@Matthis-M-ReliefApps

  • Changed number of char for search to be 2
  • Is it wanted that no user is fetched until we start searching?

MwanPygmay avatar Apr 17 '24 12:04 MwanPygmay

request to do for pagination:

query { users(limitItems: 25) { userid firstname lastname emailaddress } totalCount:users { aggregate_regionid_min aggregate_count } }

AntoineRelief avatar Apr 25 '24 11:04 AntoineRelief

@MwanPygmay

putting as draft this one

A few things to change:

  • it should be possible to use it as multi select or single select ( perhaps an input could do it )
  • in that case, when displaying in a grid, it should also be reflected ( I don't know if using the same type of question would allow it )
  • too many users are fetched at the same time!! We should use pagination. One thing we can do, front-end side, is NOT to use our API, but instead, build a query to CS directly from the front-end. Or, in a first time, edit our back-end so we can do pagination over users list
  • check if in export we have the same format than when displaying as a grid
  • check if other widgets support the question type

I'll assign you the ticket on devops

AntoineRelief avatar Apr 25 '24 12:04 AntoineRelief

  • New type of question: singlepeople, which is a single select
  • Behaviour adapted in grid, can be filtered
  • Fetching users ten by ten, with load on scroll.
  • corrected export.
  • Supported in summary cards and editor

MwanPygmay avatar May 06 '24 09:05 MwanPygmay

@Matthis-M-ReliefApps @MwanPygmay

most of it is working as expected, but I still see one issue 😅

the charts are not working:

Capture d’écran 2024-06-14 à 09 22 26

We should see similar data than the one we see in other widgets I'm putting back as draft the PR, and putting back in todo the ticket

AntoineRelief avatar Jun 14 '24 07:06 AntoineRelief

Still to be done:

  • Sorting in the aggregations (sorting in the layouts is already handled).
  • Bug: When filling out a form with the people picker and navigating directly to a grid displaying the people, the names do not appear immediately. The page needs to be reloaded to display the names.

MwanPygmay avatar Jun 28 '24 07:06 MwanPygmay