-
Notifications
You must be signed in to change notification settings - Fork 347
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
Make mandatory validation in ONVIF camera and HL7 monitor asset page #3585 #5592
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
✅ Deploy Preview for care-egov-staging ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
Kudos, SonarCloud Quality Gate passed!
|
password.trim() === "" || | ||
streamUuid.trim() === "" | ||
) { | ||
Notification.Error({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do not want such error notifications for missing fields. Instead, maintain a state which will store all field related errors. Then, Just after e.preventDefault();
here, call a validateForm
method which will loop through all the fields we have and check for their validity and if they are invalid (missing), then update the error state with the field name with the error, errors[field] = "Please select the xxx field";
. Have this error state linked to all the TextFormField
as <TextFormField ..... error={state.errors['field_name']}
. So we will have a red text box below the input with the error.
Take reference from UserAdd.tsx
Required error message design (sample):
Current error message design on this PR:
Suggestion by @nihal467 . Feel free to ask any clarifications on this.
👋 Hi, @NimbleNitesh, This message is automatically generated by prince-chrismc/label-merge-conflicts-action so don't hesitate to report issues/improvements there. |
Hi, This pr has been automatically marked as stale because it has not had any recent activity. It will be automatically closed if no further activity occurs for 7 more days. Thank you for your contributions. |
Hi, @gigincg, @nihal467, @khavinshankar, @mathew-alex, This pr has been automatically closed because it has not had any recent activity. Thank you for your contributions. Feel free to repopen the pr. |
WHAT
The fields in ONVIF camera and HL7 monitor asset page are not mandatory
![image](https://private-user-images.githubusercontent.com/76262941/243057816-4a9cf8f0-3031-46d8-a39b-19a2beeff538.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLC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1EYXRlPTIwMjQwNzExVDE1MjA1NFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTcxYzQ0YzY3N2NhMGVlZGEzN2RiYTgyMGJiMzdhMDM1OTc5NmRkODlkZTAxYTExNGExMzM0M2JjZjg0NGY5MWYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.3ncn4ddpd7mErXOZyF6zQZToNUNZsfc1fyAXBD03FHw)
Proposed Changes
@coronasafe/care-fe-code-reviewers @coronasafe/code-reviewers
Merge Checklist
HOW
🤖 Generated by Copilot at 3b11517
HL7Monitor.tsx
(link, link)HL7Monitor.tsx
(link)ONVIFCamera.tsx
(link, link, link)handleSubmit
function inONVIFCamera.tsx
(link, link, link)ONVIFCamera.tsx
(link, link, link, link, link)ONVIFCamera.tsx
(link, link)ONVIFCamera.tsx
(link)