diff --git a/app/javascript/controllers/tasklist_controller.js b/app/javascript/controllers/tasklist_controller.js new file mode 100644 index 000000000..be94797f8 --- /dev/null +++ b/app/javascript/controllers/tasklist_controller.js @@ -0,0 +1,8 @@ +import { Controller } from "@hotwired/stimulus" + +export default class extends Controller { + addHighlight() { + let section_to_highlight = this.element.dataset.info; + document.getElementById(section_to_highlight).classList.add('tasklist_item_highlight'); + } +} diff --git a/app/views/case_logs/edit.html.erb b/app/views/case_logs/edit.html.erb index 4a77253f6..f4e2d346d 100644 --- a/app/views/case_logs/edit.html.erb +++ b/app/views/case_logs/edit.html.erb @@ -9,7 +9,10 @@

You've completed <%= get_sections_count(@form, @case_log, :completed) %> of <%= get_sections_count(@form, @case_log, :all) %> sections.

<% next_incomplete_section=get_next_incomplete_section(@form, @case_log) %> - + > Skip to next incomplete section