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

Fixed malfunction in user management regarding add user form #3173

Merged
merged 6 commits into from
Jul 27, 2022

Conversation

aeswibon
Copy link
Member

Updates

  • Fixes user management malfunction #3170
  • Removed other states from dropdown for StateAdmin and lower
  • Removed other districts from dropdown for DistrictAdmin and lower
  • Removed other localbodies from dropdown for LocalBodyAdmin and lower

@aeswibon aeswibon requested a review from a team July 20, 2022 18:42
@aeswibon aeswibon requested a review from a team as a code owner July 20, 2022 18:42
@netlify
Copy link

netlify bot commented Jul 20, 2022

Deploy Preview for care-egov-staging ready!

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

@sonarcloud
Copy link

sonarcloud bot commented Jul 20, 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.0% 0.0% Duplication

@nihal467
Copy link
Member

test approved

@khavinshankar khavinshankar merged commit 3d4bea0 into coronasafe:develop Jul 27, 2022
Comment on lines +267 to +277
if (userIndex <= USER_TYPES.indexOf("StateAdmin")) {
setStates([
...initialStates,
{
id: currentUser.data.state,
name: currentUser.data.state_object.name,
},
]);
} else {
setStates([...initialStates, ...statesRes.data.results]);
}
Copy link
Member

@rithviknishad rithviknishad Sep 22, 2022

Choose a reason for hiding this comment

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

@cp-Coder @gigincg wouldn't the condition always be true and hence the else block is never executed.

userIndex is an index within USER_TYPES, and StateAdmin is the last element in USER_TYPES and hence it has the highest index. so...

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.

user management malfunction
4 participants