Skip to content

Clients Without RBT/BCBA Assigned Report

1. What does this feature do? (High-Level Overview)

Section titled “1. What does this feature do? (High-Level Overview)”

This feature provides a reporting table for clients without assigned staff coverage (RBT and/or BCBA roles). It allows operational teams to identify staffing gaps by client, with server-side filtering, sorting, and pagination. Within this report context, staff roles (RBT/BCBA) are treated as employee profiles for navigation.

  • Users who can access Reports and meet the report card requirements in Reports Access.
  • In Reports Access, the card Clients without RBT/BCBA Report is configured with permission: view_employees.
  • Users with that permission can navigate to /reports/unassigned-staff from the report card.
  • Inside the component, client and staff links are permission-aware:
  • Client profile link requires view_all_clients.
  • Staff profile links (BCBA/RBT) require view_employees.
  • Without required permissions, names are displayed as plain text.

Required permissions used by this feature path:

  • view_employees: required by Reports Access card visibility and staff profile link behavior.
  • view_all_clients: used for client profile link behavior inside table rows.
  • Rule 1: When the page opens, the report restores what comes in the URL (search, filters, sorting, and page).
  • Rule 2: If the URL has no values, the report starts with defaults:
    • Role: All Roles
    • Status: All Status
    • Rows per page: 100
    • Page: 1
    • Sort: Client name (ascending)
  • Rule 3: Search text is cleaned before sending (extra spaces removed and converted to lowercase).
  • Rule 4: Search waits a short moment (about 500ms) before reloading results, to avoid too many requests.
  • Rule 5: Status can include one or multiple options.
    • If no status is selected, status filtering is not applied.
  • Rule 6: Role filter options are All Roles, BCBA, or RBT.
    • If All Roles is selected, role filtering is not applied.
  • Rule 7: Any change in search or filters returns results to page 1.
  • Rule 8: Sorting is handled by the server and kept in the URL.
  • Rule 9: Sorting by Client Full Name uses the backend field for first name.
  • Rule 10: Pagination is handled by the server and shown with compact page navigation.
  • Rule 11: While loading, the table shows skeleton rows.
    • If no data is found, show: Data not available.
  • Rule 12: If loading fails, stop loading and log the error in console.
  • Rule 13: Location is applied by backend/auth context, not by sending a location filter from this screen.
  • Reports entry path:
  1. Main app -> Reports.
  2. Reports Access -> Human Resource -> Clients without RBT/BCBA Report card.
  3. Navigates to primary route: /reports/unassigned-staff.
  • Main screen sections in this feature:
  1. Back button (returns browser history).
  2. Search input (by client name).
  3. Status filter (multi-select).
  4. Without filter (role type: All Roles, BCBA, RBT).
  5. Clients table with sortable columns.
  6. Permission-aware links for client/staff profiles.
  7. Footer controls (record range and pagination).

Scenario A: Find clients with staffing gaps

Section titled “Scenario A: Find clients with staffing gaps”
  1. Open Reports and enter Clients without RBT/BCBA Assigned report.
  2. Optionally type a client name in Search.
  3. Optionally filter by Status.
  4. Optionally set role filter to BCBA or RBT.
  5. Review resulting clients and missing assignment columns.
  1. Select one or more statuses in Status filter.
  2. Choose role filter (BCBA or RBT).
  3. Validate results update and page resets to 1.
  4. Use pagination controls to inspect more rows.
  1. Click a sortable header (Client Full Name, City, Status).
  2. Click same header again to change sort direction according to component cycle.
  3. Move through pages using Previous/Next or direct page numbers.
  4. Use first/last page shortcuts when ellipsis is shown.
  • Q: What happens if no query params are provided?

  • A: The component applies defaults and then loads data with those defaults.

  • Q: What if user clears all selected statuses?

  • A: client_status[] is removed from request params and data reloads without status filtering.

  • Q: What if role filter is All Roles?

  • A: type is not sent in request params.

  • Q: What if user does not have view_all_clients?

  • A: Client name is rendered as text (no profile link).

  • Q: What if user does not have view_employees?

  • A: BCBA/RBT names are rendered as text (no employee profile link).

  • Q: What if API returns no data?

  • A: Table displays Data not available.

  • Q: What if API request fails?

  • A: Loading stops and error is logged to console.

  • Q: Does the component preserve filter state on refresh/share URL?

  • A: Yes. Filter, sort, and pagination are synchronized with query params and rehydrated on init.