allcleardev / allclear-app

AllClear, an open source app for covid-19 status reporting, tracking and locating testing sites.
GNU Affero General Public License v3.0
6 stars 0 forks source link

AC-493 feature: create an edit-test-center on front end with prepopul… #513

Closed MattMoran12 closed 3 years ago

MattMoran12 commented 3 years ago

…ated for an edit request

Checklist for Pull Requests

🚨Please review the guidelines for contributing to this repository.

Description

crimsonsunset commented 3 years ago

sorry, can you explain whats supposed to happen when user hits submit? id imagine theres some kind of QA process on our side? like random logged out users shouldnt be able to just edit our locations right?

right now, when i submit a change and then refresh the page, i dont see any of the changes i just put in.

MattMoran12 commented 3 years ago

sorry, can you explain whats supposed to happen when user hits submit? id imagine theres some kind of QA process on our side? like random logged out users shouldnt be able to just edit our locations right?

right now, when i submit a change and then refresh the page, i dont see any of the changes i just put in.

Yes so this page should request an edit, not make the edit. It calls the requestChangeByCitizen endpoint which should add this request to a queue which will be looked at before the change is actually made to the test center.

MattMoran12 commented 3 years ago

By putting the duplicate code into a component, I was able to cut the duplicate code down to 19.1%. Most of the duplicate code is due to the functions being passed in to the component. These functions have small difference or might be handled different in the future which is why I'm unsure how to cut down even further.

sonarcloud[bot] commented 3 years ago

SonarCloud Quality Gate failed.

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
19.1% 19.1% Duplication