-
Notifications
You must be signed in to change notification settings - Fork 437
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed pagination bug in FileUpload Component #5580
Conversation
✅ Deploy Preview for care-egov-staging ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@patelaryan7751 check the cypress failing and fix it |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
@patelaryan7751 is attempting to deploy a commit to the Coronasafe Team on Vercel. A member of the Team first needs to authorize it. |
LGTM |
WHAT
🤖 Generated by Copilot at 42c0118
This change improves the file upload component for patient files by adding sorting and pagination features for both archived and unarchived files. It also simplifies the state management and rendering logic by using separate variables and functions for each file category in
FileUpload.tsx
.Proposed Changes
Fixed pagination bug in FileUpload Component made separate pagination for Archived Files and Unarchived Files tab
@coronasafe/care-fe-code-reviewers @coronasafe/code-reviewers
Merge Checklist
HOW
🤖 Generated by Copilot at 42c0118
uploadedFiles
andtotalCount
state variables into two separate variables each, based on the archival status of the files, to support the sorting and pagination features of the file upload component (link, link)viewUpload
action to accept an additional parameter,is_archived
, and fetch both archived and unarchived files from the backend using thearchivedFileData
andunarchievedFileData
objects, and update the state with thesetuploadedArchievedFiles
andsetuploadedUnarchievedFiles
functions (link, link)src/Components/Patient/FileUpload.tsx
to use the new state variables instead of filtering theuploadedFiles
array based on thesortFileState
variable, to improve the performance and readability of the component (link)