hackforla / HomeUniteUs

We're working with community non-profits who have a Host Home or empty bedrooms initiative to develop a workflow management tool to make the process scalable (across all providers), reduce institutional bias, and effectively capture data.
https://homeunite.us/
GNU General Public License v2.0
35 stars 21 forks source link

Coordinator Dashboard Endpoint #651

Open erikguntner opened 3 months ago

erikguntner commented 3 months ago

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

Action Items

Parent Issues

501

sanya301 commented 3 months ago

Please remember to add milestones thank you!