- Fix onboarding controller test by using consistent application name - Fix ticket mailer template error by correcting variable reference (@user.first_name) - Update event reminder template to use configurable app name - Refactor mailer tests to properly handle multipart email content - Update test assertions to match actual template content - Remove duplicate migration for onboarding field - Add documentation for test fixes and solutions
110 lines
5.5 KiB
Plaintext
110 lines
5.5 KiB
Plaintext
<div class="min-h-screen bg-gradient-to-br from-purple-50 to-indigo-50 py-8">
|
|
<div class="max-w-2xl mx-auto px-4 sm:px-6 lg:px-8">
|
|
|
|
<!-- Header -->
|
|
<div class="text-center mb-8">
|
|
<div class="mx-auto w-20 h-20 bg-purple-100 rounded-full flex items-center justify-center mb-6">
|
|
<svg class="w-10 h-10 text-purple-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M14.828 14.828a4 4 0 01-5.656 0M9 10h1m4 0h1m-7 4h12a3 3 0 003-3V7a3 3 0 00-3-3H6a3 3 0 00-3 3v4a3 3 0 003 3z"/>
|
|
</svg>
|
|
</div>
|
|
<h1 class="text-3xl font-bold text-gray-900 mb-3">Bienvenue sur <%= Rails.application.config.app_name %> !</h1>
|
|
<p class="text-lg text-gray-600 max-w-lg mx-auto">
|
|
Configurons rapidement votre profil pour personnaliser votre expérience.
|
|
</p>
|
|
</div>
|
|
|
|
<!-- Onboarding Form -->
|
|
<div class="bg-white rounded-2xl shadow-xl p-8">
|
|
<%= form_with model: current_user, url: complete_onboarding_path, local: true, method: :post, class: "space-y-6" do |form| %>
|
|
|
|
<!-- Progress indicator -->
|
|
<div class="mb-8">
|
|
<div class="flex items-center justify-between text-xs text-gray-500 mb-2">
|
|
<span>Étape 1 sur 1</span>
|
|
<span>Configuration du profil</span>
|
|
</div>
|
|
<div class="w-full bg-gray-200 rounded-full h-2">
|
|
<div class="bg-purple-600 h-2 rounded-full w-full transition-all duration-300"></div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Form Fields -->
|
|
<div class="space-y-6">
|
|
<!-- Personal Information Section -->
|
|
<div>
|
|
<h2 class="text-xl font-semibold text-gray-900 mb-4 flex items-center">
|
|
<svg class="w-5 h-5 mr-2 text-purple-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"/>
|
|
</svg>
|
|
Informations personnelles
|
|
</h2>
|
|
|
|
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
|
|
<!-- First Name -->
|
|
<div>
|
|
<%= form.label :first_name, "Prénom", class: "block text-sm font-medium text-gray-700 mb-2" %>
|
|
<%= form.text_field :first_name,
|
|
value: current_user.first_name,
|
|
class: "w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-purple-500 transition-colors",
|
|
placeholder: "Votre prénom",
|
|
required: true %>
|
|
</div>
|
|
|
|
<!-- Last Name -->
|
|
<div>
|
|
<%= form.label :last_name, "Nom", class: "block text-sm font-medium text-gray-700 mb-2" %>
|
|
<%= form.text_field :last_name,
|
|
value: current_user.last_name,
|
|
class: "w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-purple-500 transition-colors",
|
|
placeholder: "Votre nom de famille",
|
|
required: true %>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- Submit Button -->
|
|
<div class="pt-6 border-t border-gray-200">
|
|
<div class="space-y-4">
|
|
<p class="text-sm text-gray-500">
|
|
Vous pourrez modifier ces informations plus tard.
|
|
</p>
|
|
<%= form.submit "Compléter mon profil",
|
|
class: "w-full px-8 py-3 bg-purple-600 text-white font-semibold rounded-lg hover:bg-purple-700 focus:ring-2 focus:ring-purple-500 focus:ring-offset-2 transition-colors cursor-pointer" %>
|
|
</div>
|
|
</div>
|
|
|
|
<% end %>
|
|
</div>
|
|
|
|
<!-- Benefits Preview -->
|
|
<div class="mt-8 bg-white rounded-xl shadow-lg p-6">
|
|
<h3 class="text-lg font-semibold text-gray-900 mb-4 text-center">
|
|
Après la configuration, vous pourrez :
|
|
</h3>
|
|
<div class="grid grid-cols-1 md:grid-cols-3 gap-4">
|
|
<div class="flex items-center p-3 bg-green-50 rounded-lg">
|
|
<svg class="w-6 h-6 text-green-600 mr-3" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"/>
|
|
</svg>
|
|
<span class="text-sm font-medium text-green-800">Réserver des billets</span>
|
|
</div>
|
|
<div class="flex items-center p-3 bg-blue-50 rounded-lg">
|
|
<svg class="w-6 h-6 text-blue-600 mr-3" 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"/>
|
|
</svg>
|
|
<span class="text-sm font-medium text-blue-800">Gérer vos commandes</span>
|
|
</div>
|
|
<div class="flex items-center p-3 bg-purple-50 rounded-lg">
|
|
<svg class="w-6 h-6 text-purple-600 mr-3" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6V4m0 2a2 2 0 100 4m0-4a2 2 0 110 4m-6 8a2 2 0 100-4m0 4a2 2 0 100 4m0-4v2m0-6V4m6 6v10m6-2a2 2 0 100-4m0 4a2 2 0 100 4m0-4v2m0-6V4"/>
|
|
</svg>
|
|
<span class="text-sm font-medium text-purple-800">Créer des événements</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|