[Frontend] Populationes optimizatae
- Reduce the amount of API calls
- Unify the calling convention to population APIs
- Make population API calls faster
* [Frontend] Täsäfy PopulationStatistics
* [Frontend] Reorganized PopulationStatistics
* [Redux] Removed dangling reducer actions left back in 51e5846 and further in history
This commit is 4 years due...
* Convert to RTKQuery for populationStatistics
* Removed useSelector for state.population
* Reset PopulationsStatistics params based on the new query param formatting
* Format semesters to array instead of spreading strings
* Force array formating with single key values
* Stop lying to the users
Progressbar is no more
- Reworked `populationstatistics/courses`
- `/coursesbytag` and `coursesbystudentnumberlist` now use the same API
- Updated frontend to use `/courses` instead
- Updated cypress to call the new `v4/populationstatistics/courses` instead of `v2`
- Added types to request queries, request- and response bodies for multiple `populationstatistics/` routes
- Simplified parts of `optimizedStatisticsOf` call and its callers
- Cleaned up `bottlenecksOf`
- Made `studentNumbersWithAllElements` more verbose
- Simplified `CourseStatsCounter`
- Moved functions that were only used for course statistics from `utils` to `courseStatsCounter`
- Moved `populationCourseStatMerger` into the only function it is ever called from
- Made `hasFullAccessToStudentData` explicit boolean return value
- Added `safeJSONParse` function to server utils to stop server from throwing (still needs to be implemented more widely)
- Added `formatToArray` and made `Array.isArray?val:[val]` disappear
- Made `CurriculumPicker` easier to read and more type safe
- Forced `formattedQueryParams` to be passed into `fetchPopulations` to avoid duplicate processing