Moderators front-end
Closes https://gitlab.com/JOGL/JOGL/-/issues/955, https://gitlab.com/JOGL/JOGL/-/issues/901, https://gitlab.com/JOGL/JOGL/-/issues/848, https://gitlab.com/JOGL/JOGL/-/issues/956, https://gitlab.com/JOGL/JOGL/-/issues/977.
Checklist
Front-end
-
create a /admin url -
implement 404 redirection in case user is not moderator -
Code functional BtnDelete with confirmation modal -
implement Delete Btn on user page, appearing only if isModerator -
Same on user cards -
plug BtnDelete action with coming delete user backend endpoint (JOGL!35 (closed)) -
insert adapted FormSkillsComponent -
solve last delay bug (btw index names & index ids) -
link it to email system for JOGLers filtered by skills; -
link it to csv downloading btn of the list of JOGLers filtered by skills.
Front-end peripheric tasks done in same branch
-
clean /userProfileFormRulesEdit.json and UserCard -
better 404 style -
adapt endpoint call for user deleting itself
Back-end
-
algolia disable_index only on test env JOGL!33 (closed) -
Algolia settings fixed so fullstack runs
How to review this MR
- You will need to be able to test both scenarios: moderator or non-moderator, doing so:
bundle exec rails c
User.first.add_role(:moderator) / User.first.remove_role(:moderator)
- Go to the /admin url as a moderator, you should find the dashboard;
- Go to the /admin url as a non-moderator, you should be redirected to 404 as if you had typed a non-existing url;
- Go to the profile page of a user (or its search/members card) as a moderator, you should find a Delete btn and be able to follow through;
- Go to the profile page of a user (or its search/members card) as a non-moderator, you should not even see the Delete btn;
- Test both skills modalities (send email & download csv) in /admin url as a moderator.
Edited by LucaH