Fixes: version display / moderation handling / 'global state' hooks / etc.
Changes:
- [fix] backend ordering on versions endpoint
- [fix] frontend versions display
- [fix] frontend pending moderation and moderate
- [fix] frontend moved services Component up in the tree
- [fix] frontend fullscreen dialog: no more memory leak / setState on unmounted component
- [feat] frontend added hooks:
useOnBeforeComponentMount
,useOnComponentUnMount
- [fix / refacto] frontend 'global state' hooks: no more setState on unmounted components.
To test:
- Edition still works
- Displaying version (http://localhost:8000/app/university/203/general) correct order,
- Display and validation of pending moderation of works:
- become moderator:
make shell_backend
# replace 'chehabfl' by your own UTC login
echo "from base_app.models import User; user = User.objects.get(username='chehabfl'); user.is_superuser = False; user.is_staff = False; user.save();" | ./manage.py shell
- Edit the présentation on http://localhost:8000/app/university/203/general
- Check the pending moderation view (click on the
🛡 ) - Become moderator:
make shell_backend
# replace 'chehabfl' by your own UTC login
echo "from base_app.models import User; user = User.objects.get(username='chehabfl'); user.is_superuser = True; user.is_staff = True; user.save();" | ./manage.py shell
- reload the previous page, click on the shield and moderate the element.