You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
868 B
33 lines
868 B
3 years ago
|
ActiveAdmin.register_page "Dashboard" do
|
||
|
menu priority: 1, label: proc { I18n.t("active_admin.dashboard") }
|
||
|
|
||
|
content title: proc { I18n.t("active_admin.dashboard") } do
|
||
|
columns do
|
||
|
column do
|
||
|
panel "Recent Case Logs" do
|
||
|
table_for CaseLog.order(updated_at: :desc).limit(10) do
|
||
|
column :id
|
||
|
column :created_at
|
||
|
column :updated_at
|
||
|
column :status
|
||
|
column :tenant_code
|
||
|
column :property_postcode
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
|
||
|
column do
|
||
|
panel "Total case logs in progress" do
|
||
|
para CaseLog.in_progress.size
|
||
|
end
|
||
|
panel "Total case logs completed" do
|
||
|
para CaseLog.completed.size
|
||
|
end
|
||
|
panel "Total case logs completed" do
|
||
|
pie_chart CaseLog.group(:status).size
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
end
|