Add local flash message display to benefit forms page

Added flash message rendering directly on the benefit forms page to
ensure upload feedback is always visible, even if the layout partial
isn't rendering properly.

This provides redundancy for flash messages and ensures users always
see upload success/error feedback.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Ken Johnson
2025-12-11 13:29:05 +00:00
parent bcf1aabd35
commit 635d45d790
+34
View File
@@ -1,4 +1,38 @@
<div class="container-fluid">
<!-- Flash Messages -->
<% if flash.any? %>
<div class="row mb-3">
<div class="col-12">
<% flash.each do |name, msg| %>
<%
alert_class = case name.to_sym
when :error, :alert then 'alert-danger'
when :success, :notice then 'alert-success'
when :info then 'alert-info'
when :warning then 'alert-warning'
else 'alert-secondary'
end
icon_class = case name.to_sym
when :error, :alert then 'bi-exclamation-circle-fill'
when :success, :notice then 'bi-check-circle-fill'
when :info then 'bi-info-circle-fill'
when :warning then 'bi-exclamation-triangle-fill'
else 'bi-bell-fill'
end
%>
<div class="alert <%= alert_class %> alert-dismissible fade show d-flex align-items-center" role="alert">
<i class="bi <%= icon_class %> me-2"></i>
<div class="flex-grow-1">
<%= msg %>
</div>
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
<% end %>
</div>
</div>
<% end %>
<div class="row mb-4">
<div class="col-12">
<h2 class="mb-3">