Browse Source

modificationb de la vue event

Vincent 2 months ago
parent
commit
86b3ed28ba

+ 2 - 2
sql/schema-extensions/001-view_public_events.sql

@@ -6,7 +6,7 @@ CREATE OR REPLACE VIEW view_public_events AS
         b.name,
         b.description,
         b.url,
-        b.helloAssoSlug,
+        IF(b.helloAssoSlug is not null, 1, 0) AS hasHelloAssoForm,
         b.datetimeStart,
         b.datetimeEnd,
         b.gender_id as gender,
@@ -61,7 +61,7 @@ CREATE OR REPLACE VIEW view_public_events AS
         aw.name,
         aw.description,
         aw.deepLink AS url,
-        NULL AS helloAssoSlug,
+        0 AS hasHelloAssoForm,
         aw.datetimeStart,
         aw.datetimeEnd,
         NULL as gender,

+ 5 - 5
src/Entity/Public/PublicEvent.php

@@ -65,7 +65,7 @@ class PublicEvent
     private ?string $url;
 
     #[ORM\Column(nullable: true)]
-    private ?string $helloAssoSlug;
+    private ?bool $hasHelloAssoForm;
 
     #[ORM\Column(type: 'datetime')]
     private \DateTime $datetimeStart;
@@ -202,14 +202,14 @@ class PublicEvent
         return $this;
     }
 
-    public function getHelloAssoSlug(): ?string
+    public function getHasHelloAssoForm(): ?string
     {
-        return $this->helloAssoSlug;
+        return $this->hasHelloAssoForm;
     }
 
-    public function setHelloAssoSlug(?string $helloAssoSlug): PublicEvent
+    public function setHasHelloAssoForm(?bool $hasHelloAssoForm): PublicEvent
     {
-        $this->helloAssoSlug = $helloAssoSlug;
+        $this->hasHelloAssoForm = $hasHelloAssoForm;
 
         return $this;
     }