- Replace Stripe automatic payouts with manual admin-processed bank transfers - Add banking information fields (IBAN, bank name, account holder) to User model - Implement manual payout workflow: pending → approved → processing → completed - Add comprehensive admin interface for payout review and processing - Update Payout model with manual processing fields and workflow methods - Add transfer reference tracking and rejection/failure handling - Consolidate all migration fragments into clean "create" migrations - Add comprehensive documentation for manual payout workflow - Fix Event payout_status enum definition and database column issues This addresses France's lack of Stripe Global Payouts support by implementing a complete manual bank transfer workflow while maintaining audit trails and proper admin controls. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
96 lines
4.9 KiB
Plaintext
96 lines
4.9 KiB
Plaintext
<table class="min-w-full divide-y divide-gray-200">
|
|
<thead class="bg-gray-50">
|
|
<tr>
|
|
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Event</th>
|
|
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Promoter</th>
|
|
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Banking Info</th>
|
|
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Amount</th>
|
|
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Status</th>
|
|
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Date</th>
|
|
<% if show_actions %>
|
|
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Actions</th>
|
|
<% end %>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="bg-white divide-y divide-gray-200">
|
|
<% payouts.each do |payout| %>
|
|
<tr>
|
|
<td class="px-6 py-4 whitespace-nowrap">
|
|
<div class="text-sm font-medium text-gray-900"><%= payout.event.name %></div>
|
|
<div class="text-sm text-gray-500"><%= payout.event.date.strftime("%b %d, %Y") if payout.event.date %></div>
|
|
</td>
|
|
<td class="px-6 py-4 whitespace-nowrap">
|
|
<div class="text-sm text-gray-900"><%= payout.user.name.presence || payout.user.email %></div>
|
|
</td>
|
|
<td class="px-6 py-4 whitespace-nowrap">
|
|
<% if payout.user.has_complete_banking_info? %>
|
|
<div class="text-sm text-gray-900">✅ Complete</div>
|
|
<div class="text-sm text-gray-500"><%= payout.user.bank_name %></div>
|
|
<% else %>
|
|
<div class="text-sm text-red-600">❌ Incomplete</div>
|
|
<div class="text-sm text-gray-500">Missing banking info</div>
|
|
<% end %>
|
|
</td>
|
|
<td class="px-6 py-4 whitespace-nowrap">
|
|
<div class="text-sm text-gray-900">€<%= payout.amount_euros %></div>
|
|
<div class="text-sm text-gray-500">Net: €<%= payout.net_amount_euros %></div>
|
|
</td>
|
|
<td class="px-6 py-4 whitespace-nowrap">
|
|
<% case payout.status %>
|
|
<% when 'pending' %>
|
|
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-yellow-100 text-yellow-800">
|
|
Pending Review
|
|
</span>
|
|
<% when 'approved' %>
|
|
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-blue-100 text-blue-800">
|
|
Approved
|
|
</span>
|
|
<% when 'processing' %>
|
|
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-indigo-100 text-indigo-800">
|
|
Processing
|
|
</span>
|
|
<% when 'completed' %>
|
|
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">
|
|
Completed
|
|
</span>
|
|
<% when 'failed' %>
|
|
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-red-100 text-red-800">
|
|
Failed
|
|
</span>
|
|
<% when 'rejected' %>
|
|
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-gray-100 text-gray-800">
|
|
Rejected
|
|
</span>
|
|
<% end %>
|
|
</td>
|
|
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
|
|
<%= payout.created_at.strftime("%b %d, %Y") %>
|
|
<% if payout.processed_at %>
|
|
<div class="text-xs text-gray-400">Processed: <%= payout.processed_at.strftime("%b %d") %></div>
|
|
<% end %>
|
|
</td>
|
|
<% if show_actions %>
|
|
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
|
|
<%= link_to "View", admin_payout_path(payout), class: "text-indigo-600 hover:text-indigo-900" %>
|
|
<% case section %>
|
|
<% when 'pending' %>
|
|
<% if payout.can_approve? %>
|
|
<%= link_to "Approve", approve_admin_payout_path(payout), method: :post,
|
|
class: "text-green-600 hover:text-green-900 ml-2",
|
|
data: { confirm: "Approve this payout for transfer?" } %>
|
|
<% end %>
|
|
<% when 'approved' %>
|
|
<%= link_to "Start Transfer", mark_processing_admin_payout_path(payout), method: :post,
|
|
class: "text-blue-600 hover:text-blue-900 ml-2",
|
|
data: { confirm: "Mark as processing (transfer initiated)?" } %>
|
|
<% when 'processing' %>
|
|
<%= link_to "Complete", mark_completed_admin_payout_path(payout), method: :post,
|
|
class: "text-green-600 hover:text-green-900 ml-2",
|
|
data: { confirm: "Mark transfer as completed?" } %>
|
|
<% end %>
|
|
</td>
|
|
<% end %>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table> |