Fix: Assessment History table bypassing computed filtered assessment results#1745
Open
AanyaJain0811 wants to merge 3 commits into
Open
Fix: Assessment History table bypassing computed filtered assessment results#1745AanyaJain0811 wants to merge 3 commits into
AanyaJain0811 wants to merge 3 commits into
Conversation
- Add useTranslation hook to History.tsx, Dashboard.tsx, MyHealth.tsx - Replace hardcoded English strings in EmptyState components with t() calls - Add translation keys to en, es, fr, hi translation.json files - Fixes empty-state messages not translating when language is switched
|
@AanyaJain0811 is attempting to deploy a commit to the gopaljilab's projects Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The assessment history table rendered from paginatedAssessments, a variable that was never defined anywhere in the component — it had no declaration, state, or memo backing it. Meanwhile, a correctly-implemented filteredAssessments memo (built from filterAssessments()) existed but was never read. As a result, search and filter controls had no effect on the rendered table.
Related Issue
Closes #1744
Type of Change
Changes Made
Screenshots (if applicable)
N/A — logic fix, no visual/layout changes
Testing
Checklist
Known Limitation
This fix fetches up to 1000 records (limit: 1000) and filters/paginates entirely client-side, since the backend's filter semantics don't match filterAssessments(). If the assessment count grows past that threshold, this should be revisited — either raise the limit, add a dedicated "export/fetch all matching" backend endpoint, or move filtering server-side and bring it in line with filterAssessments()'s logic exactly.