From b896e14429468c068286d99ccae81bba5e804457 Mon Sep 17 00:00:00 2001 From: Dave G Date: Fri, 11 Oct 2024 08:21:06 -0400 Subject: [PATCH] code review updates --- app/models/match_decisions/base.rb | 2 +- .../eleven/eleven_confirm_match_success_dnd_staff.rb | 2 -- db/migrate/20241010194153_destroy_route_eleven_matches.rb | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/app/models/match_decisions/base.rb b/app/models/match_decisions/base.rb index 8cc8731d1..f248bee14 100644 --- a/app/models/match_decisions/base.rb +++ b/app/models/match_decisions/base.rb @@ -86,7 +86,7 @@ def contact_name def editable? # can this decision be updated by a notification response? # override this default behavior in subclasses - initialized? && match_open? && saved_status !~ /\A(accepted|acknowledged|confirmed|declined|canceled|rejected|complete|completed|scheduled|no_hearing|mitigation_required|mitigation_not_required|decline_overridden|decline_overridden_returned|decline_confirmed)\z/ + initialized? && match_open? && saved_status !~ /\A(accepted|confirmed|declined|canceled|rejected|complete|completed|scheduled|no_hearing|mitigation_required|mitigation_not_required|decline_overridden|decline_overridden_returned|decline_confirmed)\z/ end def expires? diff --git a/app/models/match_decisions/eleven/eleven_confirm_match_success_dnd_staff.rb b/app/models/match_decisions/eleven/eleven_confirm_match_success_dnd_staff.rb index 8ba422cc8..1f8b77a46 100644 --- a/app/models/match_decisions/eleven/eleven_confirm_match_success_dnd_staff.rb +++ b/app/models/match_decisions/eleven/eleven_confirm_match_success_dnd_staff.rb @@ -9,7 +9,6 @@ class ElevenConfirmMatchSuccessDndStaff < ::MatchDecisions::Base include MatchDecisions::AcceptsDeclineReason include MatchDecisions::RouteElevenDeclineReasons include MatchDecisions::RouteElevenCancelReasons - # validate :note_present_if_status_rejected def to_partial_path 'match_decisions/eleven/confirm_match_success_dnd_staff' @@ -19,7 +18,6 @@ def statuses { pending: 'Pending', confirmed: 'Confirmed', - rejected: 'Rejected', # Not currently used declined: 'Declined', canceled: 'Canceled', back: 'Pending', diff --git a/db/migrate/20241010194153_destroy_route_eleven_matches.rb b/db/migrate/20241010194153_destroy_route_eleven_matches.rb index 63c865447..867dd92c6 100644 --- a/db/migrate/20241010194153_destroy_route_eleven_matches.rb +++ b/db/migrate/20241010194153_destroy_route_eleven_matches.rb @@ -1,5 +1,5 @@ class DestroyRouteElevenMatches < ActiveRecord::Migration[7.0] - def change + def up ClientOpportunityMatch.joins(:match_route).where(match_routes: { type: 'MatchRoutes::Eleven' }).destroy_all unless Rails.env.production? end end