develop #3
10
Gemfile
10
Gemfile
@@ -76,4 +76,14 @@ gem "devise", "~> 4.9"
|
|||||||
gem "kaminari", "~> 1.2"
|
gem "kaminari", "~> 1.2"
|
||||||
gem "kaminari-tailwind", "~> 0.1.0"
|
gem "kaminari-tailwind", "~> 0.1.0"
|
||||||
|
|
||||||
|
# Stripe payment processing
|
||||||
|
gem "stripe", "~> 15.5"
|
||||||
|
|
||||||
|
# PDF generation for tickets
|
||||||
|
gem "prawn", "~> 2.5"
|
||||||
|
gem "prawn-qrcode", "~> 0.5"
|
||||||
|
|
||||||
|
# QR code generation
|
||||||
|
gem "rqrcode", "~> 3.1"
|
||||||
|
|
||||||
# gem "net-pop", "~> 0.1.2"
|
# gem "net-pop", "~> 0.1.2"
|
||||||
|
|||||||
@@ -182,6 +182,7 @@ GEM
|
|||||||
minitest (>= 5.0)
|
minitest (>= 5.0)
|
||||||
ruby-progressbar
|
ruby-progressbar
|
||||||
msgpack (1.8.0)
|
msgpack (1.8.0)
|
||||||
|
mysql2 (0.5.6)
|
||||||
net-imap (0.5.9)
|
net-imap (0.5.9)
|
||||||
date
|
date
|
||||||
net-protocol
|
net-protocol
|
||||||
@@ -417,6 +418,7 @@ DEPENDENCIES
|
|||||||
kaminari (~> 1.2)
|
kaminari (~> 1.2)
|
||||||
kaminari-tailwind (~> 0.1.0)
|
kaminari-tailwind (~> 0.1.0)
|
||||||
minitest-reporters (~> 1.7)
|
minitest-reporters (~> 1.7)
|
||||||
|
mysql2 (~> 0.5)
|
||||||
prawn (~> 2.5)
|
prawn (~> 2.5)
|
||||||
prawn-qrcode (~> 0.5)
|
prawn-qrcode (~> 0.5)
|
||||||
propshaft
|
propshaft
|
||||||
|
|||||||
@@ -26,4 +26,5 @@ class User < ApplicationRecord
|
|||||||
# Validations
|
# Validations
|
||||||
validates :last_name, length: { minimum: 3, maximum: 12, allow_blank: true }
|
validates :last_name, length: { minimum: 3, maximum: 12, allow_blank: true }
|
||||||
validates :first_name, length: { minimum: 3, maximum: 12, allow_blank: true }
|
validates :first_name, length: { minimum: 3, maximum: 12, allow_blank: true }
|
||||||
|
validates :company_name, length: { minimum: 3, maximum: 12, allow_blank: true }
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -33,21 +33,6 @@
|
|||||||
<div class="absolute bottom-0 left-0 right-0 p-6 md:p-8">
|
<div class="absolute bottom-0 left-0 right-0 p-6 md:p-8">
|
||||||
<div class="max-w-4xl mx-auto">
|
<div class="max-w-4xl mx-auto">
|
||||||
<h1 class="text-3xl md:text-4xl font-bold text-white mb-2"><%= @event.name %></h1>
|
<h1 class="text-3xl md:text-4xl font-bold text-white mb-2"><%= @event.name %></h1>
|
||||||
<div class="flex flex-wrap items-center gap-4 text-white/90">
|
|
||||||
<div class="flex items-center">
|
|
||||||
<svg class="w-5 h-5 mr-2 text-purple-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
||||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"></path>
|
|
||||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 11a3 3 0 11-6 0 3 3 0 016 0z"></path>
|
|
||||||
</svg>
|
|
||||||
<span><%= @event.venue_name %></span>
|
|
||||||
</div>
|
|
||||||
<div class="flex items-center">
|
|
||||||
<svg class="w-5 h-5 mr-2 text-purple-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
||||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"></path>
|
|
||||||
</svg>
|
|
||||||
<span><%= @event.start_time.strftime("%d %B %Y à %H:%M") %></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -109,15 +94,21 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-8">
|
<div class="mb-8 bg-gray-50 rounded-xl p-6">
|
||||||
<h3 class="text-lg font-semibold text-gray-900 mb-4">Organisateur</h3>
|
<h3 class="text-lg font-semibold text-gray-900 mb-4">Organisateur</h3>
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
<div class="w-12 h-12 rounded-full bg-gradient-to-r from-purple-500 to-indigo-600 flex items-center justify-center text-white font-bold">
|
<div class="w-12 h-12 rounded-full bg-gradient-to-r from-purple-500 to-indigo-600 flex items-center justify-center text-white font-bold">
|
||||||
<%= @event.user.email.first.upcase %>
|
<%= @event.user.email.first.upcase %>
|
||||||
</div>
|
</div>
|
||||||
<div class="ml-4">
|
<div class="ml-4">
|
||||||
<p class="font-medium text-gray-900"><%= @event.user.email.split('@').first %></p>
|
<% if @event.user.first_name.present? && @event.user.last_name.present? %>
|
||||||
<p class="text-sm text-gray-500">Organisateur de l'événement</p>
|
<p class="font-medium text-gray-900"><%= @event.user.first_name %> <%= @event.user.last_name %></p>
|
||||||
|
<% else %>
|
||||||
|
<p class="font-medium text-gray-900"><%= @event.user.email.split('@').first %></p>
|
||||||
|
<% end %>
|
||||||
|
<% if @event.user.company_name.present? %>
|
||||||
|
<p class="text-sm text-gray-500"><%= @event.user.company_name %></p>
|
||||||
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -166,7 +157,7 @@
|
|||||||
<span class="text-gray-600">Montant total:</span>
|
<span class="text-gray-600">Montant total:</span>
|
||||||
<span id="cart-total" class="text-xl font-bold text-purple-700">€0.00</span>
|
<span id="cart-total" class="text-xl font-bold text-purple-700">€0.00</span>
|
||||||
</div>
|
</div>
|
||||||
<button
|
<button
|
||||||
id="checkout-btn"
|
id="checkout-btn"
|
||||||
class="w-full bg-gradient-to-r from-purple-600 to-indigo-600 hover:from-purple-700 hover:to-indigo-700 text-white font-medium py-3 px-4 rounded-xl shadow-sm transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-purple-500 focus:ring-offset-2 flex items-center justify-center"
|
class="w-full bg-gradient-to-r from-purple-600 to-indigo-600 hover:from-purple-700 hover:to-indigo-700 text-white font-medium py-3 px-4 rounded-xl shadow-sm transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-purple-500 focus:ring-offset-2 flex items-center justify-center"
|
||||||
disabled
|
disabled
|
||||||
|
|||||||
@@ -36,6 +36,13 @@ class DeviseCreateUsers < ActiveRecord::Migration[8.0]
|
|||||||
t.string :last_name, null: true # Nom
|
t.string :last_name, null: true # Nom
|
||||||
t.string :first_name, null: true # Prénom
|
t.string :first_name, null: true # Prénom
|
||||||
|
|
||||||
|
# Company informations
|
||||||
|
t.string :company_name, null: true # Nom de la société
|
||||||
|
# t.string :company_address, null: true # Adresse de la société
|
||||||
|
# t.string :company_phone, null: true # Téléphone de la société
|
||||||
|
# t.string :company_email, null: true # Email de la société
|
||||||
|
# t.string :company_website, null: true # Site web de la société
|
||||||
|
|
||||||
t.timestamps null: false
|
t.timestamps null: false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
9
db/schema.rb
generated
9
db/schema.rb
generated
@@ -11,7 +11,7 @@
|
|||||||
# It's strongly recommended that you check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema[8.0].define(version: 2025_08_23_171354) do
|
ActiveRecord::Schema[8.0].define(version: 2025_08_23_171354) do
|
||||||
create_table "events", force: :cascade do |t|
|
create_table "events", charset: "utf8mb4", collation: "utf8mb4_uca1400_ai_ci", force: :cascade do |t|
|
||||||
t.string "name", null: false
|
t.string "name", null: false
|
||||||
t.string "slug", null: false
|
t.string "slug", null: false
|
||||||
t.string "image"
|
t.string "image"
|
||||||
@@ -33,7 +33,7 @@ ActiveRecord::Schema[8.0].define(version: 2025_08_23_171354) do
|
|||||||
t.index ["user_id"], name: "index_events_on_user_id"
|
t.index ["user_id"], name: "index_events_on_user_id"
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "ticket_types", force: :cascade do |t|
|
create_table "ticket_types", charset: "utf8mb4", collation: "utf8mb4_uca1400_ai_ci", force: :cascade do |t|
|
||||||
t.string "name"
|
t.string "name"
|
||||||
t.text "description"
|
t.text "description"
|
||||||
t.integer "price_cents"
|
t.integer "price_cents"
|
||||||
@@ -50,7 +50,7 @@ ActiveRecord::Schema[8.0].define(version: 2025_08_23_171354) do
|
|||||||
t.index ["sale_start_at"], name: "index_ticket_types_on_sale_start_at"
|
t.index ["sale_start_at"], name: "index_ticket_types_on_sale_start_at"
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "tickets", force: :cascade do |t|
|
create_table "tickets", charset: "utf8mb4", collation: "utf8mb4_uca1400_ai_ci", force: :cascade do |t|
|
||||||
t.string "qr_code"
|
t.string "qr_code"
|
||||||
t.integer "price_cents"
|
t.integer "price_cents"
|
||||||
t.string "status", default: "active"
|
t.string "status", default: "active"
|
||||||
@@ -63,7 +63,7 @@ ActiveRecord::Schema[8.0].define(version: 2025_08_23_171354) do
|
|||||||
t.index ["user_id"], name: "index_tickets_on_user_id"
|
t.index ["user_id"], name: "index_tickets_on_user_id"
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "users", force: :cascade do |t|
|
create_table "users", charset: "utf8mb4", collation: "utf8mb4_uca1400_ai_ci", force: :cascade do |t|
|
||||||
t.string "email", default: "", null: false
|
t.string "email", default: "", null: false
|
||||||
t.string "encrypted_password", default: "", null: false
|
t.string "encrypted_password", default: "", null: false
|
||||||
t.string "reset_password_token"
|
t.string "reset_password_token"
|
||||||
@@ -71,6 +71,7 @@ ActiveRecord::Schema[8.0].define(version: 2025_08_23_171354) do
|
|||||||
t.datetime "remember_created_at"
|
t.datetime "remember_created_at"
|
||||||
t.string "last_name"
|
t.string "last_name"
|
||||||
t.string "first_name"
|
t.string "first_name"
|
||||||
|
t.string "company_name"
|
||||||
t.datetime "created_at", null: false
|
t.datetime "created_at", null: false
|
||||||
t.datetime "updated_at", null: false
|
t.datetime "updated_at", null: false
|
||||||
t.index ["email"], name: "index_users_on_email", unique: true
|
t.index ["email"], name: "index_users_on_email", unique: true
|
||||||
|
|||||||
Reference in New Issue
Block a user