2025-01-16: Admin Reporting Interface - Program Tags Filtering & Bulk Operations
For: Internal Tools (Attendly) Impact: Enables efficient bulk tagging of hundreds of programs at once with precise date-based filtering, reducing manual tagging time from hours to minutes for district-wide program categorization. Context: Program tags page needed better filtering controls and ability to select/tag programs across all pages, not just the visible 25. Users filtering by date range or other criteria couldn’t efficiently bulk-tag matching programs.
Implementation:
- Replaced auto-search with manual “Apply Filters” button - filters now accumulate without triggering requests until user clicks apply
- Created
/api/programs/idsendpoint that returns all matching program IDs (not paginated) for “Select All” functionality - Added date range filtering (
startDate/endDateparams) with HAVING clause logic: programs overlap range iflast_session >= startDate AND first_session <= endDate - Fixed
BulkTagModalto acceptselectedIdsSet for accurate count display when programs span multiple pages - UI shows “X additional programs from other pages will also be updated” when selection exceeds current page
Files Modified:
app/program-tags/page.tsx- Filter state handlers, apply/select-all logiccomponents/program-tags/filters.tsx- Apply Filters button, Select All button, date inputscomponents/program-tags/bulk-tag-modal.tsx- AcceptselectedIdsprop, display correct totalsapp/api/programs/route.ts- AddedstartDate/endDatequery params with HAVING clauseapp/api/programs/ids/route.ts- New endpoint for fetching all matching IDs
Related: Admin Reporting Interface, Program Tags Hub
Tags: development internal-tools admin-reporting-interface program-tags