Skip to content

Coordinator Dashboard Endpoint #651

@erikguntner

Description

@erikguntner

Dependencies

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Complexity: MediumIssue is clearly defined and documentation is provided. Solution has room for interpretation.Role: Back EndSection: 2Related to Major Flows Section 2: Application & Onboarding ProcessdependencyIssues that are being blocked by another issue or other thing that needs to be completed firstp-Feature: Dashboard Coordinatorsize: 2ptCan be done in 7-12 hours

    Type

    No type

    Projects

    Status

    Ice Box

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions