generated from hackforla/.github-hackforla-base-repo-template
-
-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Labels
Complexity: MediumIssue is clearly defined and documentation is provided. Solution has room for interpretation.Issue is clearly defined and documentation is provided. Solution has room for interpretation.Role: Back EndSection: 2Related to Major Flows Section 2: Application & Onboarding ProcessRelated to Major Flows Section 2: Application & Onboarding ProcessdependencyIssues that are being blocked by another issue or other thing that needs to be completed firstIssues 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 hoursCan be done in 7-12 hours
Description
Dependencies
- This can be revisited/confirmed as completed after codebase cleanup is complete 07.03 Milestone Tracker | Enhance codebase readability and documentation #771
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Complexity: MediumIssue is clearly defined and documentation is provided. Solution has room for interpretation.Issue is clearly defined and documentation is provided. Solution has room for interpretation.Role: Back EndSection: 2Related to Major Flows Section 2: Application & Onboarding ProcessRelated to Major Flows Section 2: Application & Onboarding ProcessdependencyIssues that are being blocked by another issue or other thing that needs to be completed firstIssues 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 hoursCan be done in 7-12 hours
Type
Projects
Status
Ice Box