feat(manager): email events with collection filters of delivery methods
This commit is contained in:
parent
d58e6a2f9c
commit
d563a4fa66
1 changed files with 7 additions and 1 deletions
|
@ -11,8 +11,14 @@ class EmailEventDashboard < Administrate::BaseDashboard
|
|||
}
|
||||
COLLECTION_ATTRIBUTES = [:id, :to, :subject, :method, :status, :processed_at].freeze
|
||||
SHOW_PAGE_ATTRIBUTES = [:id, :to, :subject, :method, :status, :processed_at].freeze
|
||||
|
||||
METHODS_FILTERS =
|
||||
ActionMailer::Base.delivery_methods.keys.index_with do |method|
|
||||
-> (resources) { resources.where(method: method) }
|
||||
end
|
||||
|
||||
COLLECTION_FILTERS = {
|
||||
dispatched: -> (resources) { resources.dispatched },
|
||||
dispatch_error: -> (resources) { resources.dispatch_error }
|
||||
}.freeze
|
||||
}.merge(METHODS_FILTERS).freeze
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue