diff --git a/app/controllers/manager/email_events_controller.rb b/app/controllers/manager/email_events_controller.rb new file mode 100644 index 000000000..bd7b59ff7 --- /dev/null +++ b/app/controllers/manager/email_events_controller.rb @@ -0,0 +1,4 @@ +module Manager + class EmailEventsController < Manager::ApplicationController + end +end diff --git a/app/dashboards/email_event_dashboard.rb b/app/dashboards/email_event_dashboard.rb new file mode 100644 index 000000000..65fc6656e --- /dev/null +++ b/app/dashboards/email_event_dashboard.rb @@ -0,0 +1,18 @@ +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 diff --git a/config/routes.rb b/config/routes.rb index a6a4b6b9e..d741ad658 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -65,6 +65,8 @@ Rails.application.routes.draw do resources :team_accounts, only: [:index, :show] + resources :email_events, only: [:index, :show] + resources :dubious_procedures, only: [:index] resources :outdated_procedures, only: [:index] do patch :bulk_update, on: :collection