develop-candymat #7

Merged
christoph.lienhard merged 10 commits from develop-candymat into main 2022-02-02 15:03:48 +01:00
No description provided.
christoph.lienhard added 9 commits 2022-02-02 13:45:01 +01:00
13be951160 Add vue-apollo to user-app
It does not fetch anything yet.
It points to the graphql server on localhost, which is a hardcoded dev-mode.
Added config for GraphQL JS intellij plugin which inspects a "remote" graphql schema for better type hints in graphql queries in code
f01d492d95 Fix calculation of scores
With this commit two calculation errors are fixed
 * the score in the case partyPosition = 'negative' while userPosition = 'neutral' shouldn't be MIN_POINTS but rather BASE_POINTS.
 * the totalScoredPoints (now "totalMaxPoints") should be independent of any party-positions which it wasn't.

To minimize errors in this area in the future tests are added
which are based on the official Rechenmodel of the bpb.
To that end the score calculation logic was refactored
 and moved from results.vue to scoring.js, too.

(cherry picked from commit 2d246fefbc4730ca5f7a4224325084a98f1c41f0)
64e6b861b6 Last not Least: Get party details page from backend
Also
* reorder graphQl queries: Always a query constant + update function
* use id instead of token (initials) to identify person in url
* Remove any party logo related sections since currently not needed
* Move "options" from data closer to actual code since it doesn't really belong to data
  (data may be deleted in the future, anyway)
* add nodeId in gql queries wherever possible to avoid problems with the apollo cache
* add note about graphql schema import to README.md
d414b95c1c
Fix several smaller problems
* adapt for structure change in gql backend (e.g. id -> rowId)
* display questions not rowId dependent anymore
* fixed calculation error if both, party and user, selected "skipped"
* fixed problems occuring when a candidate hasn't answered all questions (yet)
christoph.lienhard added 1 commit 2022-02-02 15:03:31 +01:00
christoph.lienhard merged commit dc1602b6e8 into main 2022-02-02 15:03:48 +01:00
Sign in to join this conversation.
No description provided.