Skip to content

Add paging to users/{user_ID}/tasks #322

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

Open
wants to merge 4 commits into
base: development
Choose a base branch
from

Conversation

Dylan-Riley
Copy link
Contributor

@Dylan-Riley Dylan-Riley commented Mar 25, 2021

Closes: #319

Bootstrap Tables have built-in pagination, looks like, so I rewrote the UserTasks.js React UI into UserTasksPaginated.js following a similar style to UsersPaginated.js.
image

For testing on local machines:

  • Pull down the branch from my fork
  • Open the fork folder and type cmd in the explorer bar
  • cd ui/react-ui
  • npm install
  • npm start
    • Or otherwise get a command line and start the react app on your local machine to taste
  • Enter a user ID into the /users/_______/tasks search bar
    • 2 is good
  • Underneath the table you will see the paginationFactory

Possible improvements:

  • Table spacing looks bad on narrow windows
  • No "mark completed" option
  • Possibly reworking utils.js 's fetchSetTblState() so it returns a nicer JSON of the data and removal of coded column names in UsersPaginated and UserTasksPaginated

@Dylan-Riley Dylan-Riley added the team2 Issues for Practicum Team 2 label Mar 25, 2021
@Dylan-Riley Dylan-Riley added this to the Sprint 06 milestone Mar 25, 2021
@Dylan-Riley Dylan-Riley self-assigned this Mar 25, 2021

useEffect(() => {
getData(userId);
setLoading(true);

Choose a reason for hiding this comment

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

this looks like it should go before your axios call. I don't see any place that shuts off loading afterwards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team2 Issues for Practicum Team 2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adding Paging to /users/{user_id}/tasks in React
2 participants