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.
2. Who is this for? (Roles & Permissions)
Section titled “2. Who is this for? (Roles & Permissions)”- 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.
3. Business Rules & Enforcements
Section titled “3. Business Rules & Enforcements”- 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.
4. UI Placement
Section titled “4. UI Placement”- Reports entry path:
- Main app -> Reports.
- Reports Access -> Human Resource -> Clients without RBT/BCBA Report card.
- Navigates to primary route: /reports/unassigned-staff.
- Main screen sections in this feature:
- Back button (returns browser history).
- Search input (by client name).
- Status filter (multi-select).
- Without filter (role type: All Roles, BCBA, RBT).
- Clients table with sortable columns.
- Permission-aware links for client/staff profiles.
- Footer controls (record range and pagination).
5. How-To Guide (Step-by-Step)
Section titled “5. How-To Guide (Step-by-Step)”Scenario A: Find clients with staffing gaps
Section titled “Scenario A: Find clients with staffing gaps”- Open Reports and enter Clients without RBT/BCBA Assigned report.
- Optionally type a client name in Search.
- Optionally filter by Status.
- Optionally set role filter to BCBA or RBT.
- Review resulting clients and missing assignment columns.
Scenario B: Narrow by status and role
Section titled “Scenario B: Narrow by status and role”- Select one or more statuses in Status filter.
- Choose role filter (BCBA or RBT).
- Validate results update and page resets to 1.
- Use pagination controls to inspect more rows.
Scenario C: Sort and navigate records
Section titled “Scenario C: Sort and navigate records”- Click a sortable header (Client Full Name, City, Status).
- Click same header again to change sort direction according to component cycle.
- Move through pages using Previous/Next or direct page numbers.
- Use first/last page shortcuts when ellipsis is shown.
6. What happens if…? (Edge Cases / FAQ)
Section titled “6. What happens if…? (Edge Cases / FAQ)”-
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:
typeis 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.