Skip to content
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

Show error for invalid records of import external results page #6832

Merged
merged 3 commits into from
Dec 13, 2023

Conversation

Pranshu1902
Copy link
Contributor

@Pranshu1902 Pranshu1902 commented Dec 9, 2023

WHAT

🤖[deprecated] Generated by Copilot at 5c9677f

The pull request enhances the security and usability of the ExternalResultUpload component. It checks the district names in the CSV data against the user's district, and shows feedback on the upload status.

Proposed Changes

image

@coronasafe/care-fe-code-reviewers @coronasafe/code-reviewers

Merge Checklist

  • Add specs that demonstrate bug / test a new feature.
  • Update product documentation.
  • Ensure that UI text is kept in I18n files.
  • Prep screenshot or demo video for changelog entry, and attach it to issue.
  • Request for Peer Reviews
  • Completion of QA

HOW

🤖[deprecated] Generated by Copilot at 5c9677f

  • Import useEffect hook and add states for validationError and user (link, link)
  • Fetch the current user data on component mount and store it in user state (link)
  • Validate the district name in each row against the user's district and update validationError state accordingly (link, link)
  • Filter out the invalid rows from the CSV data before sending the API request to upload it (link)
  • Display the total number of rows in the CSV data, if any (link)
  • Disable the submit button if all the rows are invalid or show the number of valid records to be saved (link)

@Pranshu1902 Pranshu1902 requested a review from a team as a code owner December 9, 2023 12:09
Copy link

vercel bot commented Dec 9, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
care-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 11, 2023 11:29am

Copy link

netlify bot commented Dec 9, 2023

Deploy Preview for care-egov-staging ready!

Name Link
🔨 Latest commit a8eaa47
🔍 Latest deploy log https://app.netlify.com/sites/care-egov-staging/deploys/6576f24ea244db000847e7ae
😎 Deploy Preview https://deploy-preview-6832--care-egov-staging.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@Pranshu1902 Pranshu1902 changed the title show error for invalid records Show error for invalid records of import external results page Dec 9, 2023
@nihal467
Copy link
Member

LGTM

@khavinshankar khavinshankar merged commit bd4dd95 into coronasafe:develop Dec 13, 2023
30 of 38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Show patients that are of not same district beside the patient item itself.
3 participants