diff --git a/app/services/projects_search/cross_core_searcher.rb b/app/services/projects_search/cross_core_searcher.rb index a01eb4a722..e066494868 100644 --- a/app/services/projects_search/cross_core_searcher.rb +++ b/app/services/projects_search/cross_core_searcher.rb @@ -30,7 +30,7 @@ def input_type private def cross_core_projects - Projects::Project.cross_core.for_facility(@current_facility_id) + Projects::Project.cross_core.for_facility(@current_facility_id).distinct end def single_facility_projects diff --git a/app/views/shared/transactions/_table_inside.html.haml b/app/views/shared/transactions/_table_inside.html.haml index b730af2b66..73aec597f9 100644 --- a/app/views/shared/transactions/_table_inside.html.haml +++ b/app/views/shared/transactions/_table_inside.html.haml @@ -56,7 +56,7 @@ - if controller_name == "projects" %td= order_detail.created_by_user.full_name - colspan_for_total += 1 - - if @account.nil? + - if @account.nil? && controller_name != "projects" %td= order_detail.account %td= order_detail.account.owner_user - colspan_for_total += 2 diff --git a/spec/system/admin/projects_show_spec.rb b/spec/system/admin/projects_show_spec.rb index 3aa76da150..adafc3aa39 100644 --- a/spec/system/admin/projects_show_spec.rb +++ b/spec/system/admin/projects_show_spec.rb @@ -36,6 +36,10 @@ expect(page).to have_link("Edit") end + it "doesn't show account info" do + expect(page).not_to have_content(active_project_order.account.to_s) + end + it "navigates to order" do click_link active_project_order.id @@ -86,6 +90,10 @@ expect(page).to have_link("Edit") end + it "doesn't show account info" do + expect(page).not_to have_content(active_project_order.account.to_s) + end + it "navigates to original order" do click_link originating_order_facility1.id @@ -114,6 +122,10 @@ expect(page).to have_link("Edit") end + it "doesn't show account info" do + expect(page).not_to have_content(active_project_order.account.to_s) + end + it "shows other facility's orders as text" do expect(page).not_to have_link(originating_order_facility2.id) expect(page).not_to have_link(cross_core_orders[3].id)