diff --git a/app/components/annotation_marks_modal_form_component/annotation_marks_modal_form_component.html.erb b/app/components/annotation_marks_modal_form_component/annotation_marks_modal_form_component.html.erb index 9c99070..bbd0cbc 100644 --- a/app/components/annotation_marks_modal_form_component/annotation_marks_modal_form_component.html.erb +++ b/app/components/annotation_marks_modal_form_component/annotation_marks_modal_form_component.html.erb @@ -37,8 +37,8 @@
| Reference No. | -Date | Title | +Date | diff --git a/app/components/document_doctrine_show_component/document_doctrine_show_component.html.erb b/app/components/document_doctrine_show_component/document_doctrine_show_component.html.erb index 5e11d8c..6569abf 100644 --- a/app/components/document_doctrine_show_component/document_doctrine_show_component.html.erb +++ b/app/components/document_doctrine_show_component/document_doctrine_show_component.html.erb @@ -106,8 +106,8 @@ |
|---|
| Reference No. | -Date | Title | +Date | diff --git a/app/javascript/controllers/document_controller.js b/app/javascript/controllers/document_controller.js index 48d58fb..91c7495 100644 --- a/app/javascript/controllers/document_controller.js +++ b/app/javascript/controllers/document_controller.js @@ -10,7 +10,7 @@ export default class extends ApplicationController { search () { var $this = this - $.get("/api/jurisprudences.json", { q: $this.inputTarget.value }, function (data, status) { + $.get("/api/documents.json", { q: $this.inputTarget.value }, function (data, status) { if (status === "success") { $this.stimulate("DocumentReflex#render_index_table", data, $this.element.dataset["documentId"], $this.element.dataset["doctrineId"]) } @@ -50,7 +50,7 @@ export default class extends ApplicationController { } addCitingDocument () { - var document_id = "", document_ref_no = "", $modal = $("#newAnnotationModal"), $doc_title = $modal.find("#document_title") + var document_id = "", document_ref_no = "", document_date = "", document_title = "", $modal = $("#newAnnotationModal"), $doc_title = $modal.find("#document_title") document_id = this.element.dataset["documentId"] document_ref_no = this.element.dataset["documentReferenceNumber"] @@ -59,8 +59,6 @@ export default class extends ApplicationController { var document_ids = [] - console.log($("#document_ids").val() === "") - if ($("#document_ids").val() === "") { document_ids.push(document_id) } else { diff --git a/app/views/document/doctrines/_document_search_results_table.html.erb b/app/views/document/doctrines/_document_search_results_table.html.erb index ee4c564..8928eb5 100644 --- a/app/views/document/doctrines/_document_search_results_table.html.erb +++ b/app/views/document/doctrines/_document_search_results_table.html.erb @@ -2,15 +2,15 @@ | |
|---|---|---|---|---|---|
| <%= search_result["reference_number"] %> | <%= search_result["short_title"] || search_result["title"] %> | -<%= search_result["docdate"].present? ? search_result["docdate"].to_date.strftime("%m/%d/%Y") : search_result["year"] %> | +<%= search_result["doc_date"].present? ? search_result["doc_date"].to_date.strftime("%m/%d/%Y") : search_result["year"] %> | <% if opts[:is_case_lists].present? && opts[:document_id].present? && opts[:doctrine_id].present? %>- <% date_or_year = search_result["docdate"].present? ? search_result["docdate"].to_date.strftime("%B %d, %Y") : search_result["year"] %> + <% date_or_year = search_result["doc_date"].present? ? search_result["doc_date"].to_date.strftime("%B %d, %Y") : search_result["year"] %> <% title = search_result["short_title"].present? ? search_result["short_title"] : search_result["title"] %> " data-document-reference-number="<%= search_result["reference_number"] %>" - data-document-date-or-year="<%= date_or_year %>" data-document-phil-rep="<%= search_result["phil_rep"] %>" + data-document-id="<%= search_result['id'] %>" data-document-reference-number="<%= search_result['reference_number'] %>" + data-document-date-or-year="<%= date_or_year %>" data-document-phil-rep="<%= search_result['phil_rep'] %>" data-action="click->document#loadFormDocumentDetais"> Add Annotations @@ -20,12 +20,12 @@ <% if opts[:is_citing_document].present? %> | " - data-document-reference-number="<%= search_result["reference_number"] %>" - data-document-date="<%= search_result["docdate"].present? ? search_result["docdate"].to_date.strftime("%B %d, %Y") : search_result["year"] %>" - data-document-title="<%= search_result["short_title"] || search_result["title"] %>"> + data-document-reference-number="<%= search_result['reference_number'] %>" + data-document-date="<%= search_result['doc_date'].present? ? search_result['doc_date'].to_date.strftime('%B %d, %Y') : search_result['year'] %>" + data-document-title="<%= search_result['short_title'] || search_result['title'] %>"> Add | <% end %>