From 49b7c0f5d50f98b64cdbcf88cc9ef628d60d6da5 Mon Sep 17 00:00:00 2001 From: Marijn Doeve Date: Mon, 28 Apr 2025 08:01:27 +0200 Subject: [PATCH] Add Sheet upload function --- .idea/TijdVoorDeTest.iml | 6 + .idea/inspectionProfiles/Project_Default.xml | 58 ++ .idea/php.xml | 18 +- Dockerfile | 1 + Justfile | 2 + composer.json | 1 + composer.lock | 554 +++++++++++++++--- migrations/Version20250427174822.php | 41 ++ rector.php | 2 + src/Controller/BackofficeController.php | 91 ++- src/DataFixtures/KrtekFixtures.php | 30 + src/Entity/Answer.php | 16 + src/Entity/Question.php | 19 +- src/Entity/Quiz.php | 1 + src/Entity/Season.php | 16 + src/Exception/SpreadsheetDataException.php | 18 + src/Exception/SpreadsheetException.php | 7 + src/Form/CreateSeasonFormType.php | 34 ++ src/Form/UploadQuizFormType.php | 50 ++ src/Resource/Quiz.php | 42 -- src/Service/QuizSpreadsheetService.php | 123 ++++ templates/backoffice/index.html.twig | 11 +- templates/backoffice/nav.html.twig | 4 + templates/backoffice/quiz_add.html.twig | 25 + templates/backoffice/season.html.twig | 13 +- templates/backoffice/season_add.html.twig | 22 + .../season_add_candidates.html.twig | 22 + translations/messages+intl-icu.nl.yaml | 10 + translations/validators.nl.yaml | 4 + 29 files changed, 1106 insertions(+), 135 deletions(-) create mode 100644 migrations/Version20250427174822.php create mode 100644 src/Exception/SpreadsheetDataException.php create mode 100644 src/Exception/SpreadsheetException.php create mode 100644 src/Form/CreateSeasonFormType.php create mode 100644 src/Form/UploadQuizFormType.php delete mode 100644 src/Resource/Quiz.php create mode 100644 src/Service/QuizSpreadsheetService.php create mode 100644 templates/backoffice/quiz_add.html.twig create mode 100644 templates/backoffice/season_add.html.twig create mode 100644 templates/backoffice/season_add_candidates.html.twig create mode 100644 translations/validators.nl.yaml diff --git a/.idea/TijdVoorDeTest.iml b/.idea/TijdVoorDeTest.iml index cd08072..3d04ddc 100644 --- a/.idea/TijdVoorDeTest.iml +++ b/.idea/TijdVoorDeTest.iml @@ -153,6 +153,12 @@ + + + + + + diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml index 332b63f..5b777b1 100644 --- a/.idea/inspectionProfiles/Project_Default.xml +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -70,6 +70,64 @@