- Restructure header layout with separated title and action buttons
- Make all action buttons full-width on mobile (w-full sm:w-auto)
- Add responsive text sizing and proper truncation for long titles
- Improve status banners with flexible layouts for mobile
- Enhance content cards with responsive padding (p-4 sm:p-6)
- Add better text wrapping and overflow handling throughout
- Optimize sidebar with responsive font sizes and spacing
- Ensure consistent touch targets and button accessibility
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add responsive header with stacked layout on mobile
- Implement dual layout system: table for desktop, cards for mobile
- Make all action buttons full-width and accessible on mobile
- Add proper spacing and touch targets for mobile UX
- Ensure "Créer un événement" button is full-width on mobile
- Improve empty state responsiveness
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add allow_booking_during_event boolean field to events (defaults to false)
- Implement booking_allowed? method to check if tickets can be purchased
- Add event_started? and event_ended? helper methods
- Include new option in event edit form with clear explanation
- Display booking policy status on event show page
- Add visual indicator when booking is disabled during ongoing events
- Update controller to permit new parameter
This allows promoters to control whether attendees can purchase tickets
after an event has started, providing flexibility for different event types.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Ruby on Rails Test / rails-test (push) Has been cancelled
- Add prominent warning banner on event show page for draft events with no ticket types
- Disable publish button when no ticket types are configured
- Include helpful tooltip and direct link to configure ticket types
- Improve UX by preventing invalid publish attempts
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add multi-strategy geocoding fallback system for better address resolution
- Implement loading spinners and visual feedback for all geocoding operations
- Move geocoding messages to venue section for better visibility
- Add dynamic message template system with proper styling
- Optimize backend to trust frontend coordinates and reduce API calls
- Add rate limiting and proper User-Agent headers for Nominatim compliance
- Improve error handling and user feedback throughout geocoding flow
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
This implementation provides automatic geocoding and map integration:
- **Event Model Enhancements:**
- Automatic geocoding callback using OpenStreetMap Nominatim API
- 3-tier fallback system: exact coordinates → city-based → country default
- Fallback coordinates for major French cities (Paris, Lyon, Marseille, etc.)
- Robust error handling that prevents event creation failures
- **User-Friendly Event Forms:**
- Address-first approach - users just enter addresses
- Hidden coordinate fields (auto-generated behind scenes)
- Real-time geocoding with 1.5s debounce
- "Ma position" button for current location with reverse geocoding
- "Prévisualiser" button to show map links
- Smart feedback system (loading, success, warnings, errors)
- **Enhanced Event Show Page:**
- Map provider links (OpenStreetMap, Google Maps, Apple Plans)
- Warning badges when approximate coordinates are used
- Address-based URLs for better map integration
- **Comprehensive JavaScript Controller:**
- Debounced auto-geocoding to minimize API calls
- Multiple geocoding strategies (manual vs automatic)
- Promise-based geolocation with proper error handling
- Dynamic map link generation with address + coordinates
- **Failure Handling:**
- Events never fail to save due to missing coordinates
- Fallback to city-based coordinates when exact geocoding fails
- User-friendly warnings when approximate locations are used
- Maintains existing coordinates on update failures
🤖 Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
Enhanced TicketType model with helper methods and better validations
So the full context is:
## Backend Implementation
- Enhanced TicketType model with helper methods and better validations
- New Promoter::TicketTypesController with full authorization
- Sales status tracking (draft, available, upcoming, expired, sold_out)
- New Promoter::TicketTypesController with full authorization
- Safe calculation methods preventing nil value errors
- Sales status tracking (draft, available, upcoming, expired, sold_out)
## Frontend Features
- Modern responsive UI with Tailwind CSS styling
- Interactive forms with Stimulus controller for dynamic calculations
- Revenue calculators showing potential, current, and remaining revenue
- Status indicators with appropriate colors and icons
- Buyer analytics and purchase history display
## JavaScript Enhancements
- New TicketTypeFormController for dynamic pricing calculations
- Real-time total updates as users type price/quantity
- Proper French currency formatting
- Form validation for minimum quantities based on existing sales
## Bug Fixes
Fixed nil value errors in price_euros method when price_cents is nil
Added defensive programming for all calculation methods
Graceful handling of incomplete ticket types during creation
Proper default values for new ticket type instances
## Files Added/Modified
- app/controllers/promoter/ticket_types_controller.rb (new)
- app/javascript/controllers/ticket_type_form_controller.js (new)
- app/views/promoter/ticket_types/*.html.erb (4 new view files)
- app/models/ticket_type.rb (enhanced with helper methods)
- config/routes.rb (added nested ticket_types routes)
- db/migrate/*_add_requires_id_to_ticket_types.rb (new migration)
## Integration
- Seamless integration with existing event management system
- Updated promoter event show page with ticket management link
- Proper scoping ensuring promoters only manage their own tickets
- Compatible with existing ticket purchasing and checkout flow
This commit adds a complete event management interface allowing promoters to
create, edit, and manage their events with full CRUD operations.
## Backend Features
- New Promoter::EventsController with full CRUD operations
- Event state management (draft, published, canceled, sold_out)
- User authorization system with can_manage_events? method
- Proper scoping to ensure users only see their own events
## Frontend Features
- Modern responsive UI with Tailwind CSS styling
- Event listing with status indicators and quick actions
- Comprehensive event creation and editing forms
- Detailed event show page with metrics and management options
- Integration with main dashboard via promoter action buttons
## JavaScript Improvements
- Refactored inline JavaScript to dedicated Stimulus controller
- Auto-slug generation from event names with proper sanitization
- Improved code organization following Rails conventions
## Routes & Navigation
- Namespaced promoter routes under /promoter/
- RESTful endpoints with state management actions
- Proper breadcrumb navigation and user flow
## Files Added/Modified
- app/controllers/promoter/events_controller.rb (new)
- app/javascript/controllers/event_form_controller.js (new)
- app/views/promoter/events/*.html.erb (4 new view files)
- app/models/user.rb (added authorization methods)
- app/views/pages/dashboard.html.erb (added promoter buttons)
- config/routes.rb (added promoter namespace)
- app/javascript/controllers/index.js (registered new controller)
🎯 Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>