develop #3
@@ -152,6 +152,11 @@ class OrdersController < ApplicationController
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# For POST requests, increment the payment attempt counter
|
||||||
|
if request.post?
|
||||||
|
@order.increment_payment_attempt!
|
||||||
|
end
|
||||||
|
|
||||||
redirect_to checkout_order_path(@order)
|
redirect_to checkout_order_path(@order)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -11,18 +11,13 @@
|
|||||||
<div class="hidden sm:flex items-center space-x-8 w-full justify-center">
|
<div class="hidden sm:flex items-center space-x-8 w-full justify-center">
|
||||||
<%= link_to events_path,
|
<%= link_to events_path,
|
||||||
class: "text-gray-700 hover:text-brand-primary py-2 text-sm font-medium transition-colors duration-200 relative after:absolute after:bottom-0 after:left-0 after:h-0.5 after:w-0 hover:after:w-full after:bg-brand-primary after:transition-all after:duration-200" do %>
|
class: "text-gray-700 hover:text-brand-primary py-2 text-sm font-medium transition-colors duration-200 relative after:absolute after:bottom-0 after:left-0 after:h-0.5 after:w-0 hover:after:w-full after:bg-brand-primary after:transition-all after:duration-200" do %>
|
||||||
Événements
|
Événements & Afterworks
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%= link_to events_path,
|
<!-- <%= link_to "#",
|
||||||
class: "text-gray-700 hover:text-brand-primary py-2 text-sm font-medium transition-colors duration-200 relative after:absolute after:bottom-0 after:left-0 after:h-0.5 after:w-0 hover:after:w-full after:bg-brand-primary after:transition-all after:duration-200" do %>
|
|
||||||
Afterworks
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<%= link_to "#",
|
|
||||||
class: "text-gray-700 hover:text-brand-primary py-2 text-sm font-medium transition-colors duration-200 relative after:absolute after:bottom-0 after:left-0 after:h-0.5 after:w-0 hover:after:w-full after:bg-brand-primary after:transition-all after:duration-200" do %>
|
class: "text-gray-700 hover:text-brand-primary py-2 text-sm font-medium transition-colors duration-200 relative after:absolute after:bottom-0 after:left-0 after:h-0.5 after:w-0 hover:after:w-full after:bg-brand-primary after:transition-all after:duration-200" do %>
|
||||||
Concerts
|
Concerts
|
||||||
<% end %>
|
<% end %> -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Authentication -->
|
<!-- Authentication -->
|
||||||
@@ -88,18 +83,18 @@
|
|||||||
<%= link_to events_path,
|
<%= link_to events_path,
|
||||||
class: "flex items-center px-3 py-2 rounded-lg text-base font-medium text-gray-700 hover:text-brand-primary hover:bg-gray-50" do %>
|
class: "flex items-center px-3 py-2 rounded-lg text-base font-medium text-gray-700 hover:text-brand-primary hover:bg-gray-50" do %>
|
||||||
<i data-lucide="calendar" class="w-4 h-4 mr-3"></i>
|
<i data-lucide="calendar" class="w-4 h-4 mr-3"></i>
|
||||||
Événements
|
Événements & Afterworks
|
||||||
<% end %>
|
<% end %>
|
||||||
<%= link_to events_path,
|
<!-- <%= link_to events_path,
|
||||||
class: "flex items-center px-3 py-2 rounded-lg text-base font-medium text-gray-700 hover:text-brand-primary hover:bg-gray-50" do %>
|
class: "flex items-center px-3 py-2 rounded-lg text-base font-medium text-gray-700 hover:text-brand-primary hover:bg-gray-50" do %>
|
||||||
<i data-lucide="glass-water" class="w-4 h-4 mr-3"></i>
|
<i data-lucide="glass-water" class="w-4 h-4 mr-3"></i>
|
||||||
Afterworks
|
Afterworks
|
||||||
<% end %>
|
<% end %> -->
|
||||||
<%= link_to "#",
|
<!-- <%= link_to "#",
|
||||||
class: "flex items-center px-3 py-2 rounded-lg text-base font-medium text-gray-700 hover:text-brand-primary hover:bg-gray-50" do %>
|
class: "flex items-center px-3 py-2 rounded-lg text-base font-medium text-gray-700 hover:text-brand-primary hover:bg-gray-50" do %>
|
||||||
<i data-lucide="music" class="w-4 h-4 mr-3"></i>
|
<i data-lucide="music" class="w-4 h-4 mr-3"></i>
|
||||||
Concerts
|
Concerts
|
||||||
<% end %>
|
<% end %> -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pt-4 pb-4 border-t border-gray-200">
|
<div class="pt-4 pb-4 border-t border-gray-200">
|
||||||
|
|||||||
@@ -13,16 +13,17 @@ Rails.application.routes.draw do
|
|||||||
root "pages#home"
|
root "pages#home"
|
||||||
|
|
||||||
# === Devise ===
|
# === Devise ===
|
||||||
|
|
||||||
# Routes for devise authentication Gem
|
# Routes for devise authentication Gem
|
||||||
# Bind devise to user
|
# Bind devise to user
|
||||||
devise_for :users, path: "auth", path_names: {
|
devise_for :users, path: "auth", path_names: {
|
||||||
sign_in: "sign_in", # Route for user login
|
sign_in: "sign_in", # Route for user login
|
||||||
sign_out: "sign_out", # Route for user logout
|
sign_out: "sign_out", # Route for user logout
|
||||||
password: "reset-password", # Route for changing password
|
password: "reset-password", # Route for changing password
|
||||||
confirmation: "verification", # Route for account confirmation
|
confirmation: "verification", # Route for account confirmation
|
||||||
unlock: "unblock", # Route for account unlock
|
unlock: "unblock", # Route for account unlock
|
||||||
# registration: "account", # Route for user account
|
# registration: "account", # Route for user account
|
||||||
sign_up: "signup" # Route for user registration
|
sign_up: "signup" # Route for user registration
|
||||||
},
|
},
|
||||||
controllers: {
|
controllers: {
|
||||||
sessions: "auth/sessions", # Custom controller for sessions
|
sessions: "auth/sessions", # Custom controller for sessions
|
||||||
@@ -32,8 +33,8 @@ Rails.application.routes.draw do
|
|||||||
}
|
}
|
||||||
|
|
||||||
# === Onboarding ===
|
# === Onboarding ===
|
||||||
get "onboarding", to: "onboarding#index", as: "onboarding"
|
get "onboarding", to: "onboarding#index", as: "onboarding"
|
||||||
post "onboarding", to: "onboarding#complete", as: "complete_onboarding"
|
post "onboarding", to: "onboarding#complete", as: "complete_onboarding"
|
||||||
|
|
||||||
# === Pages ===
|
# === Pages ===
|
||||||
get "dashboard", to: "pages#dashboard", as: "dashboard"
|
get "dashboard", to: "pages#dashboard", as: "dashboard"
|
||||||
@@ -50,7 +51,7 @@ Rails.application.routes.draw do
|
|||||||
member do
|
member do
|
||||||
get :checkout
|
get :checkout
|
||||||
get :invoice
|
get :invoice
|
||||||
post :retry_payment
|
match :retry_payment, via: [ :get, :post ]
|
||||||
post :increment_payment_attempt
|
post :increment_payment_attempt
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -87,7 +88,6 @@ Rails.application.routes.draw do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
# API routes versioning
|
# API routes versioning
|
||||||
namespace :api do
|
namespace :api do
|
||||||
namespace :v1 do
|
namespace :v1 do
|
||||||
|
|||||||
Reference in New Issue
Block a user