Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paula/caseflow 1126 judge tabs #16125

Merged
merged 15 commits into from
Apr 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/models/queue_tabs/assigned_tasks_tab.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ 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: 2 additions & 0 deletions app/models/queue_tabs/completed_tasks_tab.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ 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: 2 additions & 0 deletions app/models/queue_tabs/on_hold_tasks_tab.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ 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: 0 additions & 2 deletions app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,6 @@ def use_task_pages_api?
end

def queue_tabs
return [assigned_tasks_tab] if judge_in_vacols? && !attorney_in_vacols?

pbradin marked this conversation as resolved.
Show resolved Hide resolved
[
assigned_tasks_tab,
on_hold_tasks_tab,
Expand Down
3 changes: 2 additions & 1 deletion spec/controllers/tasks_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@
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"]
expect(response_body.size).to eq 1
# judges should now have assigned, on-hold, and completed tabs
expect(response_body.size).to eq 3
response_body = response_body[0]["tasks"]

assigned = response_body.find { |task| task["id"] == task8.id.to_s }
Expand Down
3 changes: 3 additions & 0 deletions spec/feature/queue/task_queue_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1013,6 +1013,9 @@ 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)
pbradin marked this conversation as resolved.
Show resolved Hide resolved
end

it "should be able to add admin actions from case details" do
Expand Down