Class: Workarea::Admin::Dashboards::IndexViewModel
- Inherits:
-
ApplicationViewModel
- Object
- ApplicationViewModel
- Workarea::Admin::Dashboards::IndexViewModel
show all
- Includes:
- InsightsGraphs
- Defined in:
- app/view_models/workarea/admin/dashboards/index_view_model.rb
Instance Method Summary
collapse
#ends_at, #previous_ends_at, #previous_starts_at, #starts_at
Instance Method Details
#insights ⇒ Object
20
21
22
23
24
|
# File 'app/view_models/workarea/admin/dashboards/index_view_model.rb', line 20
def insights
@insights ||= InsightViewModel.wrap(
Workarea::Insights::Base.all.page(options[:page])
)
end
|
#today ⇒ Object
12
13
14
|
# File 'app/view_models/workarea/admin/dashboards/index_view_model.rb', line 12
def today
@today ||= Workarea::Metrics::SalesByDay.today
end
|
#yesterday ⇒ Object
16
17
18
|
# File 'app/view_models/workarea/admin/dashboards/index_view_model.rb', line 16
def yesterday
@yesterday ||= Workarea::Metrics::SalesByDay.yesterday
end
|