crater-invoice/crater

Logout issue when we click on view customer

anubhavBeehyv opened this issue · 5 comments

Whenever we click on some customer( or any other view page) it redirects us to customer/{id}/view
-A slidebar will show which displays all the customers
-An api will hit to get customers according to the page number
-If there are too many customers api will keep on hitting until we get the last set of customers

Issue-
If there are 20 api's which will hit to displays all customers and upto now 10(or any number <20) are hit and we click on logout logout would not be successful we will just be redirected back to login page and if we click refresh we will be logged in back again to crater.

Expected behavior :-
We should be logged out regardless of api calls are completed or not.

Currently worked with 100 customers and clicked on second customer name api calls started clicked logout redirected to login page api calls were still happening in background clicked refresh redirected to dashboard (user is logged in ).
This is not only in case of customers its for all the views slidebar we can't logout when slidebar is not loaded completely.

Logged in user clicked on customer view page loaded and api hits started:-
Screenshot from 2023-02-22 15-18-43

Api's still hitting not reached the last customer yet clicked on logout redirected to login page:-
Screenshot from 2023-02-22 15-25-14

Clicked on refresh -
Screenshot from 2023-02-22 15-25-19

User is logged in

Expected:-
User should have been logged out on clicking the logout button .

@radhika587 I remember that you fixed this issue on the enterprise version but we need to fix this one here too.

Whenever we click on some customer( or any other view page) it redirects us to customer/{id}/view -A slidebar will show which displays all the customers -An api will hit to get customers according to the page number -If there are too many customers api will keep on hitting until we get the last set of customers

Issue- If there are 20 api's which will hit to displays all customers and upto now 10(or any number <20) are hit and we click on logout logout would not be successful we will just be redirected back to login page and if we click refresh we will be logged in back again to crater.

Expected behavior :- We should be logged out regardless of api calls are completed or not.

Currently worked with 100 customers and clicked on second customer name api calls started clicked logout redirected to login page api calls were still happening in background clicked refresh redirected to dashboard (user is logged in ). This is not only in case of customers its for all the views slidebar we can't logout when slidebar is not loaded completely.

@anubhavBeehyv Thanks for the feedback. We are working on creating a fix for this issue.

@radhika587 does this makes a change like applying the watcher in different way I tried the same change but still the issue persists. Unfortunately this fix doesn't work for the above issue.

The bahmni team is still unable to use this fix. We are tracking it here in JIRA for Bahmni team: https://bahmni.atlassian.net/browse/BAH-2151

FYI: @anubhavBeehyv & crater-team