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 Auto-Scroll Issue and Total Count Card for Staff Capacity Pagination in facility details page #9122

Open
4 tasks
nihal467 opened this issue Nov 14, 2024 · 5 comments
Assignees
Labels
Backend Frontend needs-triage question Further information is requested

Comments

@nihal467
Copy link
Member

nihal467 commented Nov 14, 2024

Describe the bug

Originally report: #9004 (comment)

  • When navigating from page 1 to page 2 in the staff capacity section on the facility details page, the page automatically scrolls to the top.
  • When moving from page 1 to page 2, the total capacity card displays the staff capacity for the current page only, not the entire section.

To Reproduce
Steps to reproduce the behavior:

  1. Go to facility details page
  2. Add 15+ staff capacity
  3. try to move to page no 2
  4. See error

Expected behavior

  • Auto-scrolling should stop at the beginning of the staff capacity section, rather than scrolling to the top of the facility details page.
  • The total capacity card should display the total staff capacity for the entire section, not just the current page.

Screenshots

Image

@nihal467 nihal467 added the P1 breaking issue or vital feature label Nov 14, 2024
Copy link

⚠️ Refrain from assigning this issue to yourself if you have another P1 issue assigned that is not yet closed.

@nihal467 nihal467 removed the P1 breaking issue or vital feature label Nov 14, 2024
@PAVAN507-STAR
Copy link

@nihal467 can i work on this issue?

@github-actions github-actions bot added needs-triage question Further information is requested labels Nov 15, 2024
@Jacobjeevan Jacobjeevan removed question Further information is requested needs-triage labels Nov 15, 2024
@Jacobjeevan Jacobjeevan added this to Care Nov 15, 2024
@github-project-automation github-project-automation bot moved this to Triage in Care Nov 15, 2024
@Jacobjeevan Jacobjeevan moved this from Triage to Up Next in Care Nov 15, 2024
@github-actions github-actions bot added needs-triage question Further information is requested labels Nov 20, 2024
@PAVAN507-STAR
Copy link

PAVAN507-STAR commented Nov 20, 2024

@Jacobjeevan @nihal467 I found the issue of total count on card ,the problem is the logic only counts from data fetched from current page .Need a bit of help ,I have a doubt/confusion on how to approach ,so should i fetch the entire data of all pages at once i.e change limit and offset?Or do i have to write an api for that or is there any other way ?

Image

Image

@Jacobjeevan
Copy link
Contributor

@Jacobjeevan @nihal467 I found the issue of total count on card ,the problem is the logic only counts from data fetched from current page .Need a bit of help ,I have a doubt/confusion on how to approach ,so should i fetch the entire data of all pages at once i.e change limit and offset?Or do i have to write an api for that or is there any other way ?

Image

Image

Hmm 🤔 Easiest way would probably be to tweak the api rather than fetching all the results; that would affect pagination unless you want to call the api twice.

In this case, modifying HospitalDoctorViewSet to return the total along with the results should work.

@Jacobjeevan Jacobjeevan added Backend Frontend and removed question Further information is requested needs-triage labels Nov 20, 2024
@PAVAN507-STAR
Copy link

@Jacobjeevan @nihal467 I found the issue of total count on card ,the problem is the logic only counts from data fetched from current page .Need a bit of help ,I have a doubt/confusion on how to approach ,so should i fetch the entire data of all pages at once i.e change limit and offset?Or do i have to write an api for that or is there any other way ?
Image
Image

Hmm 🤔 Easiest way would probably be to tweak the api rather than fetching all the results; that would affect pagination unless you want to call the api twice.

In this case, modifying HospitalDoctorViewSet to return the total along with the results should work.

Will give it a try and let u know if it works.Thanks for the help sir.

@github-actions github-actions bot added needs-triage question Further information is requested labels Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backend Frontend needs-triage question Further information is requested
Projects
Status: Up Next
Development

No branches or pull requests

3 participants