Skip to content

Commit

Permalink
Merged in r2-3131-gender-header (pull request #7003)
Browse files Browse the repository at this point in the history
R2-3131: PCM - Fixing Users with multiple modules do not see gender column translated, gender/sex filter not working and displaying incorrect options
  • Loading branch information
jtoliver-quoin authored and pnabutovsky committed Dec 4, 2024
2 parents 5c6eace + bf99e49 commit 2cb1af1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 12 deletions.
9 changes: 1 addition & 8 deletions app/javascript/components/index-filters/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,7 @@ export const VIOLATIONS_FILTER_NAMES = Object.freeze([
"types_of_aid_disrupted_denial"
]);

export const PRIMARY_FILTERS = [
"sex",
"gender_identity",
"age",
"risk_level",
"approval_status_case_plan",
"last_updated_at"
];
export const PRIMARY_FILTERS = ["sex", "gender", "age", "risk_level", "approval_status_case_plan", "last_updated_at"];

export const DEFAULT_FILTERS = ["fields", "status", "record_state", ID_SEARCH];

Expand Down
4 changes: 2 additions & 2 deletions app/models/filter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ def initialize(args = {})
option_strings_source: 'lookup-gender'
)
GENDER_IDENTITY = Filter.new(
unique_id: 'gender_identity',
unique_id: 'gender',
name: 'cases.filter_by.gender',
field_name: 'gender_identity',
field_name: 'gender',
option_strings_source: 'lookup-gender-identity'
)
PROTECTION_CONCERNS = Filter.new(
Expand Down
2 changes: 1 addition & 1 deletion app/models/header.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Header < ValueObject
SURVIVOR_CODE_INCIDENT = Header.new(name: 'survivor_code', field_name: 'survivor_code')
AGE = Header.new(name: 'age', field_name: 'age', id_search: true)
SEX = Header.new(name: 'sex', field_name: 'sex', id_search: true)
GENDER = Header.new(name: 'gender_identity', field_name: 'gender', id_search: true)
GENDER = Header.new(name: 'gender', field_name: 'gender', id_search: true)
REGISTRATION_DATE = Header.new(name: 'registration_date', field_name: 'registration_date')
CASE_OPENING_DATE = Header.new(name: 'case_opening_date', field_name: 'created_at')
PHOTO = Header.new(name: 'photo', field_name: 'photo')
Expand Down
2 changes: 1 addition & 1 deletion config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ en:
flag_summary: Flag summary
full_name: Full Name
gbv_closure: GBV Closure
gender_identity: Gender
gender: Gender
hide_name: Hide Name
hide_name_error: An error ocurred when saving your changes. Please try again.
id: ID#
Expand Down

0 comments on commit 2cb1af1

Please sign in to comment.