diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 682d9ddc28..718e8a44eb 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -22,6 +22,7 @@ on: # The branches below must be a subset of the branches above branches: - main + - rfg-event-2025 paths-ignore: - 'doc/**' - '**/*.md' diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 4ae1f0f164..117ecee970 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -10,6 +10,7 @@ on: pull_request: branches: - main + - rfg-event-2025 paths-ignore: - "doc/**" - "**/*.md" diff --git a/.github/workflows/erb_lint.yml b/.github/workflows/erb_lint.yml index 4fae0a04f6..e010e8e1ac 100644 --- a/.github/workflows/erb_lint.yml +++ b/.github/workflows/erb_lint.yml @@ -10,6 +10,7 @@ on: pull_request: branches: - main + - rfg-event-2025 paths: - '**/*.erb' - '**/*.html' diff --git a/.github/workflows/factory_bot_lint.yml b/.github/workflows/factory_bot_lint.yml index 7ab374ecc5..6b020f9daa 100644 --- a/.github/workflows/factory_bot_lint.yml +++ b/.github/workflows/factory_bot_lint.yml @@ -11,6 +11,7 @@ on: pull_request: branches: - main + - rfg-event-2025 paths-ignore: - 'doc/**' - '**/*.md' diff --git a/.github/workflows/npm_lint_and_test.yml b/.github/workflows/npm_lint_and_test.yml index 600cd7a872..f27aefe880 100644 --- a/.github/workflows/npm_lint_and_test.yml +++ b/.github/workflows/npm_lint_and_test.yml @@ -13,6 +13,7 @@ on: pull_request: branches: - main + - rfg-event-2025 paths: - '**/*.js' - '**/*.json' diff --git a/.github/workflows/rake-after_party.yml b/.github/workflows/rake-after_party.yml index 8e19828ba8..1f91e03a06 100644 --- a/.github/workflows/rake-after_party.yml +++ b/.github/workflows/rake-after_party.yml @@ -11,6 +11,7 @@ on: pull_request: branches: - main + - rfg-event-2025 paths-ignore: - "doc/**" - "**/*.md" diff --git a/.github/workflows/rspec.yml b/.github/workflows/rspec.yml index 3368cf79f8..44ad277753 100644 --- a/.github/workflows/rspec.yml +++ b/.github/workflows/rspec.yml @@ -10,6 +10,7 @@ on: pull_request: branches: - main + - rfg-event-2025 concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true diff --git a/.github/workflows/ruby_lint.yml b/.github/workflows/ruby_lint.yml index 9b06082abe..5f77a3d585 100644 --- a/.github/workflows/ruby_lint.yml +++ b/.github/workflows/ruby_lint.yml @@ -11,6 +11,7 @@ on: pull_request: branches: - main + - rfg-event-2025 paths-ignore: - 'doc/**' - '**/*.md' diff --git a/.github/workflows/security.yml b/.github/workflows/security.yml index e70f1b1068..cd155e08d2 100644 --- a/.github/workflows/security.yml +++ b/.github/workflows/security.yml @@ -11,6 +11,7 @@ on: pull_request: branches: - main + - rfg-event-2025 paths-ignore: - 'doc/**' - '**/*.md' diff --git a/.github/workflows/spec_checker.yml b/.github/workflows/spec_checker.yml index 2112ab9e86..e7001db749 100644 --- a/.github/workflows/spec_checker.yml +++ b/.github/workflows/spec_checker.yml @@ -11,6 +11,7 @@ on: pull_request: branches: - main + - rfg-event-2025 paths-ignore: - 'doc/**' - '**/*.md' diff --git a/.rubocop.yml b/.rubocop.yml index 00c7f1955c..43bcae4f18 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,4 +1,5 @@ require: + - standard - rubocop-factory_bot plugins: @@ -7,4 +8,5 @@ plugins: - rubocop-rspec_rails inherit_gem: + standard: config/base.yml pundit: config/rubocop-rspec.yml diff --git a/Gemfile.lock b/Gemfile.lock index 31857a3bdf..c7ffe49d7e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -525,7 +525,7 @@ GEM rswag-ui (2.16.0) actionpack (>= 5.2, < 8.1) railties (>= 5.2, < 8.1) - rubocop (1.75.8) + rubocop (1.80.2) json (~> 2.3) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.1.0) @@ -533,10 +533,10 @@ GEM parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 2.9.3, < 3.0) - rubocop-ast (>= 1.44.0, < 2.0) + rubocop-ast (>= 1.46.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 4.0) - rubocop-ast (1.45.1) + rubocop-ast (1.46.0) parser (>= 3.3.7.2) prism (~> 1.4) rubocop-capybara (2.22.1) @@ -612,10 +612,10 @@ GEM actionpack (>= 6.1) activesupport (>= 6.1) sprockets (>= 3.0.0) - standard (1.50.0) + standard (1.51.0) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.0) - rubocop (~> 1.75.5) + rubocop (~> 1.80.2) standard-custom (~> 1.0.0) standard-performance (~> 1.8) standard-custom (1.0.2) diff --git a/app/assets/stylesheets/pages/volunteers.scss b/app/assets/stylesheets/pages/volunteers.scss index 4f5c8dd8c4..bc07b92f86 100644 --- a/app/assets/stylesheets/pages/volunteers.scss +++ b/app/assets/stylesheets/pages/volunteers.scss @@ -33,3 +33,11 @@ table#volunteers.dataTable.hover > tbody > tr.selected:hover > * { border: 1px solid #757575; } +table#volunteers.dataTable { + .emancipation-btn { + padding: 5px 10px; + font-size: 10px; + line-height: 16px; + vertical-align: middle; + } +} diff --git a/app/decorators/casa_case_decorator.rb b/app/decorators/casa_case_decorator.rb index 4604edb1bc..e817d1bc3e 100644 --- a/app/decorators/casa_case_decorator.rb +++ b/app/decorators/casa_case_decorator.rb @@ -15,6 +15,14 @@ def case_contacts_latest_before(date) object.case_contacts.where("occurred_at < ?", date).max_by(&:occurred_at) end + def case_contacts_made + object.case_contacts.where('occurred_at > ?', DateTime.now - 60.days).count + end + + def last_attempted_contact_formatted(volunteer_id) + object.case_contacts.where(creator_id: volunteer_id).order(occurred_at: :desc).first&.occurred_at&.strftime("%B %d, %Y") + end + def case_contacts_filtered_by_active_assignment_ordered_by_occurred_at object.case_contacts .joins("INNER JOIN case_assignments on case_assignments.casa_case_id = case_contacts.casa_case_id and case_assignments.volunteer_id = case_contacts.creator_id") diff --git a/app/javascript/src/dashboard.js b/app/javascript/src/dashboard.js index fe806483c3..b815e3b99e 100644 --- a/app/javascript/src/dashboard.js +++ b/app/javascript/src/dashboard.js @@ -136,8 +136,14 @@ $(() => { // JQuery's callback for the DOM loading } }) }, - order: [[7, 'desc']], + order: [[8, 'desc']], columns: [ + { + className: 'dt-control', + orderable: false, + data: null, + defaultContent: '' + }, { data: 'id', targets: 0, @@ -206,9 +212,14 @@ $(() => { // JQuery's callback for the DOM loading ` }) const caseNumbers = ` - Case Number(s) - ${links.join(', ')} + Case Total + ${links.length} ` + + // const caseNumbers = ` + // Case Number(s) + // ${links.join(', ')} + // ` return caseNumbers }, orderable: false @@ -306,6 +317,19 @@ $(() => { // JQuery's callback for the DOM loading } }) + volunteersTable.on('click', 'tbody td.dt-control', function (e) { + let tr = e.target.closest('tr'); + let row = volunteersTable.row(tr); + + if (row.child.isShown()) { + row.child.hide(); + } + else { + const vdomId = `#volunteer-details-${row.data().id}` + row.child($(vdomId).html()).show(); + } + }); + // Because the table saves state, we have to check/uncheck modal inputs based on what // columns are visible volunteersTable.columns().every(function (index) { diff --git a/app/views/volunteers/index.html.erb b/app/views/volunteers/index.html.erb index b90f53baa8..0ae8b04c8f 100644 --- a/app/views/volunteers/index.html.erb +++ b/app/views/volunteers/index.html.erb @@ -178,6 +178,7 @@