diff --git a/app/javascript/controllers/annotations_controller.js b/app/javascript/controllers/annotations_controller.js index 50a2119..187716c 100644 --- a/app/javascript/controllers/annotations_controller.js +++ b/app/javascript/controllers/annotations_controller.js @@ -88,6 +88,7 @@ export default class extends ApplicationController { if(status === "success") { $(".btn-close-x").trigger("click") $this.stimulate("AnnotationReflex#render_annotations_views", { page: 1 }) + $this.stimulate("AnnotationReflex#render_default_case_lists_search", doctrine_id) } }) } diff --git a/app/reflexes/annotation_reflex.rb b/app/reflexes/annotation_reflex.rb index dfff1c0..f9d6240 100644 --- a/app/reflexes/annotation_reflex.rb +++ b/app/reflexes/annotation_reflex.rb @@ -17,4 +17,8 @@ class AnnotationReflex < ApplicationReflex morph "#annotationsIndexView", render(partial: "/shared/annotations_index_view", locals: { annotations: @annotations, opts: { doctrine_id: search_params[:doctrine_id], current_page: search_params[:page] } }) end + + def render_default_case_lists_search(doctrine_id) + morph "#caseListsCollapse", render(partial: "/shared/case_lists_no_results", locals: { doctrine_id: doctrine_id }) + end end diff --git a/app/views/shared/_case_lists_no_results.html.erb b/app/views/shared/_case_lists_no_results.html.erb new file mode 100644 index 0000000..fca4fe6 --- /dev/null +++ b/app/views/shared/_case_lists_no_results.html.erb @@ -0,0 +1,19 @@ +
+
+ <%= text_field_tag :q, nil, class: "form-control", placeholder: "Search GR Number", data: { target: "document.input" } %> +
+
+ <%= button_tag "Search", class: "btn btn-success", data: { action: "click->document#search" } %> +
+
+ +
+ + + + + + + +
Reference No. Title Date
+