Commit graph

118 commits

Author SHA1 Message Date
Christoph Lienhard 642062dff2
Reset apollo cache on logout 2021-02-07 23:06:58 +01:00
Christoph Lienhard b26d6d6e69
Fix "used before it was defined" warning
* updated react-scripts (fix eslint-plugin problems)
* reorder functions where needed
2021-02-07 23:06:58 +01:00
Christoph Lienhard c12aadef04 Merge pull request 'feature/#14' (#23) from feature/#14 into develop
Reviewed-on: Netzbegruenung/candymat#23
2021-01-30 21:49:24 +01:00
Christoph Lienhard a70dd7d6a5
#14 Add integration tests for answering questions 2021-01-30 18:15:51 +01:00
Christoph Lienhard 8afea80dd2
Add eslint to redaktionsapp 2021-01-30 16:12:10 +01:00
Christoph Lienhard 77ef07d9ff
Add prettier for redaktions-app 2021-01-09 12:49:28 +01:00
Christoph Lienhard 5e219089f6
#14 Implement possibility to answer questions for canditates 2021-01-05 18:28:24 +01:00
Christoph Lienhard 6ea057a1cf
Update candymat-user-app to latest develop version 2020-12-31 21:16:51 +01:00
Christoph Lienhard 16d8e527f7
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)
2020-12-31 21:13:23 +01:00
Christoph Lienhard 3490ca5a2c Merge pull request '#13 Show different main pages based on logged in user role' (#22) from feature/#13 into develop
Reviewed-on: Netzbegruenung/candymat#22
2020-12-31 13:16:47 +01:00
Christoph Lienhard 70df7c09e0
#13 Show different main pages based on logged in user role 2020-12-31 11:36:23 +01:00
Christoph Lienhard b3492174b5 Merge pull request 'feature/#11' (#19) from feature/#11 into develop
Reviewed-on: Netzbegruenung/candymat#19
2020-12-30 22:54:26 +01:00
Christoph Lienhard 0016e12acd
#11 Refactor: Disentangle QuestionList 2020-12-30 22:46:26 +01:00
Christoph Lienhard ff505226ab
#11 Refactor: Disentangle CategoryList 2020-12-30 22:21:29 +01:00
Christoph Lienhard 0170e850a8
#11 Refactor: Some renamings 2020-12-30 21:13:06 +01:00
Christoph Lienhard fc8bc6724b
#11 Refactor: Introduce apollo reactive variables for global state
Use it to streamline entangle the delete dialog(s) from the list(s)
2020-12-30 18:26:19 +01:00
Christoph Lienhard 42dc7f285d
#11 Add integration tests for displaying/deleting/editing and adding categories 2020-12-30 16:51:19 +01:00
Christoph Lienhard acbe0a453c
#11 Added integration tests for deleting and adding questions 2020-12-30 16:30:19 +01:00
Christoph Lienhard 4ed8927522
#11 Improve tests 2020-12-30 11:07:37 +01:00
Christoph Lienhard 587c0cdeba
#11 Add integration test for editing a question
Also:
* introduce __typename to all response types
2020-12-30 01:10:30 +01:00
Christoph Lienhard a07eb576eb
#11 Fix gql response types 2020-12-29 19:53:27 +01:00
Christoph Lienhard 101817276f
#11 Add create/edit/delete functionality for categories 2020-12-29 18:29:50 +01:00
Christoph Lienhard 9a1dc02a7f
#11 Finally align structure of question on category in db 2020-12-29 17:58:20 +01:00
Christoph Lienhard 3bb827b963
#11 Fix uncontrolled/controlled selection warning 2020-12-29 17:43:45 +01:00
Christoph Lienhard 825a7ae736
#11 Show line breaks properly in question/category description 2020-12-29 17:39:17 +01:00
Christoph Lienhard dd48494ca9
#11 Implement delete question 2020-12-29 17:26:52 +01:00
Christoph Lienhard 7370a7c493
#11 Implement AddQuestion
Also introduce notistack/snackbar to handle async error/success messages
2020-12-29 13:02:50 +01:00
Christoph Lienhard dd2f414f00
#11 backend: nodeId -> id and id -> rowId
To be more in sync with typical graphql servers.
2020-12-29 11:35:34 +01:00
Christoph Lienhard 96e78eb7f5
#11 Implement edit question 2020-12-29 01:02:57 +01:00
Christoph Lienhard b6358c357b
#11 Refactor queries and mutations
* Use more apollo naming convention
* Take care of possible null/undefined fields in responses
2020-12-28 21:22:32 +01:00
Christoph Lienhard 57c338b7ef
#11 Add ChangeCategoryDialog w/o logic
For this the ChangeQuestionDialog was refactored to reuse several sub-components
2020-12-28 20:13:57 +01:00
Christoph Lienhard ea21617cf8
#11 Add ChangeQuestionDialog w/o change functionality 2020-12-28 18:48:50 +01:00
Christoph Lienhard 524739cbbb
#11 Use nodeId (ID) instead of id (number) as identifier for apollo cache 2020-12-28 14:46:45 +01:00
Christoph Lienhard 8c450790c3
#11 Added Categories list to main page
For that the Question.tsx component was refactored to be reusable
for categories.
2020-12-28 13:47:30 +01:00
Christoph Lienhard ebb276696e
#11 Introduce husky and run all tests before each commit
Also: Fix integration tests ;-)
2020-12-28 13:25:18 +01:00
Christoph Lienhard c5e43a0bac
#11 Display list of questions 2020-12-28 13:15:24 +01:00
Christoph Lienhard 0fab3386bf
#11 Introduce question component 2020-12-28 12:50:26 +01:00
Christoph Lienhard 9cb707eede Merge pull request 'feature/#7' (#18) from feature/#7 into develop
Reviewed-on: Netzbegruenung/candymat#18
2020-12-27 22:17:52 +01:00
Christoph Lienhard 1dc967e23a
#7 Improve success/error messages in sign-up/in process
* Successful sign-up now redirects to sign-in and displays a success message on that page
* All messages, error or success, are now mui Alerts, which looks much nicer.
2020-12-27 22:12:16 +01:00
Christoph Lienhard 206a28d3b9
#7 Deal with render inside render error on sign-in 2020-12-27 21:18:41 +01:00
Christoph Lienhard 2979f1b1af
#7 Introduce proper error handling on sign-up 2020-12-27 21:18:15 +01:00
Christoph Lienhard b6f6adac22
#7 Disable empty First- and Last Names as well as empty Passwords on Sign-Up 2020-12-27 21:18:15 +01:00
Christoph Lienhard 103a137a62
#7 Add integration tests for basic client routing 2020-12-27 21:18:14 +01:00
Christoph Lienhard 331e511368
#7 Add integration tests for sign-in process
Missing in this commit:
* take care of router stuff
2020-12-27 21:18:14 +01:00
Christoph Lienhard 6f277ef21f
#7 Make graphql calls more type-safe 2020-12-27 21:18:13 +01:00
Christoph Lienhard 88a4263b82
#7 Move typescript stuff to devDependencies
use latest version of typescript but at least 3.8
2020-12-27 21:18:13 +01:00
Christoph Lienhard f25df13b26
#7 Actually register person in the backend on sign up 2020-12-27 21:18:12 +01:00
Christoph Lienhard ba4a18e52d
#7 Added SignUp component and setup routes
Also:
* Commented out password forgot stuff and referenced to #17
2020-12-27 21:18:12 +01:00
Christoph Lienhard 720d8b5eed
#7 Introduce react-router 2020-08-23 18:37:08 +02:00
Christoph Lienhard d9471d7842
Fix issue with redaktions app immediately closing down in docker-compose setup
See https://github.com/facebook/create-react-app/issues/8688#issuecomment-602110747
2020-08-23 18:36:08 +02:00