diff --git a/app/controllers/madmin/analytics/file_downloads_controller.rb b/app/controllers/madmin/analytics/file_downloads_controller.rb new file mode 100644 index 000000000..2a36f3c38 --- /dev/null +++ b/app/controllers/madmin/analytics/file_downloads_controller.rb @@ -0,0 +1,4 @@ +module Madmin + class Analytics::FileDownloadsController < Madmin::ResourceController + end +end diff --git a/app/controllers/madmin/lotteries/entrant_service_details_controller.rb b/app/controllers/madmin/lotteries/entrant_service_details_controller.rb new file mode 100644 index 000000000..1cff1ea30 --- /dev/null +++ b/app/controllers/madmin/lotteries/entrant_service_details_controller.rb @@ -0,0 +1,4 @@ +module Madmin + class Lotteries::EntrantServiceDetailsController < Madmin::ResourceController + end +end diff --git a/app/madmin/resources/analytics/file_download_resource.rb b/app/madmin/resources/analytics/file_download_resource.rb new file mode 100644 index 000000000..59cf53149 --- /dev/null +++ b/app/madmin/resources/analytics/file_download_resource.rb @@ -0,0 +1,27 @@ +class Analytics::FileDownloadResource < Madmin::Resource + # Attributes + attribute :id, form: false + attribute :name + attribute :filename + attribute :byte_size + attribute :created_at, form: false + attribute :updated_at, form: false + + # Associations + attribute :user + attribute :record + + # Uncomment this to customize the display name of records in the admin area. + # def self.display_name(record) + # record.name + # end + + # Uncomment this to customize the default sort column and direction. + # def self.default_sort_column + # "created_at" + # end + # + # def self.default_sort_direction + # "desc" + # end +end diff --git a/app/madmin/resources/lotteries/entrant_service_detail_resource.rb b/app/madmin/resources/lotteries/entrant_service_detail_resource.rb new file mode 100644 index 000000000..516341255 --- /dev/null +++ b/app/madmin/resources/lotteries/entrant_service_detail_resource.rb @@ -0,0 +1,28 @@ +class Lotteries::EntrantServiceDetailResource < Madmin::Resource + # Attributes + attribute :lottery_entrant_id + attribute :form_accepted_at + attribute :form_rejected_at + attribute :form_accepted_comments + attribute :form_rejected_comments + attribute :created_at, form: false + attribute :updated_at, form: false + attribute :completed_form, index: false + + # Associations + attribute :entrant + + # Uncomment this to customize the display name of records in the admin area. + # def self.display_name(record) + # record.name + # end + + # Uncomment this to customize the default sort column and direction. + # def self.default_sort_column + # "created_at" + # end + # + # def self.default_sort_direction + # "desc" + # end +end diff --git a/config/routes/madmin.rb b/config/routes/madmin.rb index 39f52ac1b..3e1143fdf 100644 --- a/config/routes/madmin.rb +++ b/config/routes/madmin.rb @@ -1,7 +1,11 @@ # Below are the routes for madmin namespace :madmin do + namespace :lotteries do + resources :entrant_service_details + end resources :historical_facts namespace :analytics do + resources :file_downloads resources :sendgrid_events end resources :connections