Browse Source

Add sales soft validations

pull/2694/head
Manny Dinssa 8 months ago
parent
commit
aa583a7d89
  1. 3
      app/models/form/sales/questions/about_price_value_check.rb
  2. 3
      app/models/form/sales/questions/buyer1_income_value_check.rb
  3. 5
      app/models/form/sales/questions/buyer2_income_value_check.rb
  4. 3
      app/models/form/sales/questions/combined_income_value_check.rb
  5. 3
      app/models/form/sales/questions/monthly_charges_value_check.rb
  6. 3
      app/models/form/sales/questions/percentage_discount_value_check.rb
  7. 40
      config/locales/forms/2023/sales/soft_validations.en.yml
  8. 40
      config/locales/forms/2024/sales/soft_validations.en.yml

3
app/models/form/sales/questions/about_price_value_check.rb

@ -2,8 +2,7 @@ class Form::Sales::Questions::AboutPriceValueCheck < ::Form::Question
def initialize(id, hsh, page)
super
@id = "value_value_check"
@check_answer_label = "Purchase price confirmation"
@header = "Are you sure?"
@copy_key = "sales.soft_validations.value_value_check"
@type = "interruption_screen"
@answer_options = {
"0" => { "value" => "Yes" },

3
app/models/form/sales/questions/buyer1_income_value_check.rb

@ -2,8 +2,7 @@ class Form::Sales::Questions::Buyer1IncomeValueCheck < ::Form::Question
def initialize(id, hsh, page, check_answers_card_number:)
super(id, hsh, page)
@id = "income1_value_check"
@check_answer_label = "Buyer 1 income confirmation"
@header = "Are you sure this is correct?"
@copy_key = "sales.soft_validations.income1_value_check"
@type = "interruption_screen"
@answer_options = {
"0" => { "value" => "Yes" },

5
app/models/form/sales/questions/buyer2_income_value_check.rb

@ -1,9 +1,8 @@
class Form::Sales::Questions::Buyer2IncomeValueCheck < ::Form::Question
def initialize(id, hsh, page, check_answers_card_number:)
super(id, hsh, page)
@id = "income2_value_check"
@check_answer_label = "Buyer 2 income confirmation"
@header = "Are you sure this is correct?"
@id = ""
@copy_key = "sales.soft_validations.income2_value_check"
@type = "interruption_screen"
@answer_options = {
"0" => { "value" => "Yes" },

3
app/models/form/sales/questions/combined_income_value_check.rb

@ -2,8 +2,7 @@ class Form::Sales::Questions::CombinedIncomeValueCheck < ::Form::Question
def initialize(id, hsh, page, check_answers_card_number:)
super(id, hsh, page)
@id = "combined_income_value_check"
@check_answer_label = "Combined income confirmation"
@header = "Are you sure this is correct?"
@copy_key = "sales.soft_validations.combined_income_value_check"
@type = "interruption_screen"
@answer_options = {
"0" => { "value" => "Yes" },

3
app/models/form/sales/questions/monthly_charges_value_check.rb

@ -2,8 +2,7 @@ class Form::Sales::Questions::MonthlyChargesValueCheck < ::Form::Question
def initialize(id, hsh, page)
super
@id = "monthly_charges_value_check"
@check_answer_label = "Monthly charges confirmation"
@header = "Are you sure this is correct?"
@copy_key = "sales.soft_validations.monthly_charges_value_check"
@type = "interruption_screen"
@answer_options = {
"0" => { "value" => "Yes" },

3
app/models/form/sales/questions/percentage_discount_value_check.rb

@ -2,8 +2,7 @@ class Form::Sales::Questions::PercentageDiscountValueCheck < ::Form::Question
def initialize(id, hsh, page)
super
@id = "percentage_discount_value_check"
@check_answer_label = "Percentage discount confirmation"
@header = "Are you sure this is correct?"
@copy_key = "sales.soft_validations.percentage_discount_value_check"
@type = "interruption_screen"
@answer_options = {
"0" => { "value" => "Yes" },

40
config/locales/forms/2023/sales/soft_validations.en.yml

@ -0,0 +1,40 @@
en:
forms:
2023:
sales:
soft_validations:
income1_value_check:
page_header: ""
check_answer_label: "Buyer 1 income confirmation"
hint_text: ""
question_text: "Are you sure this is correct?"
income2_value_check:
page_header: ""
check_answer_label: "Buyer 2 income confirmation"
hint_text: ""
question_text: "Are you sure this is correct?"
combined_income_value_check:
page_header: ""
check_answer_label: "Combined income confirmation"
hint_text: ""
question_text: "Are you sure this is correct?"
value_value_check:
page_header: ""
check_answer_label: "Purchase price confirmation"
hint_text: ""
question_text: "Are you sure?"
monthly_charges_value_check:
page_header: ""
check_answer_label: "Monthly charges confirmation"
hint_text: ""
question_text: "Are you sure this is correct?"
percentage_discount_value_check:
page_header: ""
check_answer_label: "Percentage discount confirmation"
hint_text: ""
question_text: "Are you sure this is correct?"

40
config/locales/forms/2024/sales/soft_validations.en.yml

@ -0,0 +1,40 @@
en:
forms:
2024:
sales:
soft_validations:
income1_value_check:
page_header: ""
check_answer_label: "Buyer 1 income confirmation"
hint_text: ""
question_text: "Are you sure this is correct?"
income2_value_check:
page_header: ""
check_answer_label: "Buyer 2 income confirmation"
hint_text: ""
question_text: "Are you sure this is correct?"
combined_income_value_check:
page_header: ""
check_answer_label: "Combined income confirmation"
hint_text: ""
question_text: "Are you sure this is correct?"
value_value_check:
page_header: ""
check_answer_label: "Purchase price confirmation"
hint_text: ""
question_text: "Are you sure?"
monthly_charges_value_check:
page_header: ""
check_answer_label: "Monthly charges confirmation"
hint_text: ""
question_text: "Are you sure this is correct?"
percentage_discount_value_check:
page_header: ""
check_answer_label: "Percentage discount confirmation"
hint_text: ""
question_text: "Are you sure this is correct?"
Loading…
Cancel
Save