* notifications * fix * . * REVERT * . * drop ccss * REVERT * specs * drop colons * fixse * fix * spec 1 * eh * Fix notification specs Co-authored-by: Molly Struve <mollylbs@gmail.com>
22 lines
964 B
Text
22 lines
964 B
Text
<% @notifications.each do |notification| %>
|
|
<div
|
|
class="mb-2 spec-notification <%= "unseen" unless notification.read? %>"
|
|
data-notification-id="<%= notification.id %>">
|
|
<%= render notification.notifiable_type.downcase.to_s, notification: notification %>
|
|
</div>
|
|
|
|
<% rescue => e %>
|
|
<% Honeybadger.notify(e, context: { notification_id: notification.id }) %>
|
|
|
|
<div class="align-center p-9 py-10 color-base-80 crayons-card mb-2">
|
|
<h2 class="fw-bold fs-l">An error occurred!</h2>
|
|
<p class="color-base-60 pt-2">This has been logged and we're tracking it. If you see too many of these, please report it to <%= email_link %>!</p>
|
|
</div>
|
|
<% end %>
|
|
|
|
<% if @notifications.any? %>
|
|
<% sub_path = params[:org_id].present? ? "#{params[:filter]}/#{params[:org_id]}" : params[:filter].to_s %>
|
|
<div
|
|
class="notifications-paginator"
|
|
data-pagination-path="/notifications/<%= sub_path %>?offset=<%= @notifications.last.id %>"></div>
|
|
<% end %>
|