Skip to content

Commit

Permalink
Add evaluators link and status change funtionality to tasklist
Browse files Browse the repository at this point in the history
  • Loading branch information
serenaabbott11 committed Dec 3, 2024
1 parent df1ddda commit 30e9263
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/support/cases/evaluators_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module Support
class Cases::EvaluatorsController < Cases::ApplicationController
before_action :set_current_case
before_action :set_evaluator, only: %i[edit update destroy]

before_action { @back_url = "/support/cases/#{params[:case_id]}#tasklist" }
def index
@evaluators = @current_case.evaluators.all
end
Expand Down
2 changes: 1 addition & 1 deletion app/views/support/cases/show/_tasklist.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<%= 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.add_evaluators"), href: support_case_evaluators_path(@current_case), status: @current_case.evaluators.present? ? govuk_tag(text: I18n.t("support.case.label.tasklist.status.complete"), colour: "green") : 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 |
Expand Down

0 comments on commit 30e9263

Please sign in to comment.