feat(team_account): link row to admin view

This commit is contained in:
simon lehericey 2022-11-24 14:33:32 +01:00 committed by LeSim
parent 18bb26a7f2
commit 8acdf7f5ee

View file

@ -2,16 +2,20 @@ module Manager
class TeamAccountsController < Manager::ApplicationController
def index
@records_per_page = params[:records_per_page] || "10"
resources = User
.where(team_account: true)
resources = Administrateur
.where(user: { team_account: true })
.order(created_at: :asc)
.page(params[:_page])
.per(@records_per_page)
resources.each do |resource|
def resource.procedures_count
administrateur.procedures.with_discarded.count
procedures.with_discarded.count
end
def resource.last_sign_in_at = user.last_sign_in_at
def resource.current_sign_in_at = user.current_sign_in_at
end
page = Administrate::Page::Collection.new(dashboard)