|
|
|
@ -6,7 +6,7 @@ class Form::Sales::Questions::PersonSexRegisteredAtBirth < ::Form::Question |
|
|
|
@check_answers_card_number = person_index |
|
|
|
@check_answers_card_number = person_index |
|
|
|
@answer_options = ANSWER_OPTIONS |
|
|
|
@answer_options = ANSWER_OPTIONS |
|
|
|
@person_index = person_index |
|
|
|
@person_index = person_index |
|
|
|
@question_number = question_number |
|
|
|
@question_number = get_person_question_number(BASE_QUESTION_NUMBERS) |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
ANSWER_OPTIONS = { |
|
|
|
ANSWER_OPTIONS = { |
|
|
|
@ -17,11 +17,6 @@ class Form::Sales::Questions::PersonSexRegisteredAtBirth < ::Form::Question |
|
|
|
}.freeze |
|
|
|
}.freeze |
|
|
|
|
|
|
|
|
|
|
|
BASE_QUESTION_NUMBERS = { 2023 => 30, 2024 => 32, 2025 => 31 }.freeze |
|
|
|
BASE_QUESTION_NUMBERS = { 2023 => 30, 2024 => 32, 2025 => 31 }.freeze |
|
|
|
def question_number |
|
|
|
|
|
|
|
base_question_number = BASE_QUESTION_NUMBERS[form.start_date.year] || BASE_QUESTION_NUMBERS[BASE_QUESTION_NUMBERS.keys.max] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
base_question_number + (form.person_question_count * @person_index) |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def label_from_value(value, _log = nil, _user = nil) |
|
|
|
def label_from_value(value, _log = nil, _user = nil) |
|
|
|
return unless value |
|
|
|
return unless value |
|
|
|
|