From 9962130d6845a73f169f249b4dee054579fa0dc3 Mon Sep 17 00:00:00 2001 From: Jeff Catania Date: Thu, 1 May 2025 13:29:19 -0400 Subject: [PATCH 1/3] initial commit of implementation. TODO Testing --- .../components/aggregate_data_point_component.rb | 14 ++++++++++++++ .../aggregators/response_objects/identity.rb | 2 +- app/app/views/cbv/submits/show.pdf.erb | 6 ++++-- app/config/i18n-tasks.yml | 5 +++-- app/config/locales/en.yml | 2 ++ 5 files changed, 24 insertions(+), 5 deletions(-) diff --git a/app/app/components/aggregate_data_point_component.rb b/app/app/components/aggregate_data_point_component.rb index c65ef8afd..e75d3c892 100644 --- a/app/app/components/aggregate_data_point_component.rb +++ b/app/app/components/aggregate_data_point_component.rb @@ -126,4 +126,18 @@ def client_full_name(full_name) value: full_name } end + + def date_of_birth(date_of_birth) + { + label: I18n.t("cbv.submits.show.pdf.shared.date_of_birth"), + value: date_of_birth + } + end + + def last_4_ssn(ssn) + { + label: I18n.t("cbv.submits.show.pdf.caseworker.last_4_ssn"), + value: ssn + } + end end diff --git a/app/app/services/aggregators/response_objects/identity.rb b/app/app/services/aggregators/response_objects/identity.rb index 33700139d..0bb47428e 100644 --- a/app/app/services/aggregators/response_objects/identity.rb +++ b/app/app/services/aggregators/response_objects/identity.rb @@ -26,7 +26,7 @@ def self.from_argyle(identity_response_body) full_name: identity_response_body["full_name"], date_of_birth: identity_response_body["birth_date"], emails: [ identity_response_body["email"] ], - ssn: identity_response_body["ssn"], + ssn: (identity_response_body["ssn"]&.last(4) if identity_response_body["ssn"].present?), phone_numbers: [ identity_response_body["phone_number"] ] ) end diff --git a/app/app/views/cbv/submits/show.pdf.erb b/app/app/views/cbv/submits/show.pdf.erb index 5b5c31ed1..900fd52f7 100644 --- a/app/app/views/cbv/submits/show.pdf.erb +++ b/app/app/views/cbv/submits/show.pdf.erb @@ -93,8 +93,10 @@ <%= t(".pdf.shared.employment_information") %> <% end %> - <% if is_caseworker && summary[:has_identity_data] %> - <%= table.with_data_point(:client_full_name, summary[:identity].full_name) %> + <% if summary[:has_identity_data] %> + <%= table.with_data_point(:client_full_name, summary[:identity].full_name) if is_caseworker %> + <%= table.with_data_point(:last_4_ssn, summary[:identity].ssn) if is_caseworker %> + <%= table.with_data_point(:date_of_birth, summary[:identity].date_of_birth) %> <% end %> <% if summary[:has_employment_data] %> <% employment = summary[:employment] %> diff --git a/app/config/i18n-tasks.yml b/app/config/i18n-tasks.yml index 9d19f7673..11c7ae50b 100644 --- a/app/config/i18n-tasks.yml +++ b/app/config/i18n-tasks.yml @@ -133,6 +133,7 @@ ignore_missing: - "caseworker_mailer.summary_email.*" # Caseworker PDF strings that are only supported in English: - "cbv.submits.show.pdf.caseworker.*" + - "cbv.submits.show.pdf.shared.date_of_birth" # Currently awaiting translation: # - "example.strings.*" # Tag with ticket number that created or modified the string @@ -192,13 +193,13 @@ ignore_missing: - "cbv.applicant_informations.la_ldh.fields.case_number.help_text" - "cbv.applicant_informations.la_ldh.fields.case_number.prompt" - "cbv.applicant_informations.la_ldh.fields.case_number.super_one_html" - + # LA welcome (FFS-2688) - "pages.home.description_1" - "pages.home.description_2" - "pages.home.description_3" - "pages.home.header" - + # LA client_pdf (FFS-2688) - "aggregator_strings.payment_frequencies.annual" - "aggregator_strings.payment_frequencies.annually" diff --git a/app/config/locales/en.yml b/app/config/locales/en.yml index 89d2d866e..e8e71dce5 100644 --- a/app/config/locales/en.yml +++ b/app/config/locales/en.yml @@ -418,6 +418,7 @@ en: description: The following income information was retrieved with the client's consent and has been submitted by them to their benefits agency. The client is also able to download a client-facing copy of this report. how_to: This report includes payment information from the past 90 days. In most cases, you only need to review income from the last 30 days for eligibility purposes. Use data beyond the 30-day period only if necessary. Key fields for income verification are highlighted in yellow. how_to_header: 'How to use this report:' + last_4_ssn: Last 4 of SSN pay_period: Pay period (%{pay_frequency}) snap_agency_id: SNAP Agency ID staff_beacon_id_wel_id: Staff BEACON ID (WELID) @@ -433,6 +434,7 @@ en: shared: client_information: Client information confirmation_code: Confirmation code + date_of_birth: Date of Birth employment_information: Employment information pay_date: 'Pay Date: %{pay_date}' report_details: Report details From 664d1cac6c6c232cfe256eece26529765624ec6a Mon Sep 17 00:00:00 2001 From: Jeff Catania Date: Thu, 1 May 2025 19:40:10 -0400 Subject: [PATCH 2/3] tested ssn --- .../components/aggregate_data_point_component.rb | 14 ++++++++++++++ app/app/views/cbv/submits/show.pdf.erb | 3 ++- app/config/i18n-tasks.yml | 5 +++-- app/config/locales/en.yml | 2 ++ .../controllers/cbv/submits_controller_spec.rb | 2 ++ 5 files changed, 23 insertions(+), 3 deletions(-) diff --git a/app/app/components/aggregate_data_point_component.rb b/app/app/components/aggregate_data_point_component.rb index c65ef8afd..0ec4c6227 100644 --- a/app/app/components/aggregate_data_point_component.rb +++ b/app/app/components/aggregate_data_point_component.rb @@ -126,4 +126,18 @@ def client_full_name(full_name) value: full_name } end + + def date_of_birth(date_of_birth) + { + label: I18n.t("cbv.submits.show.pdf.shared.date_of_birth"), + value: date_of_birth + } + end + + def ssn(ssn) + { + label: I18n.t("cbv.submits.show.pdf.caseworker.ssn"), + value: ssn + } + end end diff --git a/app/app/views/cbv/submits/show.pdf.erb b/app/app/views/cbv/submits/show.pdf.erb index 5b5c31ed1..824669153 100644 --- a/app/app/views/cbv/submits/show.pdf.erb +++ b/app/app/views/cbv/submits/show.pdf.erb @@ -93,8 +93,9 @@ <%= t(".pdf.shared.employment_information") %> <% end %> - <% if is_caseworker && summary[:has_identity_data] %> + <% if summary[:has_identity_data] && is_caseworker %> <%= table.with_data_point(:client_full_name, summary[:identity].full_name) %> + <%= table.with_data_point(:ssn, summary[:identity].ssn) %> <% end %> <% if summary[:has_employment_data] %> <% employment = summary[:employment] %> diff --git a/app/config/i18n-tasks.yml b/app/config/i18n-tasks.yml index 9d19f7673..11c7ae50b 100644 --- a/app/config/i18n-tasks.yml +++ b/app/config/i18n-tasks.yml @@ -133,6 +133,7 @@ ignore_missing: - "caseworker_mailer.summary_email.*" # Caseworker PDF strings that are only supported in English: - "cbv.submits.show.pdf.caseworker.*" + - "cbv.submits.show.pdf.shared.date_of_birth" # Currently awaiting translation: # - "example.strings.*" # Tag with ticket number that created or modified the string @@ -192,13 +193,13 @@ ignore_missing: - "cbv.applicant_informations.la_ldh.fields.case_number.help_text" - "cbv.applicant_informations.la_ldh.fields.case_number.prompt" - "cbv.applicant_informations.la_ldh.fields.case_number.super_one_html" - + # LA welcome (FFS-2688) - "pages.home.description_1" - "pages.home.description_2" - "pages.home.description_3" - "pages.home.header" - + # LA client_pdf (FFS-2688) - "aggregator_strings.payment_frequencies.annual" - "aggregator_strings.payment_frequencies.annually" diff --git a/app/config/locales/en.yml b/app/config/locales/en.yml index 89d2d866e..87c0f2546 100644 --- a/app/config/locales/en.yml +++ b/app/config/locales/en.yml @@ -420,6 +420,7 @@ en: how_to_header: 'How to use this report:' pay_period: Pay period (%{pay_frequency}) snap_agency_id: SNAP Agency ID + ssn: SSN staff_beacon_id_wel_id: Staff BEACON ID (WELID) client: address: Employer address @@ -433,6 +434,7 @@ en: shared: client_information: Client information confirmation_code: Confirmation code + date_of_birth: Date of Birth employment_information: Employment information pay_date: 'Pay Date: %{pay_date}' report_details: Report details diff --git a/app/spec/controllers/cbv/submits_controller_spec.rb b/app/spec/controllers/cbv/submits_controller_spec.rb index 476c5517c..57293446c 100644 --- a/app/spec/controllers/cbv/submits_controller_spec.rb +++ b/app/spec/controllers/cbv/submits_controller_spec.rb @@ -117,6 +117,7 @@ expect(pdf_text).to include(I18n.t("cbv.applicant_informations.sandbox.fields.middle_name.prompt")) expect(pdf_text).to include(I18n.t("cbv.applicant_informations.sandbox.fields.last_name.prompt")) expect(pdf_text).to include(I18n.t("cbv.applicant_informations.sandbox.fields.case_number.prompt")) + expect(pdf_text).to include(I18n.t("cbv.submits.show.pdf.caseworker.ssn")) end end @@ -134,6 +135,7 @@ expect(pdf_text).not_to include(I18n.t("cbv.applicant_informations.sandbox.fields.middle_name.prompt")) expect(pdf_text).not_to include(I18n.t("cbv.applicant_informations.sandbox.fields.last_name.prompt")) expect(pdf_text).not_to include(I18n.t("cbv.applicant_informations.sandbox.fields.case_number.prompt")) + expect(pdf_text).not_to include(I18n.t("cbv.submits.show.pdf.caseworker.ssn")) end end end From 79c82794fb5ba6098dd75b72b02a8e0d685a1dd9 Mon Sep 17 00:00:00 2001 From: Jeff Catania Date: Thu, 1 May 2025 19:44:58 -0400 Subject: [PATCH 3/3] Update app/app/views/cbv/submits/show.pdf.erb --- app/app/views/cbv/submits/show.pdf.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/app/views/cbv/submits/show.pdf.erb b/app/app/views/cbv/submits/show.pdf.erb index 824669153..d77bc6d7f 100644 --- a/app/app/views/cbv/submits/show.pdf.erb +++ b/app/app/views/cbv/submits/show.pdf.erb @@ -93,7 +93,7 @@ <%= t(".pdf.shared.employment_information") %> <% end %> - <% if summary[:has_identity_data] && is_caseworker %> + <% if is_caseworker && summary[:has_identity_data] %> <%= table.with_data_point(:client_full_name, summary[:identity].full_name) %> <%= table.with_data_point(:ssn, summary[:identity].ssn) %> <% end %>