Conversation
… the total amount of histories for the page numbers
CheeYuKoh
left a comment
There was a problem hiding this comment.
just reviewed and tried the code, seems ok and is working
XinHuang1112
left a comment
There was a problem hiding this comment.
Codes are very clear and detailed. I have tested it on my local machine. It really helps boost webpage load times effectively.
There was a problem hiding this comment.
I reviewed the code and tested the frontend, and everything works as expected. The backend data is populated correctly in the frontend. For example, the target grade history is displayed accurately in a table. I can confirm that the frontend divides the total records (e.g 37) by the maximum number of records per page (10) to calculate and display the correct number of pages. It fetches and displays the data correctly on the website. I did not find any error in the code. I do approve this.
|
@nodogx Please open a pull request against the upstream repo doubtfire-lms/doubtfire-web, branch 8.0.x. |
This has been done @aNebula : doubtfire-lms#913 |
Description
Added Data Pagination
Now, instead of loading all the data histories at once, the backend just gives the data based on the webpage and a limited number or data. For example, If there are 30 records, and if the page 1 has 10 records, this will only give the 10 records in the backend with the total number of records (needed for page count).
When the user goes to page 2 for example, the next set of data will be loaded. This way, if there are 500 histories for example, everything will not be loaded at once.
This will help boost webpage load times
How Has This Been Tested?
Login as any user
Go to the dashboard (where all the target history is been shown)
Go to the inspect page in the browser.
Go to the Network tab, and see how the data is loaded every time when the user is navigated to a new page
Testing Checklist:
Checklist:
Back end pull: thoth-tech/doubtfire-api#50