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

shows CRUD errors for tickets, frontend error handling and made URL's clickable #174

Merged
merged 5 commits into from
Dec 22, 2023

Conversation

willi-li-am
Copy link
Contributor

@willi-li-am willi-li-am commented Dec 22, 2023

I don't know if you guys wanted me to do it in the backend, but all I did was a parser that checks what kind of error it is and respond with a message related to the error

resolves #84

@willi-li-am
Copy link
Contributor Author

Custom Messages:

  • click "create new ticket" without selecting a ticket type
  • these are errors made when throwing a new error in frontend

MongoDB validation errors:

  • I fixed this on frontend side by adding "type = 'number'" to cost input
  • If you remove the type = 'number' and input a string for cost, then it will give an invalid form error

Permission errors:

  • permission to delete/update a ticket
  • make isAdmin, is..., and isReporter false on backend, then try deleting/updating a ticket

MongoDB errors:

  • Just says Internal Error, please try again
  • Don't know how to create mongodb errors

@willi-li-am
Copy link
Contributor Author

QOL Changes:

  • made the page scroll to top every time user clicks on a new ticket (used useRef and useEffect which gets updated when location gets updated in Dashboard)
  • removed autofocus from comments when clicking on new ticket
  • highlight hovered and selected ticket on list

Copy link
Collaborator

@ansonjwhe ansonjwhe left a comment

Choose a reason for hiding this comment

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

lgtm! nice QOL changes!

  • tested all configurations of toast errors except MongoDB error
  • tested current/hovered ticket list highlighting
  • tested scroll to top on current ticket change (unaffected by filter query params)
  • tested content tables with URL are clickable

@willi-li-am willi-li-am merged commit f0df110 into master Dec 22, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error toasts upon failed calls
2 participants