Availables Cases
1. What does this feature do? (High-Level Overview)
Section titled “1. What does this feature do? (High-Level Overview)”This feature provides a public page where users can review open client cases for a specific location and quickly see key details such as status, city, and schedule. It helps recruiting and provider assignment teams share current case availability in a simple, continuously updated view.
2. Who is this for? (Roles & Permissions)
Section titled “2. Who is this for? (Roles & Permissions)”- Public users with the page link: Can view available cases and contact information.
- Recruiting/operations team (content owners): Can direct providers to this page and use it as a public reference for current openings.
- Permission model: This route is implemented under the public module and does not show role-based UI restrictions in this component. Data loading depends on a valid
location_idquery parameter.
3. Business Rules & Enforcements
Section titled “3. Business Rules & Enforcements”- Location-scoped loading: The cases list and agency logo are loaded only when
location_idis present in the URL query params. - Paged results: The component requests cases in pages (
per_page = 100) and updates the page number through URL query params. - Status normalization: Backend status codes are mapped to user-friendly labels (for example,
incomingbecomesIncoming). - Read-only behavior: The page presents case data but does not include create/edit actions in this component.
- Empty-state handling: When no records are returned, the table displays
No data available.
4. UI Placement
Section titled “4. UI Placement”- Navigate to the public route:
/availables-cases. - Include query params, especially
location_id(and optionallypage), to load location-specific data. - Inside the page:
- Cases tab: Displays agency info, case table, and pagination.
- Contact us tab: Displays static contact and onboarding information.
5. How-To Guide (Step-by-Step)
Section titled “5. How-To Guide (Step-by-Step)”Scenario A: Review available cases for one location
- Open
/availables-cases?location_id=<location-id>. - Wait for the loading skeleton to finish.
- Review the table columns:
Patient,Status,City, andSchedule. - If needed, use pagination controls (
Previous, page numbers,Next) to navigate.
Scenario B: Share the correct page state with another user
- Open the page with the target
location_id. - Move to the desired page using pagination.
- Copy the current URL, which now includes the active query params.
- Share that URL so the recipient lands on the same location/page context.
Scenario C: Switch from case list to contact details
- From the page header tabs, select
Contact us. - Review the instructions and contact names/phone/email details.
- Return to
Casesto continue checking open case availability.
6. What happens if…? (Edge Cases / FAQ)
Section titled “6. What happens if…? (Edge Cases / FAQ)”- Q: What happens if
location_idis missing from the URL?- A: The component does not request case data or location logo, so the list is not populated.
- Q: What happens if there are no open cases for that location/page?
- A: The table is shown with an empty-state message:
No data available.
- A: The table is shown with an empty-state message:
- Q: What happens if I open the page directly on a later page number (for example
page=3)?- A: The component reads the query param and requests data for that page on initial load.