Skip to content

Commit

Permalink
AP-4583: update drop down list with client and parnter employment evi…
Browse files Browse the repository at this point in the history
…dence
  • Loading branch information
skdejong committed Nov 2, 2023
1 parent 71fbada commit 9ca3178
Show file tree
Hide file tree
Showing 34 changed files with 87 additions and 70 deletions.
2 changes: 1 addition & 1 deletion app/services/required_document_category_analyser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def call
required_document_categories = []
required_document_categories << "benefit_evidence" if @application.dwp_override&.has_evidence_of_benefit?
required_document_categories << "gateway_evidence" if @application.section_8_proceedings?
required_document_categories << "employment_evidence" if @application.employment_evidence_required?
required_document_categories << "client_employment_evidence" if @application.employment_evidence_required?
required_document_categories << "partner_employment_evidence" if @application&.partner&.employment_evidence_required?
required_document_categories << "court_application_or_order" if has_opponents_application? && !has_listed_final_hearing?
if has_listed_final_hearing? && !has_opponents_application?
Expand Down
8 changes: 7 additions & 1 deletion app/services/uploaded_evidence/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,17 @@ def call
end

def attachment_type_options
@attachment_type_options = required_documents.map { |rd| [rd, rd.humanize] }
@attachment_type_options = required_documents.map { |rd| [rd, attachment_type_name(rd)] }
@attachment_type_options << %w[uncategorised Uncategorised]
@attachment_type_options
end

def attachment_type_name(type)
I18n.t!("shared.check_answers.supporting_evidence.evidence_types.#{type}")
rescue I18n::MissingTranslationData
type.humanize
end

def evidence_type_translation
return unless required_documents.include?("benefit_evidence")

Expand Down
4 changes: 2 additions & 2 deletions app/validators/document_category_validator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ class DocumentCategoryValidator < ActiveModel::Validator
bank_transaction_report
benefit_evidence
benefit_evidence_pdf
employment_evidence
employment_evidence_pdf
client_employment_evidence
client_employment_evidence_pdf
partner_employment_evidence
partner_employment_evidence_pdf
gateway_evidence
Expand Down
2 changes: 1 addition & 1 deletion ccms_integration/example_payloads/NonMeansTested.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2760,7 +2760,7 @@
<ns3:Attribute>
<ns3:Attribute>DECLARATION_CLIENT_TEXT</ns3:Attribute>
<ns3:ResponseType>text</ns3:ResponseType>
<ns3:ResponseValue>1. a) Clients Merits Declaration</ns3:ResponseValue>
<ns3:ResponseValue>1. a) Client's Merits Declaration</ns3:ResponseValue>
<ns3:UserDefinedInd>false</ns3:UserDefinedInd>
</ns3:Attribute>
<ns3:Attribute>
Expand Down
4 changes: 2 additions & 2 deletions config/locales/en/activemodel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ en:
proceeding:
attributes:
client_involvement_type_ccms_code:
blank: Select your clients role in this proceeding
blank: Select your client's role in this proceeding
accepted_emergency_defaults:
blank: Select yes if you accept the default service level and scope for the emergency application
accepted_substantive_defaults:
Expand Down Expand Up @@ -815,7 +815,7 @@ en:
original_file:
benefit_evidence_missing: Upload evidence that your client receives %{benefit}
content_type_invalid: The selected file must be a DOC, DOCX, RTF, ODT, JPG, BMP, PNG, TIF or PDF
employment_evidence_missing: Upload your client's employment evidence
client_employment_evidence_missing: Upload your client's employment evidence
partner_employment_evidence_missing: Upload the partner's employment evidence
court_application_or_order_missing: Upload the application to court or the court order for Section 8 proceedings
court_application_missing: Upload the application to court for Section 8 proceedings
Expand Down
12 changes: 6 additions & 6 deletions config/locales/en/providers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ en:
list:
<<: *list
g: the information they and their partner have given is complete and correct
partner_text: "Your clients partner, %{partner_name}, agrees that:"
partner_text: "Your client's partner, %{partner_name}, agrees that:"
partner_list:
a_html: they've read the <a href="/privacy_policy">LAA privacy policy</a>
b: we can share their information with other government departments like DWP and HMRC
Expand Down Expand Up @@ -328,7 +328,7 @@ en:
title: Check your answers
section_next:
heading: What happens next
content: Well use your clients name, date of birth and National Insurance number to check their benefit status with the Department for Work and Pensions (DWP).
content: We'll use your client's name, date of birth and National Insurance number to check their benefit status with the Department for Work and Pensions (DWP).
read_only:
title: Your application
banner:
Expand All @@ -351,7 +351,7 @@ en:
substantive_cost_limit: Substantive cost limit
applicant_bank_accounts:
show:
heading: Your clients bank accounts
heading: Your client's bank accounts
previously_told: Your client shared this information using TrueLayer.
account: Account
balance: Balance
Expand Down Expand Up @@ -704,7 +704,7 @@ en:
under_18: Print the completed application and get the person acting for %{applicant_name} to sign it. For example, a litigation friend, a professional children’s guardian or a parental order report.
over_18: Print the completed application and get your client to sign it.
with_partner: Print the completed application and get your client and their partner to sign it.
financial_evidence: any evidence you used to determine your clients financial situation
financial_evidence: any evidence you used to determine your client's financial situation
client_sign: a signed copy of the declaration
keep_file: "Keep on file:"
copy_application: a copy of the application
Expand All @@ -726,7 +726,7 @@ en:
single_non_specific_item: "Use this page to provide %{item}."
list_text: 'Use this page to upload:'
benefit_evidence: evidence that your client receives %{benefit}
employment_evidence: evidence of your client's employment status
client_employment_evidence: evidence of your client's employment status
partner_employment_evidence: evidence of the partner's employment status
gateway_evidence: gateway evidence for Section 8 proceedings (optional)
court_application: the application to court for Section 8 proceedings (optional)
Expand Down Expand Up @@ -1581,7 +1581,7 @@ en:
multi_proceeding: Proceeding %{position} of %{total}
client_involvement_type:
show:
question: What is your clients role in this proceeding?
question: What is your client's role in this proceeding?
delegated_functions:
show:
question: Have you used delegated functions for this proceeding?
Expand Down
3 changes: 2 additions & 1 deletion config/locales/en/shared.yml
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,8 @@ en:
supporting_evidence:
evidence_types:
benefit_evidence: Benefit evidence
employment_evidence: Employment evidence
client_employment_evidence: Client's employment evidence
partner_employment_evidence: Partner's employment evidence
gateway_evidence: Gateway evidence
court_application_or_order: Court application or order
court_order: Court order
Expand Down
6 changes: 3 additions & 3 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema[7.0].define(version: 2023_10_09_145448) do
ActiveRecord::Schema[7.1].define(version: 2023_10_09_145448) do
# These are extensions that must be enabled in order to support this database
enable_extension "pgcrypto"
enable_extension "plpgsql"
Expand Down Expand Up @@ -1071,8 +1071,8 @@
add_foreign_key "legal_aid_applications", "providers"
add_foreign_key "legal_framework_merits_task_lists", "legal_aid_applications", on_delete: :cascade
add_foreign_key "legal_framework_submissions", "legal_aid_applications"
add_foreign_key "linked_applications", "legal_aid_applications", column: "associated_application_id"
add_foreign_key "linked_applications", "legal_aid_applications", column: "lead_application_id"
add_foreign_key "linked_applications", "legal_aid_applications", column: "associated_application_id", validate: false
add_foreign_key "linked_applications", "legal_aid_applications", column: "lead_application_id", validate: false
add_foreign_key "matter_oppositions", "legal_aid_applications", on_delete: :cascade
add_foreign_key "offices", "firms"
add_foreign_key "offices_providers", "offices"
Expand Down
4 changes: 2 additions & 2 deletions db/seeds/document_categories.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name,submit_to_ccms,ccms_document_type,display_on_evidence_upload,mandatory
bank_transaction_report,TRUE,BSTMT,FALSE,FALSE
benefit_evidence,FALSE,,TRUE,TRUE
benefit_evidence_pdf,TRUE,ADMIN1,FALSE,FALSE
employment_evidence,FALSE,,TRUE,TRUE
employment_evidence_pdf,TRUE,ADMIN1,FALSE,FALSE
client_employment_evidence,FALSE,,TRUE,TRUE
client_employment_evidence_pdf,TRUE,ADMIN1,FALSE,FALSE
partner_employment_evidence,FALSE,,TRUE,TRUE
partner_employment_evidence_pdf,TRUE,ADMIN1,FALSE,FALSE
gateway_evidence,FALSE,,TRUE,FALSE
Expand Down
18 changes: 9 additions & 9 deletions features/providers/applicant_details.feature
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Feature: Applicant details
Then I should be on a page showing 'You have added 3 proceedings'
Then I choose 'No'
Then I click 'Save and continue'
Then I should see 'Proceeding 1 of 3\nFGM Protection Order\nWhat is your clients role in this proceeding?'
Then I should see 'Proceeding 1 of 3\nFGM Protection Order\nWhat is your client's role in this proceeding?'
When I choose 'Applicant/claimant/petitioner'
And I click 'Save and continue'
Then I should see 'Proceeding 1 of 3\nFGM Protection Order\nHave you used delegated functions for this proceeding?'
Expand All @@ -73,7 +73,7 @@ Feature: Applicant details
And I should see 'Do you want to use the default level of service and scope for the substantive application?'
When I choose 'Yes'
And I click 'Save and continue'
Then I should see 'Proceeding 2 of 3\nOccupation order\nWhat is your clients role in this proceeding?'
Then I should see 'Proceeding 2 of 3\nOccupation order\nWhat is your client's role in this proceeding?'
When I choose 'Defendant/respondent'
And I click 'Save and continue'
Then I should see 'Proceeding 2 of 3\nOccupation order\nHave you used delegated functions for this proceeding?'
Expand All @@ -92,7 +92,7 @@ Feature: Applicant details
And I should see 'Do you want to use the default level of service and scope for the substantive application?'
When I choose 'Yes'
And I click 'Save and continue'
Then I should see 'Proceeding 3 of 3\nHarassment - injunction\nWhat is your clients role in this proceeding?'
Then I should see 'Proceeding 3 of 3\nHarassment - injunction\nWhat is your client's role in this proceeding?'
When I choose 'Defendant/respondent'
And I click 'Save and continue'
Then I should see 'Proceeding 3 of 3\nHarassment - injunction\nHave you used delegated functions for this proceeding?'
Expand Down Expand Up @@ -147,7 +147,7 @@ Feature: Applicant details
Then I should be on a page showing 'Do you want to add another proceeding?'
Then I choose 'No'
Then I click 'Save and continue'
Then I should see 'Proceeding 1\nNon-molestation order\nWhat is your clients role in this proceeding?'
Then I should see 'Proceeding 1\nNon-molestation order\nWhat is your client's role in this proceeding?'
When I choose 'Applicant/claimant/petitioner'
And I click 'Save and continue'
Then I should see 'Proceeding 1\nNon-molestation order\nHave you used delegated functions for this proceeding?'
Expand Down Expand Up @@ -214,7 +214,7 @@ Feature: Applicant details
Then I should be on a page showing 'Do you want to add another proceeding?'
When I choose 'No'
And I click 'Save and continue'
Then I should see 'Proceeding 1 of 2\nNon-molestation order\nWhat is your clients role in this proceeding?'
Then I should see 'Proceeding 1 of 2\nNon-molestation order\nWhat is your client's role in this proceeding?'
When I choose 'Applicant/claimant/petitioner'
And I click 'Save and continue'
Then I should see 'Proceeding 1 of 2\nNon-molestation order\nHave you used delegated functions for this proceeding?'
Expand All @@ -224,7 +224,7 @@ Feature: Applicant details
And I should see 'Do you want to use the default level of service and scope for the substantive application?'
When I choose 'Yes'
And I click 'Save and continue'
Then I should see 'Proceeding 2 of 2\nChild arrangements order \(residence\)\nWhat is your clients role in this proceeding?'
Then I should see 'Proceeding 2 of 2\nChild arrangements order \(residence\)\nWhat is your client's role in this proceeding?'
When I choose 'Applicant/claimant/petitioner'
And I click 'Save and continue'
Then I should see 'Proceeding 2 of 2\nChild arrangements order \(residence\)\nHave you used delegated functions for this proceeding?'
Expand Down Expand Up @@ -283,7 +283,7 @@ Feature: Applicant details
Then I should be on a page showing 'Do you want to add another proceeding?'
Then I choose 'No'
Then I click 'Save and continue'
Then I should see 'Proceeding 1\nNon-molestation order\nWhat is your clients role in this proceeding?'
Then I should see 'Proceeding 1\nNon-molestation order\nWhat is your client's role in this proceeding?'
When I choose 'Applicant/claimant/petitioner'
And I click 'Save and continue'
Then I should see 'Proceeding 1\nNon-molestation order\nHave you used delegated functions for this proceeding?'
Expand Down Expand Up @@ -335,7 +335,7 @@ Feature: Applicant details
Then I should be on a page showing 'Do you want to add another proceeding?'
Then I choose 'No'
Then I click 'Save and continue'
Then I should see 'Proceeding 1\nNon-molestation order\nWhat is your clients role in this proceeding?'
Then I should see 'Proceeding 1\nNon-molestation order\nWhat is your client's role in this proceeding?'
When I choose 'Applicant/claimant/petitioner'
And I click 'Save and continue'
Then I should see 'Proceeding 1\nNon-molestation order\nHave you used delegated functions for this proceeding?'
Expand Down Expand Up @@ -395,7 +395,7 @@ Feature: Applicant details
Then I should be on a page showing 'Do you want to add another proceeding?'
Then I choose 'No'
Then I click 'Save and continue'
Then I should see 'Proceeding 1\nNon-molestation order\nWhat is your clients role in this proceeding?'
Then I should see 'Proceeding 1\nNon-molestation order\nWhat is your client's role in this proceeding?'
When I choose 'Applicant/claimant/petitioner'
And I click 'Save and continue'
Then I should see 'Proceeding 1\nNon-molestation order\nHave you used delegated functions for this proceeding?'
Expand Down
2 changes: 1 addition & 1 deletion features/providers/applicant_under_16_blocked.feature
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Feature: Applicant under 16 blocked
Then I should be on a page showing 'Do you want to add another proceeding?'
When I choose 'No'
And I click 'Save and continue'
Then I should see 'Proceeding 1\nNon-molestation order\nWhat is your clients role in this proceeding?'
Then I should see 'Proceeding 1\nNon-molestation order\nWhat is your client's role in this proceeding?'
When I choose 'Applicant/claimant/petitioner'
And I click 'Save and continue'
Then I should see 'Proceeding 1\nNon-molestation order\nHave you used delegated functions for this proceeding?'
Expand Down
4 changes: 2 additions & 2 deletions features/providers/check_multiple_employment.feature
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Feature: Check multiple employment

When I choose "No"
And I click 'Save and continue'
Then I should be on a page showing "Your clients bank accounts"
Then I should be on a page showing "Your client's bank accounts"

When I choose "No"
And I click 'Save and continue'
Expand Down Expand Up @@ -146,7 +146,7 @@ Feature: Check multiple employment

When I upload an evidence file named 'hello_world.pdf'
And I sleep for 2 seconds
Then I should be able to categorise 'hello_world.pdf' as 'Employment evidence'
Then I should be able to categorise 'hello_world.pdf' as 'Client's employment evidence'

When I click 'Save and continue'
Then I should be on a page showing "Check your answers"
Expand Down
4 changes: 2 additions & 2 deletions features/providers/check_nonpassport_autogrant.feature
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Feature: Checking ccms means does NOT auto grant for non passported applications
Then I am on the "Does your client own a vehicle?" page
Then I choose "legal-aid-application-own-vehicle-field"
Then I click 'Save and continue'
Then I am on the "Your clients bank accounts" page
Then I am on the "Your client's bank accounts" page
Then I choose "No"
Then I click 'Save and continue'
Then I am on the "Which savings or investments does your client have?" page
Expand Down Expand Up @@ -188,7 +188,7 @@ Feature: Checking ccms means does NOT auto grant for non passported applications
Then I am on the "Does your client own a vehicle?" page
Then I choose "legal-aid-application-own-vehicle-field"
Then I click 'Save and continue'
Then I am on the "Your clients bank accounts" page
Then I am on the "Your client's bank accounts" page
Then I choose "No"
Then I click 'Save and continue'
Then I am on the "Which savings or investments does your client have?" page
Expand Down
4 changes: 2 additions & 2 deletions features/providers/check_pending_employment.feature
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Feature: Check pending employment
When I choose "No"
And I click 'Save and continue'

Then I should be on a page showing "Your clients bank accounts"
Then I should be on a page showing "Your client's bank accounts"

When I choose "No"
And I click 'Save and continue'
Expand Down Expand Up @@ -139,7 +139,7 @@ Feature: Check pending employment

When I upload an evidence file named 'hello_world.pdf'
And I sleep for 2 seconds
Then I should be able to categorise 'hello_world.pdf' as 'Employment evidence'
Then I should be able to categorise 'hello_world.pdf' as 'Client's employment evidence'

And I click 'Save and continue'
Then I should be on a page showing "Check your answers"
Expand Down
2 changes: 1 addition & 1 deletion features/providers/check_provider_answers.feature
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ Feature: Checking client details answers backwards and forwards
Then I should be on a page showing 'Do you want to add another proceeding?'
Then I choose 'No'
Then I click 'Save and continue'
Then I should see 'Proceeding 1\nNon-molestation order\nWhat is your clients role in this proceeding?'
Then I should see 'Proceeding 1\nNon-molestation order\nWhat is your client's role in this proceeding?'
When I choose 'Applicant/claimant/petitioner'
And I click 'Save and continue'
Then I should see 'Proceeding 1\nNon-molestation order\nHave you used delegated functions for this proceeding?'
Expand Down
4 changes: 2 additions & 2 deletions features/providers/check_single_employment.feature
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Feature: Check single employment

When I choose "No"
And I click 'Save and continue'
Then I should be on a page showing "Your clients bank accounts"
Then I should be on a page showing "Your client's bank accounts"

When I choose "No"
And I click 'Save and continue'
Expand Down Expand Up @@ -142,7 +142,7 @@ Feature: Check single employment

When I upload an evidence file named 'hello_world.pdf'
And I sleep for 2 seconds
And I should be able to categorise 'hello_world.pdf' as 'Employment evidence'
And I should be able to categorise 'hello_world.pdf' as 'Client's employment evidence'
And I click 'Save and continue'
Then I should be on a page showing "Check your answers"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ Feature: Completing and checking means answers backwards and forwards

When I choose "No"
And I click 'Save and continue'
Then I should be on a page with title "Your clients bank accounts"
Then I should be on a page with title "Your client's bank accounts"

When I choose "No"
And I click 'Save and continue'
Expand Down
2 changes: 1 addition & 1 deletion features/providers/cost_override.feature
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Feature: Emergency cost override
Then I should be on a page showing 'Do you want to add another proceeding?'
When I choose 'No'
And I click 'Save and continue'
Then I should see 'Proceeding 1\nNon-molestation order\nWhat is your clients role in this proceeding?'
Then I should see 'Proceeding 1\nNon-molestation order\nWhat is your client's role in this proceeding?'
When I choose 'Applicant/claimant/petitioner'
And I click 'Save and continue'
Then I should see 'Proceeding 1\nNon-molestation order\nHave you used delegated functions for this proceeding?'
Expand Down
Loading

0 comments on commit 9ca3178

Please sign in to comment.