MentorsWithoutBorders / mwb-partners-admin

Web app for MWB partners
0 stars 0 forks source link

Students table - search filter #30

Open edmondpr opened 1 year ago

edmondpr commented 1 year ago

Design: https://www.figma.com/file/DgrKZX9mS13Zgf7k5pZ1WT/Partner-web-app?type=design&node-id=1230-9183&mode=design&t=hBrWoc8WQXwB3NIH-4

There are 3 possible search filters for the data in the students table, and they can be used together as well:

The default selected option will be By name (selected by default when the user presses Enter in case none of the options have been selected manually).

The data will be displayed according to the selected search filter, using the LIKE operator (case insensitive).

jfmdev commented 1 year ago

@edmondpr A couple of questions:

  1. Which endpoint should be used for this feature (e.g. /api/v1/students, /api/v1/admin/students or /api/v1/partners/:partner_id/students)?
  2. May I assume that this endpoint, besides accepting the search by name/email/certificate status, should all accept a centre parameter (to return only students from a given centre)?
edmondpr commented 1 year ago

@jfmdev The endpoint that we're using for this feature is /api/v1/partners/:partner_id/students and you can assume that it will accept the centre parameter as well (it's not currently in the backend code for this endpoint but we'll add it).