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

Fix check for required fields on Update Patient Details page #3200

Merged
merged 2 commits into from
Aug 11, 2022

Conversation

Ashesh3
Copy link
Member

@Ashesh3 Ashesh3 commented Jul 23, 2022

Fixes #3181

When a parent selection changes, the dependent option is reset to the "Unselected" choice. This PR also fixes the check for blank selection, by casting it to a number first as they are stored as string.

image

@Ashesh3 Ashesh3 requested a review from a team July 23, 2022 04:28
@Ashesh3 Ashesh3 requested a review from a team as a code owner July 23, 2022 04:28
@Ashesh3 Ashesh3 requested a review from mathew-alex July 23, 2022 04:28
@netlify
Copy link

netlify bot commented Jul 23, 2022

Deploy Preview for care-egov-staging ready!

Name Link
🔨 Latest commit c1a4bcf
🔍 Latest deploy log https://app.netlify.com/sites/care-egov-staging/deploys/62de4bc4fa743000084242be
😎 Deploy Preview https://deploy-preview-3200--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.

Copy link
Contributor

@developedBySJ developedBySJ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Ashesh3
If you change

state  => reset district, local_body, ward
district => reset local_body, ward
local_body => reset ward

Currently, only one field is updated

@Ashesh3
Copy link
Member Author

Ashesh3 commented Jul 25, 2022

@Ashesh3 If you change

state  => reset district, local_body, ward
district => reset local_body, ward
local_body => reset ward

Currently, only one field is updated

Hey, the field updating is chained in the current logic.
state => reset district (Which forces u to select a district, => resets local_body, which forces you to select a local body => resets ward)
district => reset local_body, (forces you to select a local_body => resets ward)
local_body => reset ward

I agree that updating all children fields at once would be neater, making the change now.

Edit: Tried using a fall though switch case but ts-lint isn't happy about it, so did it the other way.

@sonarcloud
Copy link

sonarcloud bot commented Jul 25, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.8% 0.8% Duplication

@nihal467
Copy link
Member

@Ashesh3 @developedBySJ once completed, change the status to need testing

@Ashesh3
Copy link
Member Author

Ashesh3 commented Jul 26, 2022

The requested changes are made from my side and it works as expected. Need a review @developedBySJ then testing.

@Ashesh3
Copy link
Member Author

Ashesh3 commented Jul 29, 2022

The requested changes are done, need a test now!

@nihal467
Copy link
Member

nihal467 commented Aug 2, 2022

@developedBySJ do the review and upon completed, update the label to need testing, currently making it to work-in-progress

Copy link
Contributor

@developedBySJ developedBySJ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nihal467
Copy link
Member

nihal467 commented Aug 4, 2022

test approved

@nihal467 nihal467 added the tested label Aug 4, 2022
@khavinshankar khavinshankar merged commit 28e798b into coronasafe:develop Aug 11, 2022
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.

Required fields are not checked on Update Patient Details page
4 participants