From 03e01c5b58e5c36a95662381641166c1a6d1778b Mon Sep 17 00:00:00 2001
From: Jerlio <43434126+jerlio@users.noreply.github.com>
Date: Thu, 4 Jul 2024 12:51:23 +0200
Subject: [PATCH] QR Code Sponsor : nouvelle page et ajout d'un scan par form
(#1492)
---
app/Resources/translations/messages.en.yml | 11 +-
.../views/event/sponsor/base.html.twig | 7 +
.../views/event/sponsor/scan.html.twig | 29 ++++
.../views/event/sponsor/scan_new.html.twig | 9 ++
.../views/event/ticket/sponsor.html.twig | 7 +
app/config/routing/event.yml | 12 ++
db/migrations/20240422143329_qr_code.php | 28 ++++
htdocs/css/sponsor_scan.css | 8 ++
.../Controller/SponsorScanController.php | 134 ++++++++++++++++++
.../AppBundle/Event/Form/SponsorScanType.php | 28 ++++
.../Repository/SponsorScanRepository.php | 77 ++++++++++
.../Model/Repository/TicketRepository.php | 5 +
sources/AppBundle/Event/Model/SponsorScan.php | 133 +++++++++++++++++
sources/AppBundle/Event/Model/Ticket.php | 25 ++++
14 files changed, 512 insertions(+), 1 deletion(-)
create mode 100644 app/Resources/views/event/sponsor/base.html.twig
create mode 100644 app/Resources/views/event/sponsor/scan.html.twig
create mode 100644 app/Resources/views/event/sponsor/scan_new.html.twig
create mode 100644 db/migrations/20240422143329_qr_code.php
create mode 100644 htdocs/css/sponsor_scan.css
create mode 100644 sources/AppBundle/Controller/SponsorScanController.php
create mode 100644 sources/AppBundle/Event/Form/SponsorScanType.php
create mode 100644 sources/AppBundle/Event/Model/Repository/SponsorScanRepository.php
create mode 100644 sources/AppBundle/Event/Model/SponsorScan.php
diff --git a/app/Resources/translations/messages.en.yml b/app/Resources/translations/messages.en.yml
index 9c8a55591..e0ad97c5a 100644
--- a/app/Resources/translations/messages.en.yml
+++ b/app/Resources/translations/messages.en.yml
@@ -172,4 +172,13 @@ speaker_from_previous_event: "We filled the form with the profile you used on a
"Personne référente": "Liaison"
"sera votre personne de contact privilégiée dans les semaines menant à l’évènement tout comme durant l’évènement. N’hésitez pas à prendre contact pour toutes questions relatives à votre venue.": "will be your main contact person in the weeks leading up to the event as well as during the event. Please do not hesitate to contact us if you have any question about your visit."
"Plusieurs évènements en ce moment !": "Several events at the moment!"
-"Évènements": "Events"
\ No newline at end of file
+"Évènements": "Events"
+"Espace sponsor": "Sponsor space"
+"Billetterie sponsors": "Sponsor tickets"
+"QR Codes": "QR Codes"
+"SCANNEUR DE QR CODES": "QR Codes Scanner"
+"Scanner un QR Code": "Scan a QR Code"
+"QR Codes scannés": "Scanned QR Codes"
+"Télécharger en CSV": "Download CSV"
+"Supprimer": "Delete"
+"Lancer l'outil de scan de QR Codes": "Run QR Code Scanner"
\ No newline at end of file
diff --git a/app/Resources/views/event/sponsor/base.html.twig b/app/Resources/views/event/sponsor/base.html.twig
new file mode 100644
index 000000000..b51c5cd6b
--- /dev/null
+++ b/app/Resources/views/event/sponsor/base.html.twig
@@ -0,0 +1,7 @@
+{% extends ':event:base.html.twig' %}
+
+{% block title %}{{ 'Espace sponsor'|trans }} - Afup{% endblock %}
+
+{% if menu is not defined %}
+ {% set menu = {'main': {'route' : 'sponsor_ticket_form', 'title': 'Billetterie sponsors'}} %}
+{% endif %}
diff --git a/app/Resources/views/event/sponsor/scan.html.twig b/app/Resources/views/event/sponsor/scan.html.twig
new file mode 100644
index 000000000..77a373078
--- /dev/null
+++ b/app/Resources/views/event/sponsor/scan.html.twig
@@ -0,0 +1,29 @@
+{% extends ':event/sponsor:base.html.twig' %}
+
+{% block stylesheets %}
+ {{ parent() }}
+
+{% endblock %}
+
+{% block content %}
+
+{% endblock %}
\ No newline at end of file
diff --git a/app/Resources/views/event/sponsor/scan_new.html.twig b/app/Resources/views/event/sponsor/scan_new.html.twig
new file mode 100644
index 000000000..0244d3320
--- /dev/null
+++ b/app/Resources/views/event/sponsor/scan_new.html.twig
@@ -0,0 +1,9 @@
+{% extends ':event/sponsor:base.html.twig' %}
+
+{% block content %}
+
+
+ {{ form(form) }}
+
+
+{% endblock %}
\ No newline at end of file
diff --git a/app/Resources/views/event/ticket/sponsor.html.twig b/app/Resources/views/event/ticket/sponsor.html.twig
index 3c1ac085c..7368490cf 100644
--- a/app/Resources/views/event/ticket/sponsor.html.twig
+++ b/app/Resources/views/event/ticket/sponsor.html.twig
@@ -10,6 +10,13 @@