Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Related Persons screen always shows loading when there are no related persons #1789

Closed
jackcmeyer opened this issue Feb 4, 2020 · 8 comments · Fixed by #1810
Closed

Related Persons screen always shows loading when there are no related persons #1789

jackcmeyer opened this issue Feb 4, 2020 · 8 comments · Fixed by #1810
Assignees
Labels
🐛bug issue/pull request that documents/fixes a bug good first issue indicates an issue is good for a first time contributor in progress indicates that issue/pull request is currently being worked on
Milestone

Comments

@jackcmeyer
Copy link
Member

jackcmeyer commented Feb 4, 2020

🐛 Bug Report

When a patient does not have a related person, the related person tab always shows loading.

To Reproduce

  1. Navigate to a patient without a related person
  2. Navigate to the related persons tab
  3. See that the related person tab always shows loading

Expected behavior

A warning message should appear stating that there are no related persons and describe how to add one.

However, it should show a loading message when it is loading.

@jackcmeyer jackcmeyer added 🐛bug issue/pull request that documents/fixes a bug help wanted indicates that an issue is open for contributions good first issue indicates an issue is good for a first time contributor labels Feb 4, 2020
@jackcmeyer jackcmeyer added this to the v2.0.0 milestone Feb 4, 2020
@Pranav2612000
Copy link

Hey! Is anybody working on this? I would like to contribute.

@jackcmeyer
Copy link
Member Author

@Pranav2612000 go ahead! issue is all yours!

@jackcmeyer jackcmeyer added in progress indicates that issue/pull request is currently being worked on and removed help wanted indicates that an issue is open for contributions labels Feb 6, 2020
@Pranav2612000
Copy link

I have started working on the task. Is it as simple as changing the "Loading..." text to something more informative say "No Related Members"

@jackcmeyer
Copy link
Member Author

Not quite @Pranav2612000.

It should show loading when the page is loading.

And when it’s done loading, it should either show related persons or something more helpful.

@ocBruno
Copy link
Contributor

ocBruno commented Feb 6, 2020

Hey @archwheeler I forgot to give notice I had started this one but feel free to take it over, I am going to leave a commit here incase you want to adapt something into your PR.

ocBruno added a commit to ocBruno/hospitalrun-frontend that referenced this issue Feb 6, 2020
@Pranav2612000
Copy link

Hey!! I too had started working on the project and have made the changes as requested, adding a 'isLoading' state to show "Loading..." when the component is loading and "No related persons have been added yet" to show when no related persons are present.

@Pranav2612000
Copy link

@ocBruno Tried your commit, couldn't get it to work. It still shows "No related persons. Insert one by click above on New Related Person." for a fraction of second before transitioning to the list of related persons.

@ocBruno
Copy link
Contributor

ocBruno commented Feb 7, 2020

@ocBruno Tried your commit, couldn't get it to work. It still shows "No related persons. Insert one by click above on New Related Person." for a fraction of second before transitioning to the list of related persons.

@archwheeler feel free to remove anything unnecessary, I had noticed that it loaded very quickly I couldn't even see the loading message.I stopped when I was trying to learn to use breakpoits on the chrome inspector to make sure the loading message was appearing

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🐛bug issue/pull request that documents/fixes a bug good first issue indicates an issue is good for a first time contributor in progress indicates that issue/pull request is currently being worked on
Projects
None yet
3 participants