4 Commits

Author SHA1 Message Date
1aa0a4e3ef Improve the UX when creating groups as a supervisor (#123)
All checks were successful
Build and test / build-and-test (push) Successful in 16m49s
The main problem was that the supervisor did not get enough information about each project, mainly who the authors were, when selecting them in the dropdown.

To remedy this, the dropdown has been completely replaced with a checkbox based approach showing the title as well as project type, authors, and start date for each project. The projects are sorted first by start date (descending) and then title, based on the assumptions that newly created projects are the most relevant when setting up groups.

In addition extra "quick buttons" have been added in an effort to reduce the number of clicks required to accomplish varying tasks.

Fixes #89

## How to test
1. Log in as `evan@example.com`
2. Go to "My groups"
3. Click "Create new group"

Co-authored-by: Nico Athanassiadis <nico@dsv.su.se>
Reviewed-on: #123
Reviewed-by: Nico Athanassiadis <nico@dsv.su.se>
Co-authored-by: Andreas Svanberg <andreass@dsv.su.se>
Co-committed-by: Andreas Svanberg <andreass@dsv.su.se>
2025-03-05 11:01:37 +01:00
d008bec815 Allow supervisors to request improvements from final seminar opponents (#78)
All checks were successful
Build and test / build-and-test (push) Successful in 16m45s
Fixes #36

## How to test
1. (Optional) Log in as `sid@example.com` and submit an opposition report
   1. Go to the tab "Opposition & Active participation"
   2. Open the opposition "Putting the it in supervising" on the right
   3. Submit the report
2. Log in as `eric@example.com`
3. Go to the final seminar in the "Putting the it in supervising" project (or follow the notification if you did step 1)
4. Request improvements
5. Log in as `sid@example.com`
6. Follow the notification to submit the new opposition report

Click the "Re-run all jobs" button (top right) on https://gitea.dsv.su.se/DMC/scipro/actions/runs/457 to reset the database. It takes a few minutes.

Reviewed-on: #78
Reviewed-by: Nico Athanassiadis <nico@dsv.su.se>
Co-authored-by: Andreas Svanberg <andreass@dsv.su.se>
Co-committed-by: Andreas Svanberg <andreass@dsv.su.se>
2025-03-05 10:05:37 +01:00
17192f9eb9 Handle the case with no test data populators (#122)
All checks were successful
Build and test / build-and-test (push) Successful in 18m42s
Since there is no populator yet Spring fails when trying to inject since it does not support empty collections. Mark the dependency as optional until we have at least one populator at which point we can simply the code again.

Reviewed-on: #122
Reviewed-by: Nico Athanassiadis <nico@dsv.su.se>
Co-authored-by: Andreas Svanberg <andreass@dsv.su.se>
Co-committed-by: Andreas Svanberg <andreass@dsv.su.se>
2025-03-04 06:12:15 +01:00
a76b317b1c Improve test data creation (#112)
All checks were successful
Build and test / build-and-test (push) Successful in 16m12s
Currently there is only one class used to add test data; [`DataInitializer`](b9f7dd5a49/core/src/main/java/se/su/dsv/scipro/DataInitializer.java). That class is already very large and causes a lot of merge conflicts when multiple changes are in the pipeline as noted by #109.

This change makes it possible to have multiple classes adding test data so that each change adds its own class and thus there are no conflicts. It also has the benefit of making each class smaller and more self-contained for testing a specific feature.

Some additional infrastructure was added in the form of the `BaseData` and `Factory` (naming improvements notwithstanding) interfaces to help each class add its own test data and re-use common data.

Finally all test data related classes have been moved to their own module so they can be properly excluded when building for production but are included by default while developing.

Fixes #109

## Future work
* Add a mechanism to work with date and time.
    Many processes (and therefore service method implementations) rely on the time between certain events. For example a final seminar must be scheduled a set amount of days in advance. In the ideal world, the test data is populated using these service methods to more accurately represent an achievable real world state. Therefore there must be a way to manipulate time when adding test data.
* Add more methods to the `Factory` interface as we discover more common steps that many populators must take.
* Add more base data available through the `BaseData` interface as we discover more common data that many populators need
    Care must be taken that this data is final and useful in its base state since populators will rely on that state.

Co-authored-by: Nico Athanassiadis <nico@dsv.su.se>
Reviewed-on: #112
Reviewed-by: Nico Athanassiadis <nico@dsv.su.se>
Co-authored-by: Andreas Svanberg <andreass@dsv.su.se>
Co-committed-by: Andreas Svanberg <andreass@dsv.su.se>
2025-03-03 12:38:35 +01:00