19 lines
643 B
Ruby
19 lines
643 B
Ruby
|
require "administrate/base_dashboard"
|
||
|
|
||
|
class EmailEventDashboard < Administrate::BaseDashboard
|
||
|
ATTRIBUTE_TYPES = {
|
||
|
id: Field::Number,
|
||
|
to: Field::String,
|
||
|
subject: Field::String,
|
||
|
method: Field::Enum,
|
||
|
status: Field::Enum,
|
||
|
processed_at: Field::DateTime.with_options(format: "%F %T")
|
||
|
}
|
||
|
COLLECTION_ATTRIBUTES = [:id, :to, :subject, :method, :status, :processed_at].freeze
|
||
|
SHOW_PAGE_ATTRIBUTES = [:id, :to, :subject, :method, :status, :processed_at].freeze
|
||
|
COLLECTION_FILTERS = {
|
||
|
dispatched: -> (resources) { resources.dispatched },
|
||
|
dispatch_error: -> (resources) { resources.dispatch_error }
|
||
|
}.freeze
|
||
|
end
|