From 93b89b031537cf816975aeca7d32183c11d20141 Mon Sep 17 00:00:00 2001
From: Steven Meyers
Date: Fri, 2 Oct 2020 19:06:04 -0500
Subject: [PATCH 1/5] Add court_report_submission CasaCaseDecorator method
---
app/decorators/casa_case_decorator.rb | 4 ++++
spec/decorators/case_decorator_spec.rb | 22 ++++++++++++++++++++++
2 files changed, 26 insertions(+)
create mode 100644 spec/decorators/case_decorator_spec.rb
diff --git a/app/decorators/casa_case_decorator.rb b/app/decorators/casa_case_decorator.rb
index 67b2bbc342..ed7546051d 100644
--- a/app/decorators/casa_case_decorator.rb
+++ b/app/decorators/casa_case_decorator.rb
@@ -9,6 +9,10 @@ def transition_aged_youth_only_icon
object.transition_aged_youth ? "šš¦" : ""
end
+ def court_report_submission
+ object.court_report_submitted ? "Submitted" : "Not Submitted"
+ end
+
def case_contacts_ordered_by_occurred_at
object.case_contacts.sort_by(&:occurred_at)
end
diff --git a/spec/decorators/case_decorator_spec.rb b/spec/decorators/case_decorator_spec.rb
new file mode 100644
index 0000000000..23ad63c940
--- /dev/null
+++ b/spec/decorators/case_decorator_spec.rb
@@ -0,0 +1,22 @@
+require "rails_helper"
+
+RSpec.describe CasaCaseDecorator do
+ describe "#court_report_submission" do
+ context "when case_report_submitted is false" do
+ it "returns Not Submitted" do
+ casa_case = create(:casa_case)
+
+ expect(casa_case.decorate.court_report_submission).to eq "Not Submitted"
+ end
+ end
+
+ context "when duration_minutes is greater than 60" do
+ it "when court_report_submitted is true" do
+ casa_case = create(:casa_case)
+ casa_case.court_report_submitted = true
+
+ expect(casa_case.decorate.court_report_submission).to eq "Submitted"
+ end
+ end
+ end
+end
From d3152d4a590dbd42e0c958706cdbb71c055b4d4a Mon Sep 17 00:00:00 2001
From: Steven Meyers
Date: Fri, 2 Oct 2020 19:31:53 -0500
Subject: [PATCH 2/5] Add test for supervisor updating court report status
---
spec/system/supervisor_edits_case_spec.rb | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/spec/system/supervisor_edits_case_spec.rb b/spec/system/supervisor_edits_case_spec.rb
index b33481d585..9f4d79f134 100644
--- a/spec/system/supervisor_edits_case_spec.rb
+++ b/spec/system/supervisor_edits_case_spec.rb
@@ -10,10 +10,12 @@
before do
sign_in supervisor
- visit edit_casa_case_path(casa_case)
end
it "edits case" do
+ visit casa_case_path(casa_case)
+ expect(page).to have_text("Court Report Submission: Not Submitted")
+ visit edit_casa_case_path(casa_case)
has_no_checked_field? :court_report_submitted
check "Court report submitted"
check "Youth"
@@ -21,5 +23,7 @@
has_checked_field? :court_report_submitted
has_checked_field? "Youth"
has_no_checked_field? "Supervisor"
+ visit casa_case_path(casa_case)
+ expect(page).to have_text("Court Report Submission: Submitted")
end
end
From c422f1e4b540030c385e4d73d8aacd641c0e55a3 Mon Sep 17 00:00:00 2001
From: Steven Meyers
Date: Fri, 2 Oct 2020 19:32:23 -0500
Subject: [PATCH 3/5] Add test for volunteer updating court report status
---
spec/system/volunteer_edits_case_spec.rb | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/spec/system/volunteer_edits_case_spec.rb b/spec/system/volunteer_edits_case_spec.rb
index 5a86c8b300..1e5ecc2755 100644
--- a/spec/system/volunteer_edits_case_spec.rb
+++ b/spec/system/volunteer_edits_case_spec.rb
@@ -7,10 +7,10 @@
before do
sign_in volunteer
- visit edit_casa_case_path(casa_case)
end
it "clicks back button after editing case" do
+ visit edit_casa_case_path(casa_case)
check "Court report submitted"
click_on "Update CASA Case"
@@ -22,9 +22,14 @@
end
it "edits case" do
+ visit casa_case_path(casa_case)
+ expect(page).to have_text("Court Report Submission: Not Submitted")
+ visit edit_casa_case_path(casa_case)
has_no_checked_field? :court_report_submitted
check "Court report submitted"
click_on "Update CASA Case"
has_checked_field? :court_report_submitted
+ visit casa_case_path(casa_case)
+ expect(page).to have_text("Court Report Submission: Submitted")
end
end
From f52b0ad59cb539734866cdd6c7d9e5dc33ad66c1 Mon Sep 17 00:00:00 2001
From: Steven Meyers
Date: Fri, 2 Oct 2020 19:33:05 -0500
Subject: [PATCH 4/5] Use decorator to render court report status
---
app/views/casa_cases/show.html.erb | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/app/views/casa_cases/show.html.erb b/app/views/casa_cases/show.html.erb
index cd57f35546..b46d8bc86e 100644
--- a/app/views/casa_cases/show.html.erb
+++ b/app/views/casa_cases/show.html.erb
@@ -22,6 +22,10 @@
Transition Aged Youth: <%= @casa_case.decorate.transition_aged_youth_icon %>
+
+
Court Report Submission: <%= @casa_case.decorate.court_report_submission %>
+
+
Assigned Volunteers:
<% policy_scope(@casa_case.volunteers).each_with_index do |volunteer, index| %>
From 43735de93eea28cde7a5d3c3dea74ecd7236b179 Mon Sep 17 00:00:00 2001
From: Steven Meyers
Date: Fri, 2 Oct 2020 20:19:37 -0500
Subject: [PATCH 5/5] Run 3 cleanup linter tasks
---
app/controllers/casa_admins_controller.rb | 3 ++-
.../contact_type_groups_controller.rb | 17 ++++++-------
app/controllers/contact_types_controller.rb | 5 ++--
app/controllers/imports_controller.rb | 12 +++++-----
app/helpers/ui_helper.rb | 4 ++--
app/javascript/packs/application.js | 3 +--
app/javascript/src/case_contact.js | 24 +++++++++----------
app/javascript/src/sidebar.js | 10 ++++----
app/lib/importers/case_importer.rb | 19 +++++++--------
app/lib/importers/file_importer.rb | 10 ++++----
app/lib/importers/supervisor_importer.rb | 18 +++++++-------
app/lib/importers/volunteer_importer.rb | 2 +-
app/models/casa_case.rb | 10 ++++----
app/models/case_contact.rb | 6 +++--
app/models/contact_type.rb | 2 +-
app/models/user.rb | 2 +-
app/policies/casa_case_policy.rb | 2 +-
.../all_casa_admins/dashboard/show.html.erb | 4 ++--
.../casa_admin_mailer/account_setup.html.erb | 1 -
app/views/casa_cases/_form.html.erb | 2 +-
.../casa_cases/_volunteer_assignment.html.erb | 2 +-
app/views/casa_cases/index.html.erb | 2 +-
.../case_contacts/_case_contact.html.erb | 6 ++---
.../_confirm_note_content_dialog.html.erb | 2 +-
app/views/case_contacts/_form.html.erb | 2 --
app/views/case_contacts/index.html.erb | 2 +-
.../mailer/invitation_instructions.html.erb | 4 ++--
app/views/imports/_cases.html.erb | 3 +--
app/views/imports/_supervisors.html.erb | 2 +-
app/views/imports/_volunteers.html.erb | 2 +-
app/views/layouts/application.html.erb | 2 +-
.../layouts/footers/_not_logged_in.html.erb | 2 +-
app/views/supervisors/index.html.erb | 2 +-
app/views/volunteers/index.html.erb | 2 +-
...308_link_case_contacts_to_contact_types.rb | 2 +-
.../decorators/case_contact_decorator_spec.rb | 4 ++--
spec/factories/casa_org.rb | 2 +-
spec/helpers/application_helper_spec.rb | 4 ++--
spec/lib/importers/file_importer_spec.rb | 2 +-
spec/models/casa_case_spec.rb | 2 +-
spec/models/case_contact_spec.rb | 2 +-
.../case_contact_policy_spec.rb | 4 ++--
spec/requests/casa_admins_spec.rb | 6 ++---
spec/requests/casa_cases_spec.rb | 8 +++----
spec/requests/case_contacts_spec.rb | 2 +-
spec/requests/contact_type_groups_spec.rb | 4 ++--
spec/requests/contact_type_spec.rb | 4 ++--
spec/requests/imports_request_spec.rb | 6 ++---
spec/support/capybara.rb | 10 ++++----
spec/support/pundit_helper.rb | 2 +-
spec/system/creating_casa_admins_spec.rb | 1 -
spec/system/supervisor_edits_case_spec.rb | 2 +-
.../volunteer_adds_a_case_contact_spec.rb | 2 +-
.../case_contacts/index.html.erb_spec.rb | 2 +-
spec/views/dashboard/show.html.erb_spec.rb | 1 -
55 files changed, 128 insertions(+), 135 deletions(-)
diff --git a/app/controllers/casa_admins_controller.rb b/app/controllers/casa_admins_controller.rb
index 1cdd1f6564..2623a26f9a 100644
--- a/app/controllers/casa_admins_controller.rb
+++ b/app/controllers/casa_admins_controller.rb
@@ -7,7 +7,8 @@ def index
@admins = policy_scope(current_organization.casa_admins)
end
- def edit; end
+ def edit
+ end
def update
if @casa_admin.update(update_casa_admin_params)
diff --git a/app/controllers/contact_type_groups_controller.rb b/app/controllers/contact_type_groups_controller.rb
index fa5d5bc4ca..5df7765f2c 100644
--- a/app/controllers/contact_type_groups_controller.rb
+++ b/app/controllers/contact_type_groups_controller.rb
@@ -16,7 +16,8 @@ def create
end
end
- def edit; end
+ def edit
+ end
def update
if @contact_type_group.update(contact_type_group_params)
@@ -26,13 +27,13 @@ def update
end
end
-private
+ private
- def contact_type_group_params
- params.require(:contact_type_group).permit(:name, :active)
- end
+ def contact_type_group_params
+ params.require(:contact_type_group).permit(:name, :active)
+ end
- def set_contact_type_group
- @contact_type_group = ContactTypeGroup.find(params[:id])
- end
+ def set_contact_type_group
+ @contact_type_group = ContactTypeGroup.find(params[:id])
+ end
end
diff --git a/app/controllers/contact_types_controller.rb b/app/controllers/contact_types_controller.rb
index 612c5fe26e..d9690fd279 100644
--- a/app/controllers/contact_types_controller.rb
+++ b/app/controllers/contact_types_controller.rb
@@ -19,7 +19,8 @@ def create
end
end
- def edit; end;
+ def edit
+ end
def update
if @contact_type.update(contact_type_params)
@@ -29,7 +30,7 @@ def update
end
end
-private
+ private
def set_group_options
@group_options = ContactTypeGroup.for_organization(current_organization).collect { |group| [group.name, group.id] }
diff --git a/app/controllers/imports_controller.rb b/app/controllers/imports_controller.rb
index 554a0f392d..bea0ea5cf5 100644
--- a/app/controllers/imports_controller.rb
+++ b/app/controllers/imports_controller.rb
@@ -16,7 +16,7 @@ def create
# If there were failed imports
if import[:exported_rows]
- message << "" + link_to("Click here to download failed rows.", download_failed_imports_path) +
+ message << "
" + link_to("Click here to download failed rows.", download_failed_imports_path) +
"
" + "#{ERR_FAILED_IMPORT_NOTE}
"
session[:exported_rows] = import[:exported_rows]
end
@@ -51,7 +51,7 @@ def header
{
"volunteer" => VolunteerImporter::IMPORT_HEADER,
"supervisor" => SupervisorImporter::IMPORT_HEADER,
- "casa_case" => CaseImporter::IMPORT_HEADER,
+ "casa_case" => CaseImporter::IMPORT_HEADER
}
end
@@ -98,10 +98,10 @@ def validate_file(file, import_type)
unless header_valid?(file_header, import_type)
message = "#{ERR_INVALID_HEADER}" \
- "Expected Header: #{header[import_type].to_s}.
" \
- "Received Header: #{file_header.to_s}
"
-
- return {type: :error, message: message}
+ "Expected Header: #{header[import_type]}." \
+ "Received Header: #{file_header}
"
+
+ {type: :error, message: message}
end
end
end
diff --git a/app/helpers/ui_helper.rb b/app/helpers/ui_helper.rb
index 282b79a3d0..599ec5f0a4 100644
--- a/app/helpers/ui_helper.rb
+++ b/app/helpers/ui_helper.rb
@@ -9,13 +9,13 @@ def grouped_options_for_assigning_case(volunteer)
"Not Assigned",
CasaCase
.not_assigned(@volunteer.casa_org)
- .map{ |casa_case| [casa_case.case_number, casa_case.id] }
+ .map { |casa_case| [casa_case.case_number, casa_case.id] }
],
[
"Assigned",
CasaCase
.actively_assigned_excluding_volunteer(@volunteer)
- .map{ |casa_case| [casa_case.case_number, casa_case.id] }
+ .map { |casa_case| [casa_case.case_number, casa_case.id] }
]
]
end
diff --git a/app/javascript/packs/application.js b/app/javascript/packs/application.js
index 9ca27e813e..527215a590 100644
--- a/app/javascript/packs/application.js
+++ b/app/javascript/packs/application.js
@@ -6,9 +6,9 @@
// this is how stylesheets are loaded into the running application
import 'src/stylesheets/application.scss'
-
import 'bootstrap'
import 'bootstrap-select'
+import Select2 from 'select2'
require('@rails/ujs').start()
require('@rails/activestorage').start()
require('channels')
@@ -16,7 +16,6 @@ require('jquery')
require('bootstrap-datepicker')
require('datatables.net-dt')
require('datatables.net-dt/css/jquery.dataTables.css')
-import Select2 from 'select2'
require('select2')
require('select2/dist/css/select2')
diff --git a/app/javascript/src/case_contact.js b/app/javascript/src/case_contact.js
index 304fca5dca..0a003fdbeb 100644
--- a/app/javascript/src/case_contact.js
+++ b/app/javascript/src/case_contact.js
@@ -70,29 +70,29 @@ window.onload = function () {
}
function validateNoteContent (e) {
- const note_content = document.getElementById('case_contact_notes').value;
+ const note_content = document.getElementById('case_contact_notes').value
if (note_content != '') {
- e.preventDefault();
- $('#confirm-submit').modal('show');
- document.getElementById('note-content').innerHTML = note_content;
+ e.preventDefault()
+ $('#confirm-submit').modal('show')
+ document.getElementById('note-content').innerHTML = note_content
}
}
- $('#casa-contact-form').submit(function(e) {
+ $('#casa-contact-form').submit(function (e) {
validateNoteContent(e)
- });
+ })
- $("#confirm-submit").on("focus", function () {
- document.getElementById('modal-case-contact-submit').disabled = false;
- });
+ $('#confirm-submit').on('focus', function () {
+ document.getElementById('modal-case-contact-submit').disabled = false
+ })
- $("#confirm-submit").on("hide.bs.modal", function () {
+ $('#confirm-submit').on('hide.bs.modal', function () {
caseContactSubmit.disabled = false
- });
+ })
const caseContactSubmitFromModal = document.getElementById('modal-case-contact-submit')
caseContactSubmitFromModal.onclick = function () {
- $('#casa-contact-form').unbind("submit");
+ $('#casa-contact-form').unbind('submit')
}
caseContactSubmit.onclick = function (e) {
diff --git a/app/javascript/src/sidebar.js b/app/javascript/src/sidebar.js
index 0062476fdb..ede772ec31 100644
--- a/app/javascript/src/sidebar.js
+++ b/app/javascript/src/sidebar.js
@@ -1,13 +1,13 @@
/* global $ */
-function toggleSidebar() {
- const isOpen = $( "#sidebar-js" ).hasClass( "sidebar-open" );
+function toggleSidebar () {
+ const isOpen = $('#sidebar-js').hasClass('sidebar-open')
if (isOpen) {
- $('#sidebar-js').removeClass('sidebar-open');
+ $('#sidebar-js').removeClass('sidebar-open')
} else {
- $('#sidebar-js').addClass('sidebar-open');
+ $('#sidebar-js').addClass('sidebar-open')
}
}
$('document').ready(() => {
- $('#toggle-sidebar-js, #sidebar-js').on("click", toggleSidebar);
+ $('#toggle-sidebar-js, #sidebar-js').on('click', toggleSidebar)
})
diff --git a/app/lib/importers/case_importer.rb b/app/lib/importers/case_importer.rb
index 959c2b88c7..2c18af4909 100644
--- a/app/lib/importers/case_importer.rb
+++ b/app/lib/importers/case_importer.rb
@@ -19,15 +19,13 @@ def import_cases
failures << "Case #{case_number} already exists" if result[:existing]
volunteers = email_addresses_to_users(Volunteer, String(row[:case_assignment]))
volunteers.each do |volunteer|
- begin
- if volunteer.casa_cases.exists?(casa_case.id)
- failures << "Volunteer #{volunteer.email} already assigned to #{case_number}"
- else
- casa_case.volunteers << volunteer
- end
- rescue StandardError => error
- failures << error.to_s
+ if volunteer.casa_cases.exists?(casa_case.id)
+ failures << "Volunteer #{volunteer.email} already assigned to #{case_number}"
+ else
+ casa_case.volunteers << volunteer
end
+ rescue => error
+ failures << error.to_s
end
raise failures.join("\n") unless failures.empty?
@@ -35,18 +33,17 @@ def import_cases
end
end
-
private
def create_casa_case(row_data)
casa_case_params = row_data.to_hash.slice(:case_number, :transition_aged_youth, :birth_month_year_youth)
casa_case = CasaCase.find_by(casa_case_params)
- return { casa_case: casa_case, existing: true } if casa_case.present?
+ return {casa_case: casa_case, existing: true} if casa_case.present?
casa_case = CasaCase.new(casa_case_params)
casa_case.casa_org_id = org_id
casa_case.save!
- { casa_case: casa_case, existing: false }
+ {casa_case: casa_case, existing: false}
end
end
diff --git a/app/lib/importers/file_importer.rb b/app/lib/importers/file_importer.rb
index 0fb708560e..d6cd334973 100644
--- a/app/lib/importers/file_importer.rb
+++ b/app/lib/importers/file_importer.rb
@@ -23,7 +23,7 @@ def import
@file_no_rows = false
yield(row)
@number_imported += 1
- rescue StandardError => error
+ rescue => error
# email for supervisor or volunteer
# display name for supervisor or volunteer
# case number for casa_case
@@ -41,14 +41,14 @@ def import
}
end
-private
+ private
def failed?
!failed_imports.blank?
end
def success?
- !failed? && !@file_no_rows
+ !failed? && !@file_no_rows
end
def message
@@ -86,12 +86,12 @@ def email_addresses_to_users(clazz, comma_separated_emails)
def create_user_record(user_class, row_data)
user_params = row_data.to_hash.slice(:display_name, :email)
user = user_class.find_by(user_params)
- return { user: user, existing: true } if user.present?
+ return {user: user, existing: true} if user.present?
user = user_class.new(user_params)
user.casa_org_id, user.password = org_id, SecureRandom.hex(10)
user.save!
user.invite!
- { user: user, existing: false }
+ {user: user, existing: false}
end
end
diff --git a/app/lib/importers/supervisor_importer.rb b/app/lib/importers/supervisor_importer.rb
index 955a329a8b..3350914adc 100644
--- a/app/lib/importers/supervisor_importer.rb
+++ b/app/lib/importers/supervisor_importer.rb
@@ -1,6 +1,6 @@
class SupervisorImporter < FileImporter
IMPORT_HEADER = ["email", "display_name", "supervisor_volunteers"]
-
+
def self.import_supervisors(csv_filespec, org_id)
new(csv_filespec, org_id).import_supervisors
end
@@ -17,17 +17,15 @@ def import_supervisors
failures = []
failures << "Supervisor #{supervisor.email} already exists" if result[:existing]
email_addresses_to_users(Volunteer, String(row[:supervisor_volunteers])).each do |volunteer|
- begin
- if volunteer.supervisor
- next if volunteer.supervisor == supervisor
+ if volunteer.supervisor
+ next if volunteer.supervisor == supervisor
- failures << "Volunteer #{volunteer.email} already has a supervisor"
- else
- supervisor.volunteers << volunteer
- end
- rescue StandardError => error
- failures << error.to_s
+ failures << "Volunteer #{volunteer.email} already has a supervisor"
+ else
+ supervisor.volunteers << volunteer
end
+ rescue => error
+ failures << error.to_s
end
end
diff --git a/app/lib/importers/volunteer_importer.rb b/app/lib/importers/volunteer_importer.rb
index ec945c4752..d8fda509fa 100644
--- a/app/lib/importers/volunteer_importer.rb
+++ b/app/lib/importers/volunteer_importer.rb
@@ -1,6 +1,6 @@
class VolunteerImporter < FileImporter
IMPORT_HEADER = ["display_name", "email"]
-
+
def self.import_volunteers(csv_filespec, org_id)
new(csv_filespec, org_id).import_volunteers
end
diff --git a/app/models/casa_case.rb b/app/models/casa_case.rb
index f44404fd01..4142f7fd75 100644
--- a/app/models/casa_case.rb
+++ b/app/models/casa_case.rb
@@ -17,16 +17,16 @@ class CasaCase < ApplicationRecord
case_assignments: {volunteer: volunteer, is_active: true}
)
}
- scope :actively_assigned_excluding_volunteer, -> (volunteer) {
+ scope :actively_assigned_excluding_volunteer, ->(volunteer) {
joins(:case_assignments)
- .where(case_assignments: { is_active: true })
- .where.not(case_assignments: { volunteer: volunteer })
+ .where(case_assignments: {is_active: true})
+ .where.not(case_assignments: {volunteer: volunteer})
.order(:case_number)
}
- scope :not_assigned, -> (casa_org) {
+ scope :not_assigned, ->(casa_org) {
where(casa_org_id: casa_org.id)
.left_outer_joins(:case_assignments)
- .where(case_assignments: { id: nil })
+ .where(case_assignments: {id: nil})
.order(:case_number)
}
diff --git a/app/models/case_contact.rb b/app/models/case_contact.rb
index 3725516be6..6890d26f93 100644
--- a/app/models/case_contact.rb
+++ b/app/models/case_contact.rb
@@ -42,8 +42,10 @@ class CaseContact < ApplicationRecord
where(want_driving_reimbursement: want_driving_reimbursement) if want_driving_reimbursement == true || want_driving_reimbursement == false
}
scope :contact_type, ->(contact_type = nil) {
- joins(:db_contact_types)
- .where("contact_types.name in (?)", contact_type) if contact_type.present?
+ if contact_type.present?
+ joins(:db_contact_types)
+ .where("contact_types.name in (?)", contact_type)
+ end
}
IN_PERSON = "in-person".freeze
diff --git a/app/models/contact_type.rb b/app/models/contact_type.rb
index a2e37ada09..bfd03c89d3 100644
--- a/app/models/contact_type.rb
+++ b/app/models/contact_type.rb
@@ -5,7 +5,7 @@ class ContactType < ApplicationRecord
scope :for_organization, ->(org) {
joins(:contact_type_group)
- .where(contact_type_groups: { casa_org: org })
+ .where(contact_type_groups: {casa_org: org})
}
end
diff --git a/app/models/user.rb b/app/models/user.rb
index 415c1af067..a02c11b7f7 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -84,7 +84,7 @@ def no_contact_for_two_weeks
# Get ACTIVE volunteers that have ACTIVE supervisor assignments with at least one ACTIVE case
# 1st condition: Volunteer has not created a contact AT ALL within the past 14 days
# 2nd condition: Volunteer has ONLY created contacts in which contact_made = false within the past 14 days
-
+
volunteers
.includes(:case_assignments)
.joins("LEFT JOIN case_contacts cc on cc.creator_id = users.id AND cc.occurred_at > (CURRENT_DATE - INTERVAL '14 days')")
diff --git a/app/policies/casa_case_policy.rb b/app/policies/casa_case_policy.rb
index 8f554d71d9..42f2799032 100644
--- a/app/policies/casa_case_policy.rb
+++ b/app/policies/casa_case_policy.rb
@@ -41,7 +41,7 @@ def assign_volunteers?
def permitted_attributes
common_attrs = [
:court_report_submitted,
- casa_case_contact_types_attributes: [:contact_type_id],
+ casa_case_contact_types_attributes: [:contact_type_id]
]
case @user
diff --git a/app/views/all_casa_admins/dashboard/show.html.erb b/app/views/all_casa_admins/dashboard/show.html.erb
index 2ef7e11757..a59087607d 100644
--- a/app/views/all_casa_admins/dashboard/show.html.erb
+++ b/app/views/all_casa_admins/dashboard/show.html.erb
@@ -1,7 +1,7 @@
@@ -24,4 +24,4 @@
-
\ No newline at end of file
+
diff --git a/app/views/casa_admin_mailer/account_setup.html.erb b/app/views/casa_admin_mailer/account_setup.html.erb
index 4dd40fb97f..646087fb64 100644
--- a/app/views/casa_admin_mailer/account_setup.html.erb
+++ b/app/views/casa_admin_mailer/account_setup.html.erb
@@ -16,4 +16,3 @@
-
diff --git a/app/views/casa_cases/_form.html.erb b/app/views/casa_cases/_form.html.erb
index b236cde329..51ff9bee54 100644
--- a/app/views/casa_cases/_form.html.erb
+++ b/app/views/casa_cases/_form.html.erb
@@ -16,7 +16,7 @@
<%= form.label :birth_month_year_youth, "Youth's Birth Month & Year" %>
- <%= form.date_select :birth_month_year_youth, {order: [:month, :year], start_year: Date.current.year, end_year: 1989, prompt: {month: 'Month', year: 'Year'}, discard_day: true }, class: "select2 date-input"%>
+ <%= form.date_select :birth_month_year_youth, {order: [:month, :year], start_year: Date.current.year, end_year: 1989, prompt: {month: 'Month', year: 'Year'}, discard_day: true }, class: "select2 date-input" %>
<% end %>
diff --git a/app/views/casa_cases/_volunteer_assignment.html.erb b/app/views/casa_cases/_volunteer_assignment.html.erb
index b90ea407c1..76de42998a 100644
--- a/app/views/casa_cases/_volunteer_assignment.html.erb
+++ b/app/views/casa_cases/_volunteer_assignment.html.erb
@@ -80,4 +80,4 @@
<%= form.submit 'Assign Volunteer', class: 'btn btn-secondary' %>
<% end %>
-
\ No newline at end of file
+
diff --git a/app/views/casa_cases/index.html.erb b/app/views/casa_cases/index.html.erb
index 1dd4b5c272..0bcaa34b39 100644
--- a/app/views/casa_cases/index.html.erb
+++ b/app/views/casa_cases/index.html.erb
@@ -36,4 +36,4 @@
-
\ No newline at end of file
+
diff --git a/app/views/case_contacts/_case_contact.html.erb b/app/views/case_contacts/_case_contact.html.erb
index b493179a4e..363bc532eb 100644
--- a/app/views/case_contacts/_case_contact.html.erb
+++ b/app/views/case_contacts/_case_contact.html.erb
@@ -20,7 +20,7 @@
Miles Driven
<%= contact.decorate.miles_traveled %>
<% unless contact.decorate.miles_traveled.blank? %>
- <%= " "%>
+ <%= " " %>
<% end %>
@@ -37,7 +37,7 @@
<%= link_to "#{contact.creator&.display_name} ", edit_users_path %>
<% else %>
<%= link_to "#{contact.creator&.display_name} ", edit_volunteer_path(contact.creator) %>
- <%end%>
+ <% end %>
<% else %>
<%= contact.creator&.display_name %>
<% end %>
@@ -50,4 +50,4 @@
<% end %>
-
\ No newline at end of file
+
diff --git a/app/views/case_contacts/_confirm_note_content_dialog.html.erb b/app/views/case_contacts/_confirm_note_content_dialog.html.erb
index f08be788dc..a280ce702b 100644
--- a/app/views/case_contacts/_confirm_note_content_dialog.html.erb
+++ b/app/views/case_contacts/_confirm_note_content_dialog.html.erb
@@ -18,4 +18,4 @@
-
\ No newline at end of file
+
diff --git a/app/views/case_contacts/_form.html.erb b/app/views/case_contacts/_form.html.erb
index 6f8e6f0484..9988707f06 100644
--- a/app/views/case_contacts/_form.html.erb
+++ b/app/views/case_contacts/_form.html.erb
@@ -138,5 +138,3 @@
<%= render 'confirm_note_content_dialog', form: form %>
<% end %>
-
-
diff --git a/app/views/case_contacts/index.html.erb b/app/views/case_contacts/index.html.erb
index 3378a78e9d..a1eb4002ce 100644
--- a/app/views/case_contacts/index.html.erb
+++ b/app/views/case_contacts/index.html.erb
@@ -31,5 +31,5 @@
-
+
<% end %>
diff --git a/app/views/devise/mailer/invitation_instructions.html.erb b/app/views/devise/mailer/invitation_instructions.html.erb
index 724f4931e8..74ff8edbe9 100644
--- a/app/views/devise/mailer/invitation_instructions.html.erb
+++ b/app/views/devise/mailer/invitation_instructions.html.erb
@@ -2,12 +2,12 @@
|
- A CASA/Prince Georgeās County <%=@resource.type%> console account has been created for you. This console is for logging the time you spend and actions you take on your CASA case. You can log activity with your CASA youth, their family members, their foster family or placement, the DSS worker, your Case Supervisor and others associated with your CASA case (such as teachers and therapists).
+ A CASA/Prince Georgeās County <%= @resource.type %> console account has been created for you. This console is for logging the time you spend and actions you take on your CASA case. You can log activity with your CASA youth, their family members, their foster family or placement, the DSS worker, your Case Supervisor and others associated with your CASA case (such as teachers and therapists).
|
|
- Your console account is associated with this email. If this is not the correct email to use, please stop here and contact your Case Supervisor to change the email address. If you are ready to get started, please set your password. This is the first step to accessing your new <%=@resource.type%> account.
+ Your console account is associated with this email. If this is not the correct email to use, please stop here and contact your Case Supervisor to change the email address. If you are ready to get started, please set your password. This is the first step to accessing your new <%= @resource.type %> account.
|
diff --git a/app/views/imports/_cases.html.erb b/app/views/imports/_cases.html.erb
index ce59cc6c0d..5d7f5b161b 100644
--- a/app/views/imports/_cases.html.erb
+++ b/app/views/imports/_cases.html.erb
@@ -23,7 +23,7 @@
<%= f.file_field :file, id: 'case-file', accept: 'text/csv', class: 'form-control-file', style: "margin: auto;" %>
-<%= button_tag id: "case-import-button", class: "btn btn-md btn-success pull-right",
+<%= button_tag id: "case-import-button", class: "btn btn-md btn-success pull-right",
disabled: true, data: { disable_with: " Importing File"} do %>
Import Cases CSV
<% end %>
@@ -34,4 +34,3 @@
});
<% end %>
-
diff --git a/app/views/imports/_supervisors.html.erb b/app/views/imports/_supervisors.html.erb
index 9ac1f8c260..755fe2d921 100644
--- a/app/views/imports/_supervisors.html.erb
+++ b/app/views/imports/_supervisors.html.erb
@@ -23,7 +23,7 @@
<%= f.file_field :file, id: 'supervisor-file', accept: 'text/csv', class: 'form-control-file', style: "margin: auto;" %>
-<%= button_tag id: "supervisor-import-button", class: "btn btn-md btn-success pull-right",
+<%= button_tag id: "supervisor-import-button", class: "btn btn-md btn-success pull-right",
disabled: true, data: { disable_with: " Importing File"} do %>
Import Supervisors CSV
<% end %>
diff --git a/app/views/imports/_volunteers.html.erb b/app/views/imports/_volunteers.html.erb
index 2194a8a68b..1a33f7ebb4 100644
--- a/app/views/imports/_volunteers.html.erb
+++ b/app/views/imports/_volunteers.html.erb
@@ -23,7 +23,7 @@
<%= f.file_field :file, id: 'volunteer-file', accept: 'text/csv', class: 'form-control-file', style: "margin: auto;" %>
-<%= button_tag id: "volunteer-import-button", class: "btn btn-md btn-success pull-right",
+<%= button_tag id: "volunteer-import-button", class: "btn btn-md btn-success pull-right",
disabled: true, data: { disable_with: " Importing File"} do %>
Import Volunteers CSV
<% end %>
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
index 69093eeeab..94058c84d7 100644
--- a/app/views/layouts/application.html.erb
+++ b/app/views/layouts/application.html.erb
@@ -27,7 +27,7 @@
<%= render 'layouts/flash_messages' %>
<%= yield %>
<%= render 'layouts/footers/not_logged_in' %>
- <% end%>
+ <% end %>