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

Infinite Rendering and Redirection to 'not-found' Page When Adding Patient from Non-Home Facility #8988

Closed
JavidSumra opened this issue Nov 4, 2024 · 2 comments · Fixed by #9000
Assignees

Comments

@JavidSumra
Copy link
Contributor

Describe the bug
When logged in as "Doctor Dev," attempting to add a new patient from the "View Facility" section in a facility that is not the user's home facility causes an infinite rendering loop. This results in a redirection to the "not-found" page.

To Reproduce
Steps to reproduce the behavior:

  1. Go to /facility
  2. Click on View Facility
  3. In any facility that is not the home facility, click on Add Details of Patient
  4. Observe the error (infinite rendering and redirection to "not-found" page)

Expected behavior
The system should display a notification with an appropriate message explaining the restriction and redirect the user back to the home page instead of triggering an error.

Video
Watch Video

Desktop (please complete the following information):

  • OS: Windows
  • Browser: Chrome
  • Version: 130.0.6723.92
@JavidSumra
Copy link
Contributor Author

JavidSumra commented Nov 4, 2024

Can You please Assign this issue to me
cc @Jacobjeevan @rithviknishad

@Jacobjeevan
Copy link
Contributor

Jacobjeevan commented Nov 4, 2024

In this case, expected behavior should be different:

PatientRegisterAuth in PatientRegister.tsx determines the permissions of the page, so for roles like Doctor/Nurse etc, the button should only be visible accordingly.

@Jacobjeevan Jacobjeevan added this to Care Nov 4, 2024
@github-project-automation github-project-automation bot moved this to Triage in Care Nov 4, 2024
@rithviknishad rithviknishad moved this from Triage to Review required in Care Nov 20, 2024
@github-project-automation github-project-automation bot moved this from Review required to Done in Care Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants