Module: Workarea::Admin::Dashboards::InsightsGraphs
- Extended by:
- ActiveSupport::Concern
- Includes:
- CalculatePercentChange
- Included in:
- IndexViewModel, MarketingViewModel, OrdersViewModel, PeopleViewModel, SearchViewModel
- Defined in:
- app/view_models/workarea/admin/dashboards/insights_graphs.rb
Instance Method Summary collapse
Instance Method Details
#ends_at ⇒ Object
40 41 42 |
# File 'app/view_models/workarea/admin/dashboards/insights_graphs.rb', line 40 def ends_at current_period.values.first.ends_at end |
#previous_ends_at ⇒ Object
48 49 50 |
# File 'app/view_models/workarea/admin/dashboards/insights_graphs.rb', line 48 def previous_ends_at (starts_at - 1.day).end_of_day end |
#previous_starts_at ⇒ Object
44 45 46 |
# File 'app/view_models/workarea/admin/dashboards/insights_graphs.rb', line 44 def previous_starts_at starts_at - (ends_at - starts_at).seconds - 1.day end |
#starts_at ⇒ Object
36 37 38 |
# File 'app/view_models/workarea/admin/dashboards/insights_graphs.rb', line 36 def starts_at current_period.values.first.starts_at end |