collection_dashboard.rb 443 B

1234567891011121314151617181920
  1. # Copyright (C) 2012-2021 Zammad Foundation, http://zammad-foundation.org/
  2. module SessionHelper::CollectionDashboard
  3. module_function
  4. def session( collections, assets, user )
  5. return [collections, assets] if !user
  6. item = StatsStore.find_by(
  7. stats_storable: user,
  8. key: 'dashboard',
  9. )
  10. return [collections, assets] if !item
  11. collections['StatsStore'] = [item]
  12. [collections, assets]
  13. end
  14. end