boolean-uk / team-dev-frontend-client

1 stars 11 forks source link

Create component - Students List (Reusable) && Student List Item #112

Closed Haroogle closed 1 year ago

Haroogle commented 1 year ago

Create a {StudentList} component to display rendered students list items depending on selected cohort (Map an array of students checking cohort id to render only people from the same cohort )

Import client from './utils/client'. set response to client.get('/users') and render

Example of data received as responce to the fetch request for 1 user

{
    "id":2,
    "cohortId":1,
    "role":"STUDENT",
    "firstName":"name1",
    "lastName":"surname1",
    "email":"test1@test.com",
    "biography":"Here i am, coding like a hurricane",
    "githubUrl":null,
    "profileUrl":"https://images.unsplash.com/photo-1573865526739-10659fec78a5?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=830&q=80"
}

Image

Create student list item component {StudentItem}

Image

dogezen commented 1 year ago
dogezen commented 1 year ago

1) make sure it's clear that you will have to filter the list of /users fetched from the API to only keep those that are NOT teachers and those that are NOT part of the cohort?

2) the feature about the adding a student to a cohort, I would imagine for that to work that I need to know a) who the student is and b) what cohort to add them to (maybe via 2 dropdowns?); Maybe this could be split out in a separate issue that you work on after this one is completed.

Finally, I am assuming the wireframes for cohorts above are just the same, but for the student list right?

Auenc commented 1 year ago

I think the only thing missing now is that you're missing examples of the data that the API will return. This will help whenever it comes to doing the work as you will know exactly what properties you need to use in the data to filter the users.

Auenc commented 1 year ago

I think it would be best if you format the snippet so it's a little more readable, but that's not a blocking thing. I think this is good to go!