-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Labels
FRONTENDMilestone 2needs discussionon holdNot going to do this quite yetNot going to do this quite yet
Description
Purpose
Add functionality so admins can apply bulk updates for the JOIN staff member(s) assigned to a tenants
- On page 8 of the FIGMA designs, we can see a collapsed grey bar above the tenants table
- On page 29, we see that the bar expands when one of more tenants are selected with the checkboxes next to their names. The bar is called "Update" and enables users to assign a JOIN staff member to multiple tenants at once.
Proposed Solution
- Build the collapsible component. Use a react-search-panel element with 'chips' and 'multiple' for the JOIN Staff selection box. This will allow the component to support the assignment of multiple JOIN staffers to a tenant/s
- Sensitize collapsed/expanded state based on tenant selection (i.e. the checkboxes)
- Disable the "Save" button on initial render. Enable it when 1 or more staff are selected.
- When "Save" is clicked, send all updates to the backend. Use a PATCH request to the endpoint:
/api/staff-tenants. The body of the request should look like this (per Create staff_tenant resource #443):
{
staff: [<int:staff_id>, ...],
tenants: [<int:tenant_id>, ...]
}
- After the API call is complete, refresh the view with another API call - GET
/api/tenants
Please make sure you've attempted to meet the following coding standards
- Code builds successfully
- Code has been tested and does not produce errors
- Code is readable and formatted
- There isn't any unnecessary commented-out code
- There aren't any unnecessary commits or files changed (shouldn't touch the /stashed folder unless the issue requests it)
Mockup Screenshot or Page Number
See pages 8 and 29 of the FIGMA designs
Metadata
Metadata
Assignees
Labels
FRONTENDMilestone 2needs discussionon holdNot going to do this quite yetNot going to do this quite yet