generated from dxw/rails-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A tasklist tab is needed for the school collab project to show procops what tasks there are to complete for an evaluation. This is only for level 4 and 5 cases. At the moment, it is showing tasks but it is not functional and pages will be added one by one. It is behind a feature flag sc_tasklist_tab so the page is hidden until fully ready for procops.
- Loading branch information
1 parent
9a9d1bb
commit bd17db5
Showing
9 changed files
with
120 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module Support | ||
module Cases | ||
class TasklistsController < Cases::ApplicationController | ||
private | ||
|
||
def current_case | ||
@current_case ||= CasePresenter.new(super) | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,17 @@ | ||
<%= render "support/cases/show/tabs" do %> | ||
<%= render "support/cases/show/school_details", current_case: @current_case %> | ||
<%= render "support/cases/show/case_details", current_case: @current_case %> | ||
<%= render "support/cases/show/request_details", current_case: @current_case %> | ||
<%= render "support/cases/show/tabs" do %> | ||
<%= render "support/cases/show/tasklist", current_case: @current_case %> | ||
<%= render "support/cases/show/school_details", current_case: @current_case %> | ||
<%= render "support/cases/show/case_details", current_case: @current_case %> | ||
<%= render "support/cases/show/request_details", current_case: @current_case %> | ||
|
||
<div class="govuk-tabs__panel govuk-tabs__panel--hidden" id="messages" role="tabpanel" aria-labelledby="tab_messages" aria-live="polite"> | ||
<%= turbo_frame_tag "messages-frame", src: params[:messages_tab_url].presence || support_case_message_threads_path(@current_case) do %> | ||
<p class="govuk-body">Loading...</p> | ||
<% end %> | ||
</div> | ||
<div class="govuk-tabs__panel govuk-tabs__panel--hidden" id="messages" role="tabpanel" aria-labelledby="tab_messages" aria-live="polite"> | ||
<%= turbo_frame_tag "messages-frame", src: params[:messages_tab_url].presence || support_case_message_threads_path(@current_case) do %> | ||
<p class="govuk-body">Loading...</p> | ||
<% end %> | ||
</div> | ||
|
||
<%= render "support/cases/show/case_history", interactions: @current_case.case_history_interactions, current_case: @current_case %> | ||
<%= render "support/cases/show/case_attachments", current_case: @current_case %> | ||
<%= render "support/cases/show/case_files", current_case: @current_case %> | ||
<% end %> | ||
<%= render "support/cases/show/case_history", interactions: @current_case.case_history_interactions, current_case: @current_case %> | ||
<%= render "support/cases/show/case_attachments", current_case: @current_case %> | ||
<%= render "support/cases/show/case_files", current_case: @current_case %> | ||
<% end %> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<div class="govuk-tabs__panel govuk-tabs__panel--hidden" id="tasklist"> | ||
<h2 class="govuk-heading-l"> | ||
<%= I18n.t("support.case.header.procurement_task_list") %> | ||
</h2> | ||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-one-half"> | ||
<h3 class="govuk-heading-m"> | ||
<%= I18n.t("support.case.label.tasklist.complete_evaluation") %> | ||
</h3> | ||
<%= govuk_task_list(id_prefix: "complete-evaluation") do |task_list| | ||
task_list.with_item(title: I18n.t("support.case.label.tasklist.item.add_evaluators"), href: '#', status: govuk_tag(text: I18n.t("support.case.label.tasklist.status.to_do"))) | ||
task_list.with_item(title: I18n.t("support.case.label.tasklist.item.set_due_date"), href: '#', status: govuk_tag(text: I18n.t("support.case.label.tasklist.status.to_do"))) | ||
task_list.with_item(title: I18n.t("support.case.label.tasklist.item.upload_documents"), href: '#', status: govuk_tag(text: I18n.t("support.case.label.tasklist.status.to_do"))) | ||
task_list.with_item(title: I18n.t("support.case.label.tasklist.item.email_evaluators")) do | item | | ||
item.with_status(text: I18n.t("support.case.label.tasklist.status.cannot_start"), cannot_start_yet: true) | ||
end | ||
task_list.with_item(title: I18n.t("support.case.label.tasklist.item.review_evaluations")) do | item | | ||
item.with_status(text: I18n.t("support.case.label.tasklist.status.cannot_start"), cannot_start_yet: true) | ||
end | ||
end %> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
describe "Case tasklist", :js do | ||
include_context "with an agent" | ||
|
||
before do | ||
visit "/support/cases/#{support_case.id}#tasklist" | ||
end | ||
|
||
context "when a case is level 4 (or 5)" do | ||
let(:support_case) { create(:support_case, support_level: "L4") } | ||
|
||
it "has a tasklist tab with a tasklist and items" do | ||
within "#tasklist" do | ||
expect(page).to have_text("Procurement task list") | ||
expect(page).to have_text("Complete evaluation") | ||
expect(page).to have_css(".govuk-task-list") | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters