-
-
Notifications
You must be signed in to change notification settings - Fork 507
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
4241 change agency type to enum #4931
Open
Benjamin-Couey
wants to merge
26
commits into
rubyforgood:main
Choose a base branch
from
Benjamin-Couey:4241-change-agency-type-to-enum
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+239
−167
Open
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
2566e16
Update agency_type to be an enum
Benjamin-Couey 4e156a2
Created new I18n config file to translate agency_type codes to descri…
Benjamin-Couey b8a4d61
Applied translation of agency_type code to descriptive strings in views
Benjamin-Couey 7c9d8a8
Applied translation of agency_type code in partner info report
Benjamin-Couey 9521d48
Updated existing tests to refer to enum
Benjamin-Couey f840bb0
Updated Partner.agency_info to refer to new enum instead of AGENCY_TY…
Benjamin-Couey de2d69f
Removed unecessary brackets
Benjamin-Couey c5e260d
Added comment warning people away from using AGENCY_TYPES
Benjamin-Couey 6c1625c
Created migration to update existing agency_type values to enum values
Benjamin-Couey c62835c
Changes made by linter
Benjamin-Couey 93feb8f
Merge branch 'main' into 4241-change-agency-type-to-enum
Benjamin-Couey ec45472
Cleaned up formatting, removed puts statements, ran through linter
Benjamin-Couey 21a8cd3
Reformatted :agency_type so each entry is on one line
Benjamin-Couey f32237d
Fixed test using and expecting enum values
Benjamin-Couey 74073cb
Changed calculation of agency_type symbols to more performant impleme…
Benjamin-Couey a516804
Changes made by linter
Benjamin-Couey 1f4bd43
Removed old cleanup of partner agency types and associated mapping fr…
Benjamin-Couey 596e79c
Updated mapping in migration to handle agency_type values previously …
Benjamin-Couey 2987a2a
Merge branch 'main' into 4241-change-agency-type-to-enum
Benjamin-Couey b5606af
Fixed using wrong function to symbolize strings
Benjamin-Couey 2e5a0a1
Updated agency_info to translate agency_types for now
Benjamin-Couey 9fc8950
Fixed views not comparing agency_type to enum keys
Benjamin-Couey 723d43d
Merge branch 'main' into 4241-change-agency-type-to-enum
Benjamin-Couey 761195b
Merge branch 'main' into 4241-change-agency-type-to-enum
Benjamin-Couey 4ac097d
Added agency_types_for_selection function to provide sorted agency ty…
Benjamin-Couey 01a9ebf
Merge branch 'main' into 4241-change-agency-type-to-enum
Benjamin-Couey File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
agency_type_map: &agency_type_map | ||
other: "Other" | ||
career: "Career technical training" | ||
abuse: "Child abuse resource center" | ||
bnb: "Basic Needs Bank" | ||
church: "Church outreach ministry" | ||
college: "College and Universities" | ||
cdc: "Community development corporation" | ||
health: "Community health program or clinic" | ||
outreach: "Community outreach services" | ||
legal: "Correctional Facilities / Jail / Prison / Legal System" | ||
crisis: "Crisis/Disaster services" | ||
disab: "Developmental disabilities program" | ||
district: "School District" | ||
domv: "Domestic violence shelter" | ||
ece: "Early Childhood Education/Childcare" | ||
child: "Early childhood services" | ||
edu: "Education program" | ||
family: "Family resource center" | ||
food: "Food bank/pantry" | ||
foster: "Foster Program" | ||
govt: "Government Agency/Affiliate" | ||
headstart: "Head Start/Early Head Start" | ||
homevisit: "Home visits" | ||
homeless: "Homeless resource center" | ||
hosp: "Hospital" | ||
infpan: "Infant/Child Pantry/Closet" | ||
lib: "Library" | ||
mhealth: "Mental Health" | ||
military: "Military Bases/Veteran Services" | ||
police: "Police Station" | ||
preg: "Pregnancy resource center" | ||
presch: "Preschool" | ||
ref: "Refugee resource center" | ||
es: "School - Elementary School" | ||
hs: "School - High School" | ||
ms: "School - Middle School" | ||
senior: "Senior Center" | ||
tribal: "Tribal/Native-Based Organization" | ||
treat: "Treatment clinic" | ||
twoycollege: "Two-Year College" | ||
wic: "Women, Infants and Children" | ||
|
||
en: | ||
partners_profile: | ||
*agency_type_map | ||
|
||
simple_form: | ||
options: | ||
profile: | ||
agency_type: | ||
*agency_type_map |
109 changes: 0 additions & 109 deletions
109
db/migrate/20241122201255_cleanup_partner_agency_types.rb
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Functional issue: "Other" is appearing at the top of the list of types when selecting. It should be at the bottom. Everything else should be in alphabetical order (by the full text) (though I note it isn't in staging --so the alpha thing could be a separate issue)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cielf alright this should be addressed in the most recent commit. Below is a screenshot demonstrating the new behavior.
Partner facing edit page with dropdown open