anthonymidili/Bullhorn

View on GitHub
app/views/notifications/show.html.haml

Summary

Maintainability
Test Coverage
.row.center-content
  .col-12.col-md-8
    #notifications
      %p
        .links
          = button_to 'mark ALL as read', mark_all_as_read_notifications_path,
          title: 'mark ALL notifications as read', class: 'btn btn-primary', 
          method: :patch, data: { turbo: false }
          = link_to edit_notifications_path,
          title: 'Notification Settings', class: 'btn btn-primary' do
            %i.fa-solid.fa-gear
            Settings
      .notifications-box.d-flex.flex-column.mb-3
        %h2 Notifications
        - if @recent_notifications.any?
          %h6.list NEW
          = turbo_frame_tag "unread_notifications_list" do
            = render @recent_notifications
        - if @earlier_notifications.any?
          %h6.list EARLIER
          #unread_notifications_list
            = render @earlier_notifications