Compare commits
3 Commits
ca35abe01d
...
60b7bc6aa7
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
60b7bc6aa7 | ||
|
|
8d2127fce2 | ||
|
|
2fb0e1fdbb |
10
.env.example
10
.env.example
@@ -30,6 +30,16 @@ SMTP_AUTHENTICATION=plain
|
|||||||
SMTP_ENABLE_STARTTLS=false
|
SMTP_ENABLE_STARTTLS=false
|
||||||
# SMTP_STARTTLS=true
|
# SMTP_STARTTLS=true
|
||||||
|
|
||||||
|
# Invoice Emitter Configuration
|
||||||
|
INVOICE_COMPANY_NAME=AperoNight
|
||||||
|
INVOICE_COMPANY_ADDRESS_LINE_1=123 Avenue des Événements
|
||||||
|
INVOICE_COMPANY_ADDRESS_LINE_2=75000 Paris, France
|
||||||
|
INVOICE_COMPANY_EMAIL=contact@apero-night.fr
|
||||||
|
INVOICE_COMPANY_PHONE=
|
||||||
|
INVOICE_COMPANY_WEBSITE=
|
||||||
|
INVOICE_COMPANY_VAT_NUMBER=
|
||||||
|
INVOICE_COMPANY_SIRET=
|
||||||
|
|
||||||
# Application variables
|
# Application variables
|
||||||
STRIPE_PUBLISHABLE_KEY=pk_test_51S1M7BJWx6G2LLIXYpTvi0hxMpZ4tZSxkmr2Wbp1dQ73MKNp4Tyu4xFJBqLXK5nn4E0nEf2tdgJqEwWZLosO3QGn00kMvjXWGW
|
STRIPE_PUBLISHABLE_KEY=pk_test_51S1M7BJWx6G2LLIXYpTvi0hxMpZ4tZSxkmr2Wbp1dQ73MKNp4Tyu4xFJBqLXK5nn4E0nEf2tdgJqEwWZLosO3QGn00kMvjXWGW
|
||||||
STRIPE_SECRET_KEY=sk_test_51S1M7BJWx6G2LLIXK2pdLpRKb9Mgd3sZ30N4ueVjHepgxQKbWgMVJoa4v4ESzHQ6u6zJjO4jUvgLYPU1QLyAiFTN00sGz2ortW
|
STRIPE_SECRET_KEY=sk_test_51S1M7BJWx6G2LLIXK2pdLpRKb9Mgd3sZ30N4ueVjHepgxQKbWgMVJoa4v4ESzHQ6u6zJjO4jUvgLYPU1QLyAiFTN00sGz2ortW
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
class OnboardingController < ApplicationController
|
class OnboardingController < ApplicationController
|
||||||
before_action :authenticate_user!
|
before_action :authenticate_user!
|
||||||
before_action :redirect_if_onboarding_complete, except: [:complete]
|
before_action :redirect_if_onboarding_complete, except: [ :complete ]
|
||||||
|
|
||||||
def index
|
def index
|
||||||
# Display the onboarding form
|
# Display the onboarding form
|
||||||
|
|||||||
@@ -19,9 +19,9 @@ class PagesController < ApplicationController
|
|||||||
@upcoming_events = Event.published.upcoming.limit(6)
|
@upcoming_events = Event.published.upcoming.limit(6)
|
||||||
|
|
||||||
# Site metrics for landing page (with realistic fake data for demo)
|
# Site metrics for landing page (with realistic fake data for demo)
|
||||||
@total_events = [Event.published.count, 50].max # At least 50 events for demo
|
@total_events = [ Event.published.count, 50 ].max # At least 50 events for demo
|
||||||
@total_users = [User.count, 2500].max # At least 2500 users for demo
|
@total_users = [ User.count, 2500 ].max # At least 2500 users for demo
|
||||||
@events_this_month = [Event.published.where(created_at: 1.month.ago..Time.current).count, 12].max # At least 12 this month
|
@events_this_month = [ Event.published.where(created_at: 1.month.ago..Time.current).count, 12 ].max # At least 12 this month
|
||||||
@active_cities = 5 # Fixed number for demo
|
@active_cities = 5 # Fixed number for demo
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ class StripeInvoiceService
|
|||||||
name: customer_name,
|
name: customer_name,
|
||||||
metadata: {
|
metadata: {
|
||||||
user_id: @order.user.id,
|
user_id: @order.user.id,
|
||||||
created_by: "aperonight_system"
|
created_by: "#{ENV.fetch('INVOICE_COMPANY_NAME', 'aperonight').downcase}_system"
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -133,7 +133,7 @@ class StripeInvoiceService
|
|||||||
order_id: @order.id,
|
order_id: @order.id,
|
||||||
user_id: @order.user.id,
|
user_id: @order.user.id,
|
||||||
event_name: @order.event.name,
|
event_name: @order.event.name,
|
||||||
created_by: "aperonight_system",
|
created_by: "#{ENV.fetch('INVOICE_COMPANY_NAME', 'aperonight').downcase}_system",
|
||||||
payment_method: "checkout_session"
|
payment_method: "checkout_session"
|
||||||
},
|
},
|
||||||
description: "Invoice for #{@order.event.name} - Order ##{@order.id}",
|
description: "Invoice for #{@order.event.name} - Order ##{@order.id}",
|
||||||
|
|||||||
@@ -31,11 +31,26 @@
|
|||||||
<div>
|
<div>
|
||||||
<h3 class="text-lg font-semibold text-gray-900 mb-3">Émis par</h3>
|
<h3 class="text-lg font-semibold text-gray-900 mb-3">Émis par</h3>
|
||||||
<div class="bg-purple-50 rounded-lg p-4 border border-purple-200">
|
<div class="bg-purple-50 rounded-lg p-4 border border-purple-200">
|
||||||
<h4 class="font-semibold text-purple-900">AperoNight</h4>
|
<h4 class="font-semibold text-purple-900"><%= ENV.fetch("INVOICE_COMPANY_NAME", "AperoNight") %></h4>
|
||||||
<div class="mt-2 space-y-1 text-sm text-purple-700">
|
<div class="mt-2 space-y-1 text-sm text-purple-700">
|
||||||
<p>123 Avenue des Événements</p>
|
<% if ENV["INVOICE_COMPANY_ADDRESS_LINE_1"].present? %>
|
||||||
<p>75000 Paris, France</p>
|
<p><%= ENV["INVOICE_COMPANY_ADDRESS_LINE_1"] %></p>
|
||||||
<p>contact@apero-night.fr</p>
|
<% end %>
|
||||||
|
<% if ENV["INVOICE_COMPANY_ADDRESS_LINE_2"].present? %>
|
||||||
|
<p><%= ENV["INVOICE_COMPANY_ADDRESS_LINE_2"] %></p>
|
||||||
|
<% end %>
|
||||||
|
<% if ENV["INVOICE_COMPANY_EMAIL"].present? %>
|
||||||
|
<p><%= ENV["INVOICE_COMPANY_EMAIL"] %></p>
|
||||||
|
<% end %>
|
||||||
|
<% if ENV["INVOICE_COMPANY_PHONE"].present? %>
|
||||||
|
<p><%= ENV["INVOICE_COMPANY_PHONE"] %></p>
|
||||||
|
<% end %>
|
||||||
|
<% if ENV["INVOICE_COMPANY_VAT_NUMBER"].present? %>
|
||||||
|
<p>TVA: <%= ENV["INVOICE_COMPANY_VAT_NUMBER"] %></p>
|
||||||
|
<% end %>
|
||||||
|
<% if ENV["INVOICE_COMPANY_SIRET"].present? %>
|
||||||
|
<p>SIRET: <%= ENV["INVOICE_COMPANY_SIRET"] %></p>
|
||||||
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,37 +1,11 @@
|
|||||||
<div class="min-h-screen bg-gradient-to-br from-gray-50 to-gray-100">
|
<div class="min-h-screen bg-gradient-to-br from-gray-50 to-gray-100">
|
||||||
<div class="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
|
<div class="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
|
||||||
<!-- Breadcrumb -->
|
<%= render 'components/breadcrumb', crumbs: [
|
||||||
<nav class="flex mb-6" aria-label="Breadcrumb">
|
{ name: 'Accueil', path: root_path },
|
||||||
<ol class="inline-flex items-center space-x-1 md:space-x-2 rounded-lg bg-white px-4 py-2 shadow-sm">
|
{ name: 'Événements', path: events_path },
|
||||||
<li class="inline-flex items-center">
|
{ name: @event.name, path: event_path(@event.slug, @event) },
|
||||||
<%= link_to "Accueil", root_path, class: "inline-flex items-center text-sm font-medium text-gray-700 hover:text-purple-600" %>
|
{ name: 'Nouvelle commande', path: nil }
|
||||||
</li>
|
] %>
|
||||||
<li>
|
|
||||||
<div class="flex items-center">
|
|
||||||
<svg class="w-4 h-4 text-gray-400" fill="currentColor" viewBox="0 0 20 20">
|
|
||||||
<path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd"></path>
|
|
||||||
</svg>
|
|
||||||
<%= link_to "Événements", events_path, class: "ml-1 text-sm font-medium text-gray-700 hover:text-purple-600 md:ml-2" %>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<div class="flex items-center">
|
|
||||||
<svg class="w-4 h-4 text-gray-400" fill="currentColor" viewBox="0 0 20 20">
|
|
||||||
<path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd"></path>
|
|
||||||
</svg>
|
|
||||||
<%= link_to @event.name, event_path(@event.slug, @event), class: "ml-1 text-sm font-medium text-gray-700 hover:text-purple-600 md:ml-2" %>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<div class="flex items-center">
|
|
||||||
<svg class="w-4 h-4 text-gray-400" fill="currentColor" viewBox="0 0 20 20">
|
|
||||||
<path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd"></path>
|
|
||||||
</svg>
|
|
||||||
<span class="ml-1 text-sm font-medium text-purple-600 md:ml-2">Nouvelle commande</span>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
</ol>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<!-- Page Header -->
|
<!-- Page Header -->
|
||||||
<div class="mb-8">
|
<div class="mb-8">
|
||||||
|
|||||||
Reference in New Issue
Block a user