diff --git a/app/views/benefit_forms/index.html.erb b/app/views/benefit_forms/index.html.erb index 5ae8a50..0934eda 100644 --- a/app/views/benefit_forms/index.html.erb +++ b/app/views/benefit_forms/index.html.erb @@ -1,4 +1,38 @@
+ + <% if flash.any? %> +
+
+ <% 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 + %> + + <% end %> +
+
+ <% end %> +