DTLA Hack for LA is partnering with Los Angeles Department of Transportation (LADOT) to develop a Traffic Demand Management (TDM) calculator tool. This tool will help planners at LADOT and real estate developers to meet the Los Angeles’s Mobility Plan goals by 2035.
Implemented the items per page with choices of 10, 25, 50, 100 or All projects/page.
Implemented the first and last page button.
The number of pages change according to the filtered parameters of the project.
Why did you make the changes (we will use this info to test)?
The items per page was implemented for better use of the My Projects page.
Issue-Specific User Account
The ladot@dispostable.com account was used for testing.
Screenshots of Proposed Changes Of The Website (if any, please do not screen shot code changes)
Visuals before changes are applied
![Screenshot 2024-05-08 at 10 05 33 PM](https://github.com/hackforla/tdm-calculator/assets/133067265/50b3f607-b572-4d63-b04e-2f2613faac31)
Visuals after changes are applied
![Screenshot 2024-05-08 at 10 04 41 PM](https://github.com/hackforla/tdm-calculator/assets/133067265/59b83a37-f201-46bc-8bec-7fb09c2d84ec)
![Screenshot 2024-05-08 at 10 04 10 PM](https://github.com/hackforla/tdm-calculator/assets/133067265/2b0347fa-959b-44d9-91af-821027d17ebc)
Move the Paginate.js control to the UI folder, as it is currently only used on the ProjectsPage, but could be used elsewhere.
Fix a problem when you start with 10 per page, then nav to, say page 5, then change to 25 items per page. The code was leaving the current page at 5, but that is past the last page after changing items per page, so the grid was empty. I just modified such that when you change the items per page, it checks to see if the current page is still in range, and, if not, changes the current page to 1. You could argue that when you change the items per page, you should always reset to page 1.
What changes did you make?
Why did you make the changes (we will use this info to test)?
Issue-Specific User Account
The ladot@dispostable.com account was used for testing.
Screenshots of Proposed Changes Of The Website (if any, please do not screen shot code changes)
Visuals before changes are applied
![Screenshot 2024-05-08 at 10 05 33 PM](https://github.com/hackforla/tdm-calculator/assets/133067265/50b3f607-b572-4d63-b04e-2f2613faac31)Visuals after changes are applied
![Screenshot 2024-05-08 at 10 04 41 PM](https://github.com/hackforla/tdm-calculator/assets/133067265/59b83a37-f201-46bc-8bec-7fb09c2d84ec) ![Screenshot 2024-05-08 at 10 04 10 PM](https://github.com/hackforla/tdm-calculator/assets/133067265/2b0347fa-959b-44d9-91af-821027d17ebc)