Skip to content

Fix for add new patient nav bar, onclick functionality #379

Open
sakthiarajapandian27 wants to merge 1 commit intomasterfrom
admin_navigation_addNewPatient
Open

Fix for add new patient nav bar, onclick functionality #379
sakthiarajapandian27 wants to merge 1 commit intomasterfrom
admin_navigation_addNewPatient

Conversation

@sakthiarajapandian27
Copy link
Copy Markdown
Collaborator

@sakthiarajapandian27 sakthiarajapandian27 commented Mar 29, 2026

Description

Initially in admin user, the new patient functionalities nav bar onclick functionality was not working. Fix for it.

Todos

  • Tested and working locally
  • Code follows the style guidelines of this project
  • I have performed a self-review of my code
  • Code changes documented
  • Requested review from >= 2 devs on the team (one frontend and one backend recommended)

How to test

Login as admin -> At home page click add new patient -> click the side nav bar -> Onclick of home and Signout fixed

Associated MS Planner Tasks

  • Navigation and Routing Refinement(http://ms_planner_task_link.com)

@KudratAroraa KudratAroraa self-assigned this Mar 29, 2026
Copy link
Copy Markdown
Collaborator

@KudratAroraa KudratAroraa left a comment

Choose a reason for hiding this comment

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

Approved. I tested this locally and confirmed that the issue has been resolved as intended. In the Admin user flow, after going to Add New Patient, the side navigation bar is now responding correctly on click. The Home option navigates back to the admin homepage as expected, and the Signout option now properly signs the user out, redirects to the login screen, and clears the activity back stack so the user cannot navigate back into the session.

The implementation is clean and focused on the reported bug. Adding the setNavigationItemSelectedListener in this activity directly addresses the missing navbar click handling without introducing unrelated changes. The logout handling is also correctly implemented using Firebase sign out together with FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_CLEAR_TASK, which is appropriate for this flow.

Overall, the fix works as expected, aligns with the intended functionality and is ready to merge.

Small thing to note:
This is not a blocker for this PR, but worth mentioning:
Home navigation may stack duplicate screens: If admin is already deep in the flow and taps Home multiple times, this can create multiple Homepage4admin instances unless launch mode or intent flags handle it elsewhere.

Possible improvement:
Intent homeIntent = new Intent(PatientProfileAddActivity.this, Homepage4admin.class);
homeIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
startActivity(homeIntent);

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.

2 participants