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 success/Cancel url prop in fhir location form #974

Merged
merged 7 commits into from
May 16, 2022

Conversation

peterMuriuki
Copy link
Collaborator

Fix success/Cancel url prop in fhir location form

close #948

Copy link
Member

@machariamuguku machariamuguku left a comment

Choose a reason for hiding this comment

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

Also codecov seems to not run

@peterMuriuki peterMuriuki force-pushed the 948-location-redirection branch from c1987de to 07d71a1 Compare April 21, 2022 09:15
Fixes problem where user edits a location, they are redirected back to the location unit list view, user immediately tries to re-edit the recently edited location, the form values were not those freshly picked from the api
Add alert when refetching tree location hierarchy
React.useEffect(() => {
form.setFieldsValue({ ...initialValues });
useDeepCompareEffect(() => {
form.resetFields();
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

@p-netm I still feel we should show a loader as the list is re-evaluated

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@machariamuguku this will show a banner when the location hierarchy is being refetched: ade8d65

@codecov-commenter
Copy link

codecov-commenter commented May 13, 2022

Codecov Report

Merging #974 (740f9bc) into master (1e109d7) will decrease coverage by 0.89%.
The diff coverage is 91.30%.

@@            Coverage Diff             @@
##           master     #974      +/-   ##
==========================================
- Coverage   96.67%   95.78%   -0.90%     
==========================================
  Files         288      322      +34     
  Lines        8911     9815     +904     
  Branches     1739     2037     +298     
==========================================
+ Hits         8615     9401     +786     
- Misses        292      409     +117     
- Partials        4        5       +1     
Impacted Files Coverage Δ
...ement/src/components/AddEditLocationUnit/index.tsx 87.50% <0.00%> (ø)
...n-management/src/components/LocationForm/index.tsx 91.48% <66.66%> (ø)
...on-management/src/components/LocationForm/utils.ts 97.14% <100.00%> (ø)
...nagement/src/components/LocationUnitList/index.tsx 100.00% <100.00%> (ø)
...ages/react-utils/src/hooks/useSimpleTabularView.ts 94.87% <0.00%> (-3.35%) ⬇️
...anagement/src/components/NewLocationUnit/index.tsx 70.17% <0.00%> (-0.66%) ⬇️
app/src/constants.tsx 100.00% <0.00%> (ø)
packages/fhir-team-management/src/constants.tsx 100.00% <0.00%> (ø)
...team-management/src/components/TeamsView/Table.tsx 100.00% <0.00%> (ø)
...-management/src/components/forms/UserForm/types.ts 100.00% <0.00%> (ø)
... and 43 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1e109d7...740f9bc. Read the comment docs.

@peterMuriuki peterMuriuki merged commit fd0eb0b into master May 16, 2022
@peterMuriuki peterMuriuki deleted the 948-location-redirection branch May 16, 2022 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

user is redirected to the administration page after adding a location unit instead of location unit list page
3 participants