From 2656f29b728d5189c15873adf844da25089267f6 Mon Sep 17 00:00:00 2001 From: pbradin Date: Fri, 16 Apr 2021 16:22:09 -0400 Subject: [PATCH] Revert "Paula/caseflow 1126 judge tabs (#16125)" This reverts commit 41ad80db6394d96340bd50d9d723bbaff8bd25e3. --- app/models/queue_tabs/assigned_tasks_tab.rb | 1 - app/models/queue_tabs/completed_tasks_tab.rb | 2 -- app/models/queue_tabs/on_hold_tasks_tab.rb | 2 -- app/models/user.rb | 2 ++ spec/controllers/tasks_controller_spec.rb | 3 +-- spec/feature/queue/task_queue_spec.rb | 3 --- 6 files changed, 3 insertions(+), 10 deletions(-) diff --git a/app/models/queue_tabs/assigned_tasks_tab.rb b/app/models/queue_tabs/assigned_tasks_tab.rb index 0dc7018437c..0f815744ad4 100644 --- a/app/models/queue_tabs/assigned_tasks_tab.rb +++ b/app/models/queue_tabs/assigned_tasks_tab.rb @@ -29,7 +29,6 @@ def contains_legacy_tasks? # rubocop:disable Metrics/AbcSize def column_names - # acting VLJs are both judge_in_vacols and attorney_in_vacols and should see the attorney columns return QueueTab.attorney_column_names if assignee.attorney_in_vacols? return QueueTab.judge_column_names if assignee.judge_in_vacols? diff --git a/app/models/queue_tabs/completed_tasks_tab.rb b/app/models/queue_tabs/completed_tasks_tab.rb index d0d906ab48f..bdbf834f953 100644 --- a/app/models/queue_tabs/completed_tasks_tab.rb +++ b/app/models/queue_tabs/completed_tasks_tab.rb @@ -21,9 +21,7 @@ def tasks # rubocop:disable Metrics/AbcSize def column_names - # acting VLJs are both judge_in_vacols and attorney_in_vacols and should see the attorney columns return QueueTab.attorney_column_names if assignee.attorney_in_vacols? - return QueueTab.judge_column_names if assignee.judge_in_vacols? [ Constants.QUEUE_CONFIG.COLUMNS.BADGES.name, diff --git a/app/models/queue_tabs/on_hold_tasks_tab.rb b/app/models/queue_tabs/on_hold_tasks_tab.rb index 527cc68becd..8f709bcd835 100644 --- a/app/models/queue_tabs/on_hold_tasks_tab.rb +++ b/app/models/queue_tabs/on_hold_tasks_tab.rb @@ -45,9 +45,7 @@ def legacy_colocated_task_ids_assigned_by_assignee # rubocop:disable Metrics/AbcSize def column_names - # acting VLJs are both judge_in_vacols and attorney_in_vacols and should see the attorney columns return QueueTab.attorney_column_names if assignee.attorney_in_vacols? - return QueueTab.judge_column_names if assignee.judge_in_vacols? [ Constants.QUEUE_CONFIG.COLUMNS.BADGES.name, diff --git a/app/models/user.rb b/app/models/user.rb index ef27bcccfe5..36b9f63ed69 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -357,6 +357,8 @@ def use_task_pages_api? end def queue_tabs + return [assigned_tasks_tab] if judge_in_vacols? && !attorney_in_vacols? + [ assigned_tasks_tab, on_hold_tasks_tab, diff --git a/spec/controllers/tasks_controller_spec.rb b/spec/controllers/tasks_controller_spec.rb index d9e1760d642..23ea1e4cb6a 100644 --- a/spec/controllers/tasks_controller_spec.rb +++ b/spec/controllers/tasks_controller_spec.rb @@ -118,8 +118,7 @@ it "should process the request succesfully" do get :index, params: { user_id: user.id, role: "judge" } response_body = JSON.parse(response.body)["queue_config"]["tabs"] - # judges should now have assigned, on-hold, and completed tabs - expect(response_body.size).to eq 3 + expect(response_body.size).to eq 1 response_body = response_body[0]["tasks"] assigned = response_body.find { |task| task["id"] == task8.id.to_s } diff --git a/spec/feature/queue/task_queue_spec.rb b/spec/feature/queue/task_queue_spec.rb index 17abaa934ef..0a0ff5afded 100644 --- a/spec/feature/queue/task_queue_spec.rb +++ b/spec/feature/queue/task_queue_spec.rb @@ -1013,9 +1013,6 @@ def validate_pulac_cerullo_tasks_created(task_class, label) it "should display both legacy and caseflow review tasks" do visit("/queue") expect(page).to have_content(COPY::USER_QUEUE_PAGE_TABLE_TITLE) - expect(page).to have_content(COPY::QUEUE_PAGE_ASSIGNED_TAB_TITLE, 2) - expect(page).to have_content(COPY::QUEUE_PAGE_ON_HOLD_TAB_TITLE, 0) - expect(page).to have_content(COPY::QUEUE_PAGE_COMPLETE_TAB_TITLE) end it "should be able to add admin actions from case details" do