cybernetisk / internsystem-v2

A NextJS-based website. Used for public information about Cybernetisk Selskab, and necessary tools for volunteers at the bar/café Escape.
https://cyb.no
MIT License
7 stars 9 forks source link

Accidentally adding new members #32

Open juliegri opened 2 months ago

juliegri commented 2 months ago

HEI!

It's too easy to accidentally add new members. After you've successfully added a new member their name stays in the input field - and if you right click this field the member gets added on more time. For usability's sake it should probably only be possible to add new members by clicking the "add"-button. plspls (btw. Eirik Noremsaune was added as a member 5 times heheh 🤭)

EricSvebakk commented 2 months ago

30 Mentions this

yrjarv commented 1 month ago

I think I have a fix ready for this (querying the database for duplicates before creating new user). But how should we give the error message? I notice that other places the field with invalid values is marked in red, but I feel like a more detailed error message would be fitting here. We could of course just alert using the built-in alert() function, but what do you think @EricSvebakk? PS: My fix won't solve #30 though, only this issue