Sha256: 471699c5839349d7b3687c893c20da24447fd1d9c8e1dc298aaffa32bbebda62

Contents?: true

Size: 970 Bytes

Versions: 3

Compression:

Stored size: 970 Bytes

Contents

# Postmark: Inactive Recipients
module Admin
  class ReportEmailDeliveryErrorsDatatable < Effective::Datatable
    datatable do
      col :id, visible: false

      col(:to_s, label: 'User', sql_column: true, partial: 'admin/users/col')
      .search do |collection, term|
        collection.where(id: effective_resource.search_any(term))
      end.sort do |collection, direction|
        collection.order(first_name: direction)
      end

      col :email, visible: false
      col :first_name, visible: false
      col :last_name, visible: false

      col :email_delivery_error
      col :email_delivery_error_at

      actions_col(actions: []) do |user|
        dropdown_link_to('Reactivate', effective_postmark.postmark_reactivate_admin_postmark_path(user), remote: true, method: :post)
        dropdown_link_to('Edit', "/admin/users/#{user.to_param}/edit")
      end
    end

    collection do
      current_user.class.with_email_delivery_errors
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
effective_postmark-0.4.0 app/datatables/admin/report_email_delivery_errors_datatable.rb
effective_postmark-0.3.1 app/datatables/admin/report_email_delivery_errors_datatable.rb
effective_postmark-0.3.0 app/datatables/admin/report_email_delivery_errors_datatable.rb