From 8e6b1f0afcf6665ff5116278618f9ca8145d7de1 Mon Sep 17 00:00:00 2001 From: Dave G Date: Tue, 29 Oct 2024 13:23:01 -0400 Subject: [PATCH] clean up unused match decision reasons --- .../administrative_cancel.rb | 30 ------------------- .../case_contact_assigns_manager_decline.rb | 13 -------- .../dnd_staff_decline.rb | 13 -------- .../housing_subsidy_admin_decline.rb | 27 ----------------- .../housing_subsidy_admin_priority_decline.rb | 13 -------- .../mitigation_decline.rb | 13 -------- ...ne_case_contact_assigns_manager_decline.rb | 13 -------- .../nine_record_voucher_date_decline.rb | 13 -------- app/models/match_decision_reasons/other.rb | 13 -------- .../shelter_agency_decline.rb | 13 -------- .../shelter_agency_not_working_with_client.rb | 13 -------- ...er_agency_not_working_with_client_other.rb | 13 -------- 12 files changed, 187 deletions(-) delete mode 100644 app/models/match_decision_reasons/case_contact_assigns_manager_decline.rb delete mode 100644 app/models/match_decision_reasons/dnd_staff_decline.rb delete mode 100644 app/models/match_decision_reasons/housing_subsidy_admin_decline.rb delete mode 100644 app/models/match_decision_reasons/housing_subsidy_admin_priority_decline.rb delete mode 100644 app/models/match_decision_reasons/mitigation_decline.rb delete mode 100644 app/models/match_decision_reasons/nine_case_contact_assigns_manager_decline.rb delete mode 100644 app/models/match_decision_reasons/nine_record_voucher_date_decline.rb delete mode 100644 app/models/match_decision_reasons/other.rb delete mode 100644 app/models/match_decision_reasons/shelter_agency_decline.rb delete mode 100644 app/models/match_decision_reasons/shelter_agency_not_working_with_client.rb delete mode 100644 app/models/match_decision_reasons/shelter_agency_not_working_with_client_other.rb diff --git a/app/models/match_decision_reasons/administrative_cancel.rb b/app/models/match_decision_reasons/administrative_cancel.rb index d73b57458..999e74771 100644 --- a/app/models/match_decision_reasons/administrative_cancel.rb +++ b/app/models/match_decision_reasons/administrative_cancel.rb @@ -6,36 +6,6 @@ module MatchDecisionReasons class AdministrativeCancel < Base - def self.available(include_other: true, route: nil) # rubocop:disable Lint/UnusedMethodArgument - other = MatchDecisionReasons::Base.other.first - # none = OpenStruct.new(name: 'None', id: nil) - av = active.to_a - # av << none - if route.present? - av.reject! { |reason| route.removed_admin_reasons.include?(reason.name) } if route.removed_admin_reasons.any? - av += limited.where(name: route.additional_admin_reasons).to_a if route.additional_admin_reasons.any? - end - av << other - - av - end - - def self.available_for_provider_only(include_other: true, route: nil) # rubocop:disable Lint/UnusedMethodArgument - other = MatchDecisionReasons::Base.other.first - # none = OpenStruct.new(name: 'None', id: nil) - av = active.where(name: provider_only_options).to_a - av << other if include_other - - av - end - - def self.provider_only_options - [ - 'Vacancy should not have been entered', - 'Vacancy filled by other client', - ] - end - def title Translation.translate('Administrative Cancelation') end diff --git a/app/models/match_decision_reasons/case_contact_assigns_manager_decline.rb b/app/models/match_decision_reasons/case_contact_assigns_manager_decline.rb deleted file mode 100644 index 84301f4a0..000000000 --- a/app/models/match_decision_reasons/case_contact_assigns_manager_decline.rb +++ /dev/null @@ -1,13 +0,0 @@ -### -# Copyright 2016 - 2024 Green River Data Analysis, LLC -# -# License detail: https://github.com/greenriver/boston-cas/blob/production/LICENSE.md -### - -module MatchDecisionReasons - class CaseContactAssignsManagerDecline < Base - def title - "#{Translation.translate('Housing Subsidy Administrator Eight')} Decline" - end - end -end diff --git a/app/models/match_decision_reasons/dnd_staff_decline.rb b/app/models/match_decision_reasons/dnd_staff_decline.rb deleted file mode 100644 index d3436dbc4..000000000 --- a/app/models/match_decision_reasons/dnd_staff_decline.rb +++ /dev/null @@ -1,13 +0,0 @@ -### -# Copyright 2016 - 2024 Green River Data Analysis, LLC -# -# License detail: https://github.com/greenriver/boston-cas/blob/production/LICENSE.md -### - -module MatchDecisionReasons - class DndStaffDecline < Base - def title - "#{Translation.translate('DND')} #{Translation.translate('Staff Decline')}" - end - end -end diff --git a/app/models/match_decision_reasons/housing_subsidy_admin_decline.rb b/app/models/match_decision_reasons/housing_subsidy_admin_decline.rb deleted file mode 100644 index 78df6ed11..000000000 --- a/app/models/match_decision_reasons/housing_subsidy_admin_decline.rb +++ /dev/null @@ -1,27 +0,0 @@ -### -# Copyright 2016 - 2024 Green River Data Analysis, LLC -# -# License detail: https://github.com/greenriver/boston-cas/blob/production/LICENSE.md -### - -module MatchDecisionReasons - class HousingSubsidyAdminDecline < Base - def self.available(include_other: false, route: nil) - other = MatchDecisionReasons::Base.other.first - # none = OpenStruct.new(name: 'None', id: nil) - av = active.to_a - # av << none - if route.present? - av.reject! { |reason| route.removed_hsa_reasons.include?(reason.name) } if route.removed_hsa_reasons.any? - av += limited.where(name: route.additional_hsa_reasons).to_a if route.additional_hsa_reasons.any? - end - av << other if include_other - - av - end - - def title - "#{Translation.translate('HSA')} Decline" - end - end -end diff --git a/app/models/match_decision_reasons/housing_subsidy_admin_priority_decline.rb b/app/models/match_decision_reasons/housing_subsidy_admin_priority_decline.rb deleted file mode 100644 index 1a87f3fb3..000000000 --- a/app/models/match_decision_reasons/housing_subsidy_admin_priority_decline.rb +++ /dev/null @@ -1,13 +0,0 @@ -### -# Copyright 2016 - 2024 Green River Data Analysis, LLC -# -# License detail: https://github.com/greenriver/boston-cas/blob/production/LICENSE.md -### - -module MatchDecisionReasons - class HousingSubsidyAdminPriorityDecline < Base - def title - "#{Translation.translate('HSA')} Priority Decline" - end - end -end diff --git a/app/models/match_decision_reasons/mitigation_decline.rb b/app/models/match_decision_reasons/mitigation_decline.rb deleted file mode 100644 index 0bfaf3cac..000000000 --- a/app/models/match_decision_reasons/mitigation_decline.rb +++ /dev/null @@ -1,13 +0,0 @@ -### -# Copyright 2016 - 2024 Green River Data Analysis, LLC -# -# License detail: https://github.com/greenriver/boston-cas/blob/production/LICENSE.md -### - -module MatchDecisionReasons - class MitigationDecline < Base - def title - 'Mitigation Decline' - end - end -end diff --git a/app/models/match_decision_reasons/nine_case_contact_assigns_manager_decline.rb b/app/models/match_decision_reasons/nine_case_contact_assigns_manager_decline.rb deleted file mode 100644 index a41625c15..000000000 --- a/app/models/match_decision_reasons/nine_case_contact_assigns_manager_decline.rb +++ /dev/null @@ -1,13 +0,0 @@ -### -# Copyright 2016 - 2024 Green River Data Analysis, LLC -# -# License detail: https://github.com/greenriver/boston-cas/blob/production/LICENSE.md -### - -module MatchDecisionReasons - class NineCaseContactAssignsManagerDecline < Base - def title - "#{Translation.translate('Stabilization Service Provider Nine')} Decline" - end - end -end diff --git a/app/models/match_decision_reasons/nine_record_voucher_date_decline.rb b/app/models/match_decision_reasons/nine_record_voucher_date_decline.rb deleted file mode 100644 index 82adf398a..000000000 --- a/app/models/match_decision_reasons/nine_record_voucher_date_decline.rb +++ /dev/null @@ -1,13 +0,0 @@ -### -# Copyright 2016 - 2024 Green River Data Analysis, LLC -# -# License detail: https://github.com/greenriver/boston-cas/blob/production/LICENSE.md -### - -module MatchDecisionReasons - class NineRecordVoucherDateDecline < Base - def title - "#{Translation.translate('Housing Subsidy Administrator Nine')} Decline" - end - end -end diff --git a/app/models/match_decision_reasons/other.rb b/app/models/match_decision_reasons/other.rb deleted file mode 100644 index 035139cf2..000000000 --- a/app/models/match_decision_reasons/other.rb +++ /dev/null @@ -1,13 +0,0 @@ -### -# Copyright 2016 - 2024 Green River Data Analysis, LLC -# -# License detail: https://github.com/greenriver/boston-cas/blob/production/LICENSE.md -### - -module MatchDecisionReasons - class Other < Base - def title - '' - end - end -end diff --git a/app/models/match_decision_reasons/shelter_agency_decline.rb b/app/models/match_decision_reasons/shelter_agency_decline.rb deleted file mode 100644 index 96ea3621b..000000000 --- a/app/models/match_decision_reasons/shelter_agency_decline.rb +++ /dev/null @@ -1,13 +0,0 @@ -### -# Copyright 2016 - 2024 Green River Data Analysis, LLC -# -# License detail: https://github.com/greenriver/boston-cas/blob/production/LICENSE.md -### - -module MatchDecisionReasons - class ShelterAgencyDecline < Base - def title - "#{Translation.translate('Shelter Agency')} Decline" - end - end -end diff --git a/app/models/match_decision_reasons/shelter_agency_not_working_with_client.rb b/app/models/match_decision_reasons/shelter_agency_not_working_with_client.rb deleted file mode 100644 index 8c85d5be8..000000000 --- a/app/models/match_decision_reasons/shelter_agency_not_working_with_client.rb +++ /dev/null @@ -1,13 +0,0 @@ -### -# Copyright 2016 - 2024 Green River Data Analysis, LLC -# -# License detail: https://github.com/greenriver/boston-cas/blob/production/LICENSE.md -### - -module MatchDecisionReasons - class ShelterAgencyNotWorkingWithClient < Base - def title - "#{Translation.translate('Shelter Agency')} Not Working with Client" - end - end -end diff --git a/app/models/match_decision_reasons/shelter_agency_not_working_with_client_other.rb b/app/models/match_decision_reasons/shelter_agency_not_working_with_client_other.rb deleted file mode 100644 index 7fefdc828..000000000 --- a/app/models/match_decision_reasons/shelter_agency_not_working_with_client_other.rb +++ /dev/null @@ -1,13 +0,0 @@ -### -# Copyright 2016 - 2024 Green River Data Analysis, LLC -# -# License detail: https://github.com/greenriver/boston-cas/blob/production/LICENSE.md -### - -module MatchDecisionReasons - class ShelterAgencyNotWorkingWithClientOther < Base - def title - "#{Translation.translate('Shelter Agency')} Not Working with Client Other" - end - end -end