Commit Graph

240 Commits

Author SHA1 Message Date
kbe
58141dca94 fix(event model): duplicate payout status enum removed 2025-09-17 00:08:14 +02:00
kbe
d2c43cfc2f fix: clean up payout migrations, remove ghosts, add defaults and indexes 2025-09-17 00:02:59 +02:00
kbe
bc09feafc1 feat: complete promoter payout system with Stripe Connect onboarding 2025-09-16 23:53:04 +02:00
kbe
d922d7304d feat: add promoter payouts controller and routes 2025-09-16 23:52:49 +02:00
kbe
0399761fb3 feat: implement payout system database schema and models 2025-09-16 23:52:26 +02:00
kbe
e5ed1a34dd refactor: migrate payment success views to orders system and add promoter seed data
All checks were successful
Ruby on Rails Test / rails-test (push) Successful in 1m48s
2025-09-16 21:32:42 +02:00
3e0a354a58 Merge pull request 'feat/free-ticket' (#4) from feat/free-ticket into develop
All checks were successful
Ruby on Rails Test / rails-test (push) Successful in 1m31s
Reviewed-on: #4
2025-09-16 15:27:51 +00:00
kbe
b5c1846f2c fix(mailers): Include TicketsHelper in TicketMailer to make format_ticket_price available
- Add helper :tickets to TicketMailer to make format_ticket_price method available in mailer templates
- Fixes undefined method 'format_ticket_price' error in purchase confirmation emails
- Required after recent changes to support free tickets
2025-09-16 17:25:14 +02:00
kbe
04393add14 fix(tests): Remove service fee expectation from Stripe invoice test and fix duplicated keys in event view
- Update StripeInvoiceServiceTest to match the implementation that no longer adds service fees to customer invoices
- Remove duplicated Stimulus data attributes in events/show.html.erb that were causing warnings
- Align tests with the hybrid fee model where fees are deducted from promoter payouts
2025-09-16 17:22:00 +02:00
kbe
5279ebe1a4 feat(event available/sold out): Promoter can mark event as sold out or available
On the event page, promoter can choose to mark the event as "sold out" using the status field or as "published". Only published event can be marked as sold out if promoter thinks he cannot handle all the people available.
2025-09-16 17:15:09 +02:00
kbe
329ba89eaa chore: Better description details for ticket types 2025-09-16 17:00:04 +02:00
kbe
9c56b2e1e5 refactor: prepare for free ticket 2025-09-16 16:36:39 +02: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
kbe
61ad8c64d4 Fix modal overlay issue and improve modal structure
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2025-09-16 08:44:21 +02:00
kbe
4e06f91acb Fix modal positioning and improve Stimulus controller
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2025-09-16 08:43:00 +02:00
kbe
28eddb22ab Refactor duplication feature to use Stimulus controller and fix modal issues
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2025-09-15 21:23:29 +02:00
kbe
a34eb7aa38 Add duplication options with JavaScript modal and conditional ticket type cloning
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2025-09-15 21:20:22 +02:00
kbe
aa68885b84 Add event duplication feature with ticket types cloning
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2025-09-15 21:17:24 +02:00
kbe
c1dde7914c refactor: remove 1€ fees on payment 2025-09-15 21:09:57 +02:00
kbe
dbb972e490 feat: Add countdown when order expire in less than 5 minutes 2025-09-15 21:09:19 +02:00
kbe
049e5505ef refactor(pricing): implement hybrid fee model (€0.50 + 1.5%) deducted from promoter payout
- Remove 1€ fixed fee from orders and Stripe invoices
- Add platform_fee_cents, promoter_payout_cents methods to Order model
- Update views to show clean ticket totals without added fees
- Update tests for new fee calculation logic
- Update pricing docs with implemented model
2025-09-15 20:07:51 +02:00
kbe
d6184b6c84 refactor: extract cart storage to dedicated API controller with dynamic frontend URLs
All checks were successful
Ruby on Rails Test / rails-test (push) Successful in 1m7s
- Added dedicated CartsController for session-based cart storage
- Refactored routes to use POST /api/v1/carts/store
- Updated ticket selection JS to use dynamic data attributes for URLs
- Fixed CSRF protection in API and checkout payment increment
- Made checkout button URLs dynamic via data attributes
- Updated tests for new cart storage endpoint
- Removed obsolete store_cart from EventsController
2025-09-15 19:52:01 +02:00
kbe
4cde466f9a Add comprehensive unit test coverage for controllers, models, and services
- Translate French comments to English in controllers and tests
- Fix test failures: route helpers, validations, MySQL transaction issues
- Add Timecop for time-dependent tests and update database config for isolation
2025-09-15 19:27:06 +02:00
kbe
ee43996a77 feat(book after start): prepare to rework event to allow ticket sell
after start
2025-09-15 19:07:19 +02:00
kbe
f0d32bf3f1 Improve mobile responsiveness 2025-09-15 19:06:15 +02:00
kbe
20f926cd7a Move `allow_booking_during_event` into base migration 2025-09-15 19:06:05 +02:00
kbe
d1ef962f74 feat: Improve mobile responsiveness for promoter event detail page
- 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>
2025-09-15 18:23:45 +02:00
kbe
e84d9aad5b feat: Improve mobile responsiveness for promoter events page
- 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>
2025-09-15 18:08:05 +02:00
kbe
24126eb834 style: lint code
All checks were successful
Ruby on Rails Test / rails-test (push) Successful in 1m55s
2025-09-15 17:41:35 +02:00
kbe
9a1976b6af Add breadcrumb to settings page 2025-09-15 17:41:23 +02:00
kbe
a8c7e82507 Merge branch 'feat/promoters' into develop
All checks were successful
Ruby on Rails Test / rails-test (push) Successful in 2m19s
2025-09-15 17:21:03 +02:00
kbe
889afd0d01 Change available tickets details 2025-09-15 17:18:14 +02:00
kbe
82f0fab1f5 Disable authentication for API
Some checks failed
Ruby on Rails Test / rails-test (push) Has been cancelled
2025-09-15 17:15:49 +02:00
kbe
91e6425c1e feat: Settings page to update profile 2025-09-11 16:07:25 +02:00
kbe
f54742b041 feat: Add booking control during events
- 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>
2025-09-11 08:49:01 +02:00
kbe
21919c813e Merge branch 'develop' into feat/promoters 2025-09-11 08:41:23 +02:00
kbe
8ecfc7bf99 feat: Display error message when event does not have any ticket type
Some checks failed
Ruby on Rails Test / rails-test (push) Failing after 2m18s
2025-09-11 08:35:54 +02:00
kbe
28ef801c9a feat: Add warning for publishing events without ticket types
Some checks failed
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>
2025-09-11 08:35:05 +02:00
kbe
55b39e93bf enhance: Implement dynamic message template system with progress tracking
Some checks failed
Ruby on Rails Test / rails-test (push) Failing after 13m31s
- Add comprehensive message template system with 5 distinct message types
- Implement progress tracking for multi-strategy geocoding attempts
- Add dismissible messages with auto-timeout functionality
- Enhance visual design with proper spacing, shadows, and animations
- Add specialized geocoding success messages with location details
- Improve user experience with contextual progress indicators
- Support HTML content in messages for better formatting

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-10 22:01:26 +02:00
kbe
9bebdef5a5 feat: Implement comprehensive geocoding improvements with loading indicators
- 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>
2025-09-10 21:24:28 +02:00
kbe
d5c0276fcc chore: Code lint 2025-09-10 20:51:17 +02:00
kbe
10c93fff2f feat: Implement the promoter event creation
Some checks failed
Ruby on Rails Test / rails-test (push) Failing after 1m50s
- Promoter can now create an event in draft mode
- Place is found based on address and long/lat are automatically
  deducted from it
- Slug is forged using the *slug* npm package instead of custom code
2025-09-10 20:49:06 +02:00
kbe
332827c6da feat: Add comprehensive address-first geolocation system for events
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>
2025-09-10 20:49:06 +02:00
kbe
46d042b85e feat: Implement comprehensive promoter system with dashboard and role-based access
This commit implements a complete promoter system that allows professional users
(is_professionnal: true) to manage events with advanced analytics and controls.

## Key Features Added:

### Role-Based Access Control
- Update User#can_manage_events? to use is_professionnal field
- Add promoter? alias method for semantic clarity
- Restrict event management to professional users only

### Enhanced Navigation
- Add conditional "Créer un événement" and "Mes événements" links
- Display promoter navigation only for professional users
- Include responsive mobile navigation with appropriate icons
- Maintain clean UI for regular users

### Comprehensive Promoter Dashboard
- Revenue metrics with total earnings calculation
- Tickets sold counter across all events
- Published vs draft events statistics
- Monthly revenue trend chart (6 months)
- Recent events widget with quick management actions
- Recent orders table with customer information

### Advanced Analytics
- Real-time revenue calculations from order data
- Monthly revenue trends with visual progress bars
- Event performance metrics and status tracking
- Customer order history and transaction details

### Event Management Workflow
- Verified existing event CRUD operations are comprehensive
- Maintains easy-to-use interface for event creation/editing
- State management system (draft → published → cancelled)
- Quick action buttons for common operations

### Documentation
- Comprehensive implementation guide in docs/
- Technical details and architecture explanations
- Future enhancement recommendations
- Testing and deployment considerations

## Technical Implementation:

- Optimized database queries to prevent N+1 problems
- Proper eager loading for dashboard performance
- Responsive design with Tailwind CSS components
- Clean separation of promoter vs regular user features
- Maintainable code structure following Rails conventions

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-10 20:49:06 +02:00
kbe
48ec78197b Move increment_payment_attempt to API namespace and update JavaScript
- Add API route for increment_payment_attempt in config/routes.rb
- Update API OrdersController to handle increment_payment_attempt and skip API key authentication
- Update JavaScript code in checkout view to use API endpoint without CSRF tokens
- Remove CSRF token from API requests as it's not required for API endpoints
- Maintain backward compatibility by keeping original method in OrdersController
2025-09-10 20:49:06 +02:00
kbe
31009560c2 Link to homepage on and more comments in controller 2025-09-10 20:49:06 +02:00
kbe
16c277d0a9 chore: Remove links to non working themes 2025-09-10 20:49:06 +02:00
kbe
6951efdc85 feat: Update from breadcrumb on the current page 2025-09-10 20:49:06 +02:00
kbe
d1fb766fef feat: Use invoice emitter details from env var 2025-09-10 20:49:06 +02:00