3 Commits

Author SHA1 Message Date
580b24bbed Merge pull request 'develop' (#3) from develop into main
All checks were successful
Ruby on Rails Test / rails-test (push) Successful in 1m43s
Reviewed-on: #3
2025-09-16 14:34:28 +00:00
a8d3bc12ae Merge pull request 'feat/free-ticket' (#2) from feat/free-ticket into develop
All checks were successful
Ruby on Rails Test / rails-test (push) Successful in 1m56s
Reviewed-on: #2
2025-09-16 14:31:43 +00:00
kbe
b228d5a174 chore: Breadcrumb on ticket edit page 2025-09-16 16:22:09 +02:00
6 changed files with 67 additions and 62 deletions

View File

@@ -107,22 +107,6 @@
<div class="w-5 h-5 border-2 border-purple-200 border-t-purple-600 rounded-full animate-spin"></div> <div class="w-5 h-5 border-2 border-purple-200 border-t-purple-600 rounded-full animate-spin"></div>
</div> </div>
</div> </div>
<!-- Location Actions -->
<div class="flex flex-wrap gap-2">
<button type="button" data-action="click->event-form#getCurrentLocation" data-event-form-target="getCurrentLocationBtn" class="inline-flex items-center px-3 py-2 text-xs font-medium text-white bg-green-600 rounded-lg hover:bg-green-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed">
<span data-event-form-target="getCurrentLocationIcon">
<i data-lucide="map-pin" class="w-3 h-3 mr-1"></i>
</span>
<span data-event-form-target="getCurrentLocationText">Ma position</span>
</button>
<button type="button" data-action="click->event-form#previewLocation" data-event-form-target="previewLocationBtn" class="inline-flex items-center px-3 py-2 text-xs font-medium text-purple-700 bg-purple-50 border border-purple-200 rounded-lg hover:bg-purple-100 transition-colors disabled:opacity-50 disabled:cursor-not-allowed">
<span data-event-form-target="previewLocationIcon">
<i data-lucide="map" class="w-3 h-3 mr-1"></i>
</span>
<span data-event-form-target="previewLocationText">Prévisualiser</span>
</button>
</div>
</div> </div>
<p class="mt-2 text-sm text-gray-500"> <p class="mt-2 text-sm text-gray-500">
@@ -144,11 +128,24 @@
<div class="bg-white rounded-lg border border-gray-200 p-6"> <div class="bg-white rounded-lg border border-gray-200 p-6">
<h3 class="text-lg font-semibold text-gray-900 mb-6">Options</h3> <h3 class="text-lg font-semibold text-gray-900 mb-6">Options</h3>
<div class="space-y-4">
<div class="flex items-center"> <div class="flex items-center">
<%= form.check_box :featured, class: "h-4 w-4 text-purple-600 border-gray-300 rounded focus:ring-purple-500" %> <%= form.check_box :featured, class: "h-4 w-4 text-purple-600 border-gray-300 rounded focus:ring-purple-500" %>
<%= form.label :featured, "Mettre en avant sur la page d'accueil", class: "ml-2 text-sm text-gray-700" %> <%= form.label :featured, "Mettre en avant sur la page d'accueil", class: "ml-2 text-sm text-gray-700" %>
</div> </div>
<p class="mt-2 text-sm text-gray-500">Les événements mis en avant apparaissent en premier sur la page d'accueil.</p> <p class="text-sm text-gray-500">Les événements mis en avant apparaissent en premier sur la page d'accueil.</p>
<div class="flex items-start">
<%= form.check_box :allow_booking_during_event, class: "h-4 w-4 text-purple-600 border-gray-300 rounded focus:ring-purple-500 mt-1" %>
<div class="ml-2">
<%= form.label :allow_booking_during_event, "Autoriser la réservation pendant l'événement", class: "text-sm text-gray-700 font-medium" %>
<p class="text-sm text-gray-500 mt-1">
Si activé, les participants pourront acheter des billets même après le début de l'événement.
Si désactivé, la vente de billets s'arrêtera automatiquement à l'heure de début.
</p>
</div>
</div>
</div>
</div> </div>
<!-- Actions --> <!-- Actions -->
@@ -166,4 +163,3 @@
<% end %> <% end %>
</div> </div>
</div> </div>

View File

@@ -113,7 +113,7 @@
</div> </div>
<div class="flex-shrink-0"> <div class="flex-shrink-0">
<%= link_to event_path(@event.slug, @event), target: "_blank", class: "text-green-600 hover:text-green-800 font-medium text-sm whitespace-nowrap" do %> <%= link_to event_path(@event.slug, @event), target: "_blank", class: "text-green-600 hover:text-green-800 font-medium text-sm whitespace-nowrap" do %>
Voir publiquement <i data-lucide="external-link" class="w-4 h-4 inline ml-1"></i> Voir la fiche publique <i data-lucide="external-link" class="w-4 h-4 inline ml-1"></i>
<% end %> <% end %>
</div> </div>
</div> </div>

View File

@@ -1,6 +1,15 @@
<% content_for(:title, "#{@ticket_type.name} - #{@event.name}") %> <% content_for(:title, "#{@ticket_type.name} - #{@event.name}") %>
<div class="container py-8"> <div class="max-w-6xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
<!-- Breadcrumb -->
<%= render 'components/breadcrumb', crumbs: [
{ name: 'Dashboard', path: dashboard_path },
{ name: 'Événements', path: promoter_events_path },
{ name: @event.name, path: promoter_event_path(@event) },
{ name: 'Types de billets', path: promoter_event_ticket_types_path(@event) },
{ name: @ticket_type.name, path: nil }
] %>
<!-- Header with actions --> <!-- Header with actions -->
<div class="mb-8"> <div class="mb-8">
<div class="flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4"> <div class="flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4">

View File

@@ -55,7 +55,7 @@ class Promoter::EventsControllerTest < ActionDispatch::IntegrationTest
assert ticket_type2.valid? assert ticket_type2.valid?
# Duplicate the event # Duplicate the event
assert_difference('Event.count', 1) do assert_difference("Event.count", 1) do
post duplicate_promoter_event_path(@event), params: { clone_ticket_types: "true" } post duplicate_promoter_event_path(@event), params: { clone_ticket_types: "true" }
end end
@@ -105,7 +105,7 @@ class Promoter::EventsControllerTest < ActionDispatch::IntegrationTest
assert ticket_type2.valid? assert ticket_type2.valid?
# Duplicate the event without ticket types # Duplicate the event without ticket types
assert_difference('Event.count', 1) do assert_difference("Event.count", 1) do
post duplicate_promoter_event_path(@event), params: { clone_ticket_types: "false" } post duplicate_promoter_event_path(@event), params: { clone_ticket_types: "false" }
end end