Skip to content

FEATURE: Add Search & Filter Capabilities to Revaluation Dashboard --- #57

Description

@Aayuiiitmg

Description

Admins and teachers need an efficient way to locate specific revaluation requests among large volumes of data.


Current Issue

No search or filtering functionality exists in the admin/teacher dashboards. With hundreds of requests stored, users must rely on manual pagination and scrolling, which is
time‑consuming and error‑prone. This leads to:

  • Excessive support requests about finding records
  • Reduced productivity for admin teams
  • Poor user experience when managing large datasets

Proposed Improvement

  1. Database Search Layer
    - Integrate PostgreSQL full‑text search on the revaluation_requests table for the following fields:
    • student_name (derived from users.full_name)
    • student_email
    • subject_name
    • created_at (date range)
- Add a dedicated search service (e.g., search.service.js) that builds optimized tsvector indexes and executes queries against them.
  1. Advanced Filtering API

    • Create endpoint GET /revaluation/search that accepts query parameters:
      {
      "q": "john", // full‑text query (optional)
      "status": "paid|processing|draft", // exact match
      "date_from": "2026-01-01", // ISO date range start
      "date_to": "2026-12-31",
      "subject_id": 12,
      "department": "Computer Science",
      "payment_status": "paid|unpaid",
      "page": 1,
      "size": 20
      }
    • Combine full‑text search with filter predicates to return paginated results.
  2. Saved Filters UI
    - Implement a UI feature that lets users store commonly used filter combinations (e.g., “All unpaid requests for CS department”).
    - Store saved filters in a lightweight JSON configuration table and expose them via a GET /saved-filters endpoint.

  3. Search Highlighting
    - In the front‑end request list component, highlight matched terms in bold within the result rows.
    - Show a snippet of the matched field (e.g., snippet of student name or subject) for quick context.

  4. Performance Optimizations
    - Create PostgreSQL indexes on:

    • revaluation_requests(student_id, created_at)
    • revaluation_requests(subject_id)
    • Full‑text tsvector index on student_name, student_email, subject_name
- Add caching (e.g., Redis) for the most‑used filter combinations to reduce DB load.

Expected Outcomes

  • Speed – Admin/teacher teams can locate a specific request in seconds instead of minutes.
  • Compliance Reporting – Easy generation of filtered reports (e.g., all requests completed in a given quarter).
  • Admin Efficiency – Reduces repetitive manual work, allowing staff to focus on higher‑value tasks.
  • User Experience – Intuitive search UI with saved filters and highlighted matches improves satisfaction for both technical and non‑technical users.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions