Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coordinator Dashboard Endpoint #651

Open
4 tasks
erikguntner opened this issue Feb 7, 2024 · 1 comment
Open
4 tasks

Coordinator Dashboard Endpoint #651

erikguntner opened this issue Feb 7, 2024 · 1 comment
Labels
p-Feature: Dashboard Coordinator points: 2 Can be done in 7-12 hours Role: Back End Section: 2 Related to Major Flows Section 2: Application & Onboarding Process
Milestone

Comments

@erikguntner
Copy link
Collaborator

erikguntner commented Feb 7, 2024

Overview

We need to create an endpoint that returns a paginated list of all users to be displayed on the coordinator dashboard. The users should also be filtered and sorted based on query string parameters passed to the endpoint.

GET
/coordinator/dashboard?role=host,guest&name=John_Doe&sort=updated&order=asc&limit=10&offset=20

**Description:**
Get users for the coordinator dashboard based on sorting, filtering, and pagination requirements

**Response Body:**
Response {
	total_guests: int
	total_hosts: int
	users: UserInfo[]
}

UserInfo {
	user_id: int
	first_name: string // Not currently apart of User model
        last_name: string // Not currently included in User model
        type: 'guest' | 'host' // Not currently included in User model
	status: string 
	coordinator: string // name of assigned coordinator
	last_updated: date 
	notes: string // No model currently exists
}

Query Parameters

  • role=host,guest
    • Filter which users types to fetch.
  • name=John_Doe
    • Search/filter by name
  • sort=updated&order=asc
    • The property to sort by and the order in which into return them
  • limit=10&offset=20
    • The number of items to return per page and the offset depending on the page

Action Items

  • Write spec and define controller for route
  • Update User model to include necessary properties (eg. first_name, last_name, type)
  • Query database for users based on query parameters. Maybe create a script to add list of users to DB.
  • Return list of users from endpoint

Parent Issues

#501

@erikguntner erikguntner added Role: Back End p-Feature: Dashboard Coordinator points: 2 Can be done in 7-12 hours Section: 2 Related to Major Flows Section 2: Application & Onboarding Process labels Feb 7, 2024
@erikguntner erikguntner mentioned this issue Feb 7, 2024
25 tasks
@sanya301 sanya301 added this to the 6- MVP milestone Feb 17, 2024
@sanya301
Copy link
Member

Please remember to add milestones thank you!

@sanya301 sanya301 mentioned this issue Mar 6, 2024
29 tasks
@sanya301 sanya301 mentioned this issue Apr 3, 2024
37 tasks
@sanya301 sanya301 mentioned this issue May 8, 2024
45 tasks
@lola3736 lola3736 mentioned this issue Jun 6, 2024
60 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p-Feature: Dashboard Coordinator points: 2 Can be done in 7-12 hours Role: Back End Section: 2 Related to Major Flows Section 2: Application & Onboarding Process
Projects
Status: New Issue Approval
Development

No branches or pull requests

3 participants