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

Change error format for Facility config page #5711

Merged
merged 1 commit into from
Jun 20, 2023

Conversation

Ashesh3
Copy link
Member

@Ashesh3 Ashesh3 commented Jun 16, 2023

WHAT

🤖 Generated by Copilot at 1d58a2e

The pull request improves the user experience of updating a facility's middleware address by showing validation errors inline, instead of as toast notifications. It changes the UpdateFacilityMiddleware component in src/Components/Facility/UpdateFacilityMiddleware.tsx to implement this feature.

Proposed Changes

@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

🤖 Generated by Copilot at 1d58a2e

  • Add a new property errors to the initialState object to store the validation errors for the form fields (link)
  • Replace the toast notifications with dispatch calls that update the errors state with the message for the middleware_address field, for both the cases when the field is empty or invalid (link, link)
  • Pass the error prop to the TextInputField component to render the error message below the input field (link)

@Ashesh3 Ashesh3 requested a review from a team June 16, 2023 19:53
@Ashesh3 Ashesh3 requested a review from a team as a code owner June 16, 2023 19:53
@Ashesh3 Ashesh3 requested a review from mathew-alex June 16, 2023 19:53
@vercel
Copy link

vercel bot commented Jun 16, 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 Jun 16, 2023 7:54pm

@netlify
Copy link

netlify bot commented Jun 16, 2023

Deploy Preview for care-egov-staging ready!

Name Link
🔨 Latest commit 1d58a2e
🔍 Latest deploy log https://app.netlify.com/sites/care-egov-staging/deploys/648cbda323386a000858bc93
😎 Deploy Preview https://deploy-preview-5711--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 settings.

@nihal467
Copy link
Member

LGTM

@khavinshankar khavinshankar merged commit fba8471 into ohcnetwork:develop Jun 20, 2023
27 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

make the error message consistent in facility config page
3 participants