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)
This commit is contained in:
Christoph Lienhard 2020-12-31 21:13:23 +01:00
parent 3490ca5a2c
commit 16d8e527f7
Signed by: christoph.lienhard
GPG key ID: 6B98870DDC270884
3 changed files with 8 additions and 1 deletions

View file

@ -26,7 +26,6 @@ export default function DialogDeleteCategory() {
cache.modify({
fields: {
allCategories(existingCategoriesRef: { nodes: Array<Reference> } = {nodes: []}, {readField}) {
console.log("existingCategory: ", existingCategoriesRef)
return {nodes: existingCategoriesRef.nodes.filter(categoryRef => readField('id', categoryRef) !== idToRemove)};
}
}

View file

@ -19,3 +19,10 @@ export function MainPageCandidate() {
</Container>
);
}
enum CandidatePosition {
positive = 0,
neutral = 1,
negative = 2,
skipped = 3
}

View file

@ -80,6 +80,7 @@ export default function SignIn() {
noValidate
onSubmit={event => {
event.preventDefault();
// fixme: logging?????
login({variables: {email: email, password: password}}).catch(error => console.log(error))
}}
>