From 2fd0d29b9eeebc8d86e8c875429ebabc968b82a1 Mon Sep 17 00:00:00 2001 From: natdeanlewissoftwire Date: Tue, 14 Nov 2023 09:11:14 +0000 Subject: [PATCH] WIP commit --- app/helpers/tab_nav_helper.rb | 3 ++- config/routes.rb | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/helpers/tab_nav_helper.rb b/app/helpers/tab_nav_helper.rb index c29ae5d86..9d441bdfe 100644 --- a/app/helpers/tab_nav_helper.rb +++ b/app/helpers/tab_nav_helper.rb @@ -3,7 +3,8 @@ module TabNavHelper def user_cell(user) link_text = user.name.presence || user.email - [govuk_link_to(link_text, user), "User #{user.email}"].join("\n") + link = current_user.support? ? govuk_link_to(link_text, organisation_user_path(user.organisation, user)) : govuk_link_to(link_text, user) + [link, "User #{user.email}"].join("\n") end def location_cell_postcode(location, link) diff --git a/config/routes.rb b/config/routes.rb index 052570cb1..de9c071b9 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -122,6 +122,7 @@ Rails.application.routes.draw do end resources :organisations do + resources :users get "duplicates", to: "duplicate_logs#index" member do