From 8acdf7f5eed33535be8609a401c5a1d50b6fe93c Mon Sep 17 00:00:00 2001 From: simon lehericey Date: Thu, 24 Nov 2022 14:33:32 +0100 Subject: [PATCH] feat(team_account): link row to admin view --- app/controllers/manager/team_accounts_controller.rb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/controllers/manager/team_accounts_controller.rb b/app/controllers/manager/team_accounts_controller.rb index 8999c80d0..5bd034a53 100644 --- a/app/controllers/manager/team_accounts_controller.rb +++ b/app/controllers/manager/team_accounts_controller.rb @@ -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)