Sha256: 4acd72b0ceab3fb8db35b8f6226b8a184a17613ac13b9752bda5dca871c804bf

Contents?: true

Size: 1.46 KB

Versions: 28

Compression:

Stored size: 1.46 KB

Contents

module Workarea
  class Admin::DashboardsController < Admin::ApplicationController
    def index
      @dashboard = Admin::Dashboards::IndexViewModel.wrap(nil, view_model_options)
      @activity = Admin::ActivityViewModel.new(nil, view_model_options)
    end

    def store
      @dashboard = Admin::Dashboards::StoreViewModel.wrap(nil, view_model_options)
    end

    def search
      @dashboard = Admin::Dashboards::SearchViewModel.wrap(nil, view_model_options)
    end

    def catalog
      @dashboard = Admin::Dashboards::CatalogViewModel.wrap(nil, view_model_options)
    end

    def orders
      @dashboard = Admin::Dashboards::OrdersViewModel.wrap(nil, view_model_options)
    end

    def people
      @dashboard = Admin::Dashboards::PeopleViewModel.wrap(nil, view_model_options)
    end

    def marketing
      @dashboard = Admin::Dashboards::MarketingViewModel.wrap(nil, view_model_options)
    end

    def reports
      @dashboard = Admin::Dashboards::ReportsViewModel.wrap(nil, view_model_options)
    end

    def settings
      configuration = Workarea.config.merge(
        time_zone: Rails.application.config.time_zone
      )

      @settings = configuration.reject do |key, _value|
        Workarea.config.hide_from_settings.include?(key)
      end

      @configuration = Configuration::Admin.instance
    end

    # Override to provide permissions per-dashboard
    def required_permissions
      params[:action] unless params[:action] == 'index'
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
workarea-admin-3.5.27 app/controllers/workarea/admin/dashboards_controller.rb
workarea-admin-3.5.26 app/controllers/workarea/admin/dashboards_controller.rb
workarea-admin-3.5.25 app/controllers/workarea/admin/dashboards_controller.rb
workarea-admin-3.5.23 app/controllers/workarea/admin/dashboards_controller.rb
workarea-admin-3.5.22 app/controllers/workarea/admin/dashboards_controller.rb
workarea-admin-3.5.21 app/controllers/workarea/admin/dashboards_controller.rb
workarea-admin-3.5.20 app/controllers/workarea/admin/dashboards_controller.rb
workarea-admin-3.5.19 app/controllers/workarea/admin/dashboards_controller.rb
workarea-admin-3.5.18 app/controllers/workarea/admin/dashboards_controller.rb
workarea-admin-3.5.17 app/controllers/workarea/admin/dashboards_controller.rb
workarea-admin-3.5.16 app/controllers/workarea/admin/dashboards_controller.rb
workarea-admin-3.5.15 app/controllers/workarea/admin/dashboards_controller.rb
workarea-admin-3.5.14 app/controllers/workarea/admin/dashboards_controller.rb
workarea-admin-3.5.13 app/controllers/workarea/admin/dashboards_controller.rb
workarea-admin-3.5.12 app/controllers/workarea/admin/dashboards_controller.rb
workarea-admin-3.5.11 app/controllers/workarea/admin/dashboards_controller.rb
workarea-admin-3.5.10 app/controllers/workarea/admin/dashboards_controller.rb
workarea-admin-3.5.9 app/controllers/workarea/admin/dashboards_controller.rb
workarea-admin-3.5.8 app/controllers/workarea/admin/dashboards_controller.rb
workarea-admin-3.5.7 app/controllers/workarea/admin/dashboards_controller.rb