Skip to content

Commit

Permalink
Revert "Paula/caseflow 1126 judge tabs (#16125)"
Browse files Browse the repository at this point in the history
This reverts commit 41ad80d.
  • Loading branch information
pbradin authored Apr 16, 2021
1 parent 00a2efb commit 2656f29
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 10 deletions.
1 change: 0 additions & 1 deletion app/models/queue_tabs/assigned_tasks_tab.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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?

Expand Down
2 changes: 0 additions & 2 deletions app/models/queue_tabs/completed_tasks_tab.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 0 additions & 2 deletions app/models/queue_tabs/on_hold_tasks_tab.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 1 addition & 2 deletions spec/controllers/tasks_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
3 changes: 0 additions & 3 deletions spec/feature/queue/task_queue_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2656f29

Please sign in to comment.