Browse Source

corrections suite à demande CabBD

garthh 3 weeks ago
parent
commit
da7b2815f7

+ 0 - 1
src/Controller/ProfileController.php

@@ -205,7 +205,6 @@ final class ProfileController extends AbstractController
         // Retrouver le mail de l'utilisateur
         $email = $user->getEmail();
         $participations = $repository->findAllByEmail($email);
-        dump($participations);
         
         return $this->render('profile/participations.html.twig', [
             'participations' => $participations,

+ 3 - 2
templates/components/Planning.html.twig

@@ -77,8 +77,9 @@
 
                                                 </div>
                                                 <div class="card-content">
-                                                    <p>Places : {{ thisSlot.party.getSeatsLeft }} / {{ thisSlot.party.getMaxParticipants }}</p>
-                                                    {% if thisSlot.party.gamemasterIsAuthor %}<p><span class="tag is-warning">partie animée par l'auteur</span></p>{% endif %}
+                                                    <p><span class="tag is-dark m-1">Places : {{ thisSlot.party.getSeatsLeft }}/{{ thisSlot.party.getMaxParticipants }}</span></p>
+                                                    {% if thisSlot.party.gamemasterIsAuthor %}<p><span class="tag is-warning m-1">partie animée par l'auteur</span></p>{% endif %}
+                                                    <p>{% for genre in thisSlot.party.game.genre %}<span class="tag is-info m-1">{{ genre.genre }}</span>{% endfor %}</p>
                                                     
                                                 </div>
 

+ 5 - 1
templates/manage/list.html.twig

@@ -101,7 +101,11 @@
                         <button class="button is-primary" disabled>Inscrire</button>
                       {% endif %}
                       <a href="{{ path('app_party_modify', {id: party.slots.first.id}) }}" class="button is-primary open-modal">Éditer</a>
-                      <a href="{{ path('app_checkin_party', {id: party.id}) }}" class="button open-modal">Checkins</a> 
+                      {% if party.getSeatsOccuped > 0 %}
+                        <a href="{{ path('app_checkin_party', {id: party.id}) }}" class="button open-modal">Checkins</a> 
+                      {% else %}
+                        <button class="button" disabled>Checkins</button>
+                      {% endif %}
                     </td>
                 </tr>
             {% endfor %}

+ 4 - 0
templates/profile/gamemastering.html.twig

@@ -42,7 +42,11 @@
                     <td>{{ participation.startOn|date('d/m/y H:i', app_timezone) }}</td>
                     <td>{{ participation.getSeatsOccuped }} / {{ participation.getMaxParticipants }}</td>
                     <td>
+                        {% if participation.getSeatsOccuped > 0 %}
                       <a href="{{ path('app_checkin_party', {id: participation.id}) }}" class="button open-modal">Checkins</a> 
+                    {% else %}
+                        <button class="button" disabled>Checkins</button>
+                      {% endif %}
                     </td>
                 </tr>
             {% endfor %}

+ 3 - 1
templates/profile/participations.html.twig

@@ -28,6 +28,7 @@
                 <th>Événement</th>
                 <th>Participant</th>
                 <th>Partie</th>
+                <th>Meneur(euse)</th>
                 <th>Date et heure</th>
                 <th>Action</th>
             </tr>
@@ -38,7 +39,8 @@
                     <th>{{ participation.party.event.name }}</th>
                     <td>{{ participation.participantName }}</td>
                     <td>{{ participation.party.game.name }}</td>
-                    <td>{{ participation.party.startOn|date('d/m/y H:i', app_timezone) }}</td>
+                    <td>{{ participation.party.gamemaster.preferedName }}</td>
+                    <td>{{ participation.party.startOn|date('d/m/y \\à H:i', app_timezone) }}</td>
                     <td>
                     {% if participation.checkin %}
                       <button class="button-danger" disabled>Annuler</button>