sleede / fab-manager

Fab-Manager is the FabLab management solution. It provides a comprehensive, web-based, open-source tool to simplify your administrative tasks and your marker's projects.
http://www.fab-manager.com
Other
229 stars 114 forks source link

Add username column to the member list #375

Closed Guichaguri closed 2 years ago

Guichaguri commented 2 years ago

This PR adds a new column "Username" in the admin member list page and makes it searchable.

In our FabLAB, we are using the username as the student identification number. It is a requirement to be able to quickly search a find a specific student based on their identification number instead of having to find their account by their full name.

I think many other FabLABs could also benefit from this feature, as they may have multiple users with similar names.

This is my first PR, and also my first time working with Ruby, so let me know what can be improved.

Thank you!

gus-abreu commented 2 years ago

Hi @sylvainbx, this is our fist official contribution other than translations. I'd like to kindly ask for your support for us to implement this feature (and the other fixes). It will deeply help our workflow and we believe it will benefit others as well.

sylvainbx commented 2 years ago

Hi @ghabreu and @Guichaguri! Many thanks for your contribution, I'm very happy that other people contributes to Fab-manager and help improving it! :smiley:

As far as I can see (without testing for now), this seems pretty good to me, but you have to be careful about one point: the translations :flags: must not be written in files, except for english tranlations (*app..en.yml** files). Crowdin will handle the translations in other languages and writing translations for him will result in conflicts. So can you please remove the translations in app.admin.de.yml :de: , app.admin.pt.yml :portugal: , etc.?

One more thing: please base your contributions on the dev branch as master should only contains stable code released in production, and is not intended to receive new code except those comming from dev, which have passed the test pipeline. Moreover, dev may contain changes that can conflict with yours, so prevention is better than cure :wink:

Guichaguri commented 2 years ago

Thanks for the heads up! I've just removed the translations keeping only the English one.

sylvainbx commented 2 years ago

I just added an option to make this column optionnal because on small screens it made the table a little overloaded. This is disabled by default. You can take a look at my commit above if you want. Otherwise, congratulations for your first merged contribution :smile: :partying_face: