Skip to content
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

EL-1191: Welsh CW7 form #1040

Merged
merged 4 commits into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
359 changes: 359 additions & 0 deletions app/lib/controlled_work_mappings/civ_means_7_welsh.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,359 @@
# This file defines the mappings used to prepopulate a Welsh CIVMEANS7 PDF form with the answers given by a user to CCQ's questions
# combined with the output from CFE.

# The mappings conform to the format described in ControlledWorkDocumentValueMappingService

- section: general
fields:
# "The client has a partner whose means are to be aggregated"
- name: Partner
type: boolean_radio
source: partner
yes_value: "Ie"
no_value: "Na"

# "The client's assets (held in sole name or jointly held) have been claimed by the opponent"
- name: Client's assets claimed by opponent
type: boolean_radio
source: smod_assets?
yes_value: "Ydy"
no_value: "Nac ydy"

- section: smod_capital
fields:
# Main home / current market value (SMOD)
- name: FillText128
type: text
source: smod_main_home_value

# Other property / current market value (SMOD)
- name: FillText130
type: text
source: smod_additional_properties_value

# Main home / outstanding mortgage (SMOD)
- name: FillText129
type: text
source: smod_main_home_outstanding_mortgage

# Other property / outstanding mortgage (SMOD)
- name: FillText131
type: text
source: smod_additional_properties_outstanding_mortgage

# Main home / client's share of property for assessment (SMOD)
- name: FillText16
type: text
source: smod_main_home_percentage_owned

# Other property / client's share of property for assessment (SMOD)
- name: FillText23
type: text
source: smod_additional_properties_percentage_owned

# Main home / total net equity (SMOD)
- name: FillText134
type: text
source: smod_main_home_net_value

# Other property / total net equity (SMOD)
- name: FillText135
type: text
source: smod_additional_properties_net_value

# Main home / client's share of total net equity (SMOD)
- name: FillText80
type: text
source: smod_main_home_net_equity

# Other property / client's share of total net equity (SMOD)
- name: FillText132
type: text
source: smod_additional_properties_net_equity

# Main home / final assessed amount of client's equity (SMOD)
- name: FillText99
type: text
source: smod_main_home_assessed_equity

# Other property / final assessed amount of client's equity (SMOD)
- name: FillText100
type: text
source: smod_additional_properties_assessed_equity

# Savings (SMOD)
- name: FillText24
type: text
source: smod_savings

# Investments (SMOD)
- name: FillText25
type: text
source: smod_investments

# Valuables (SMOD)
- name: FillText55
type: text
source: smod_valuables

# Total capital part A (SMOD)
- name: FillText133
type: text
source: smod_total_capital

- section: capital
fields:
# Main home / current market value (non-SMOD)
- name: FillText21
type: text
source: non_smod_main_home_value

# Other property / current market value (non-SMOD)
- name: FillText26
type: text
source: non_smod_additional_properties_value

# Main home / outstanding mortgage (non-SMOD)
- name: FillText22
type: text
source: non_smod_main_home_outstanding_mortgage

# Other property / outstanding mortgage (non-SMOD)
- name: FillText27
type: text
source: non_smod_additional_properties_mortgage

# Main home / client's share of property for assessment (non-SMOD)
- name: FillText28
type: text
source: non_smod_main_home_percentage_owned

# Other property / client's share of property for assessment (non-SMOD)
- name: FillText29
type: text
source: non_smod_additional_properties_percentage_owned

# Main home / total net equity (non-SMOD)
- name: FillText32
type: text
source: non_smod_main_home_net_value

# Other property / total net equity (non-SMOD)
- name: FillText33
type: text
source: non_smod_additional_properties_net_value

# Main home / client's share of total net equity (non-SMOD)
- name: FillText30
type: text
source: non_smod_main_home_net_equity

# Other property / client's share of total net equity (non-SMOD)
- name: FillText31
type: text
source: non_smod_additional_properties_net_equity

# Main home / final assessed amount of client's equity (non-SMOD)
- name: FillText34
type: text
source: non_smod_main_home_assessed_equity

# Other property / final assessed amount of client's equity (non-SMOD)
- name: FillText35
type: text
source: non_smod_additional_properties_assessed_equity

# Savings (non-SMOD)
- name: FillText148
type: text
source: non_smod_client_savings

# Valuables (non-SMOD)
- name: FillText112
type: text
source: non_smod_client_valuables

# Investments (non-SMOD)
- name: FillText111
type: text
source: non_smod_client_investments

# Total capital part B (non-SMOD)
- name: FillText118
type: text
source: combined_non_disputed_capital

# Total of all capital assets (Part A and Part B)
- name: FillText149
type: text
source: combined_assessed_capital

- section: partner_capital
fields:
# Partner savings (non-SMOD)
- name: FillText114
type: text
source: partner_savings

# Partner investments (non-SMOD)
- name: FillText115
type: text
source: partner_investments

# Partner valuables (non-SMOD)
- name: FillText116
type: text
source: partner_valuables

- section: income_even_if_passported
fields:
# The client is directly or indirectly in receipt of [passporting benefit]
- name: Passported
type: boolean_radio
source: passporting
yes_value: "Ydy"
no_value: "Nac ydy"

- section: income
fields:
# Gross monthly earnings / Client
- name: FillText42
type: text
source: client_gross_income

# Other income / Client
- name: FillText44
type: text
source: client_non_employment_income

# Total gross income / Client
- name: FillText46
type: text
source: client_total_income

# Total gross income Client and Partner
- name: FillText52
type: text
source: total_combined_income

# Mortgage instalment / Client
- name: FillText53
type: text
source: client_mortgage

# Rent / Client
- name: FillText56
type: text
source: client_rent

# Dependents' allowances / Partner
- name: FillText58
type: text
source: partner_allowance

# Dependents' allowances / Aged 15 or under
- name: FillText59
type: text
source: dependants_allowance_under_16

# Dependents' allowances / Aged 16 or over
- name: FillText60
type: text
source: dependants_allowance_over_16

# Tax and national insurance / Client
- name: FillText71
type: text
source: client_tax_and_national_insurance

# Standard allowance for employment expense / Client
- name: FillText61
type: text
source: client_employment_deduction

# Maintenance allowance / Client
- name: FillText63
type: text
source: client_maintenance_allowance

# Childcare costs
- name: FillText65
type: text
source: combined_childcare_costs

# Payment of income contribution order / Client
- name: FillText74
type: text
source: client_legal_aid_contribution

# Total allowances / Client
- name: FillText66
type: text
source: client_total_allowances

# Total monthly disposable income / Client
- name: FillText69
type: text
source: client_disposable_income

# Total monthly disposable income Client and partner
- name: FillText73
type: text
source: combined_disposable_income

- section: partner_income
fields:
# Gross monthly earnings / Partner
- name: FillText43
type: text
source: partner_gross_income

# Other income / Partner
- name: FillText45
type: text
source: partner_non_employment_income

# Total gross income / Partner
- name: FillText51
type: text
source: partner_total_income

# Mortgage instalment / Partner
- name: FillText54
type: text
source: partner_mortgage

# Rent / Partner
- name: FillText57
type: text
source: partner_rent

# Tax and national insurance / Partner
- name: FillText72
type: text
source: partner_tax_and_national_insurance

# Standard allowance for employment expense / Partner
- name: FillText62
type: text
source: partner_employment_deduction

# Maintenance allowance / Partner
- name: FillText64
type: text
source: partner_maintenance_allowance

# Payment of income contribution order / Partner
- name: FillText75
type: text
source: partner_legal_aid_contribution

# Total allowances / Partner
- name: FillText68
type: text
source: partner_total_allowances

# Total monthly disposable income / Partner
- name: FillText70
type: text
source: partner_disposable_income
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def call(session_data, model)
"cw5" => "lib/cw5-form.pdf",
"cw1_and_2" => "lib/cw1-and-2-form-2023-8-21.pdf",
"civ_means_7" => "lib/civ-means-7-form.pdf",
"civ_means_7_welsh" => "lib/civ-means-7-form-welsh.pdf",
}.freeze

def template_path(form_key)
Expand Down
1 change: 1 addition & 0 deletions helm_deploy/laa-estimate-eligibility/values/ccq-uat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ featureFlags:
indexProduction: NOT_ENABLED
maintenanceMode: NOT_ENABLED
basicAuthentication: ENABLED
welshCw: ENABLED

postgresql:
enabled: true
Expand Down
Binary file added lib/civ-means-7-form-welsh.pdf
Binary file not shown.
7 changes: 4 additions & 3 deletions spec/forms/controlled_work_document_selection_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,11 @@
expect(page.response_headers["Content-Type"]).to eq("application/pdf")
end

it "errors if I choose Welsh (because that's not implemented yet)" do
choose "CW1 - legal help, help at court or family help (lower)"
it "allows me to proceed in Welsh, when I select a CW7 form" do
choose "CIV Means 7 - family mediation"
choose "Welsh"
expect { click_on "Download the pre-populated form" }.to raise_error KeyError
click_on "Download the pre-populated form"
expect(page.response_headers["Content-Type"]).to eq("application/pdf")
end
end

Expand Down
Loading