Skip to content

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.

  • 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_id query parameter.
  • Location-scoped loading: The cases list and agency logo are loaded only when location_id is 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, incoming becomes Incoming).
  • 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.
  1. Navigate to the public route: /availables-cases.
  2. Include query params, especially location_id (and optionally page), to load location-specific data.
  3. Inside the page:
    • Cases tab: Displays agency info, case table, and pagination.
    • Contact us tab: Displays static contact and onboarding information.

Scenario A: Review available cases for one location

  1. Open /availables-cases?location_id=<location-id>.
  2. Wait for the loading skeleton to finish.
  3. Review the table columns: Patient, Status, City, and Schedule.
  4. If needed, use pagination controls (Previous, page numbers, Next) to navigate.

Scenario B: Share the correct page state with another user

  1. Open the page with the target location_id.
  2. Move to the desired page using pagination.
  3. Copy the current URL, which now includes the active query params.
  4. Share that URL so the recipient lands on the same location/page context.

Scenario C: Switch from case list to contact details

  1. From the page header tabs, select Contact us.
  2. Review the instructions and contact names/phone/email details.
  3. Return to Cases to continue checking open case availability.
  • Q: What happens if location_id is 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.
  • 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.