|
|
@ -14,10 +14,7 @@ module CheckAnswersHelper |
|
|
|
subsection_keys = form.pages_for_subsection(subsection).keys |
|
|
|
subsection_keys = form.pages_for_subsection(subsection).keys |
|
|
|
page_name = subsection_keys.first |
|
|
|
page_name = subsection_keys.first |
|
|
|
|
|
|
|
|
|
|
|
# binding.pry |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
while page_name.to_s != "check_answers" && subsection_keys.include?(page_name) |
|
|
|
while page_name.to_s != "check_answers" && subsection_keys.include?(page_name) |
|
|
|
# binding.pry |
|
|
|
|
|
|
|
questions = form.questions_for_page(page_name) |
|
|
|
questions = form.questions_for_page(page_name) |
|
|
|
applicable_questions = filter_conditional_questions(questions, case_log) |
|
|
|
applicable_questions = filter_conditional_questions(questions, case_log) |
|
|
|
total_questions = total_questions.merge(applicable_questions) |
|
|
|
total_questions = total_questions.merge(applicable_questions) |
|
|
@ -55,7 +52,6 @@ module CheckAnswersHelper |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def condition_not_met(case_log, question_key, question, condition) |
|
|
|
def condition_not_met(case_log, question_key, question, condition) |
|
|
|
# binding.pry |
|
|
|
|
|
|
|
case question["type"] |
|
|
|
case question["type"] |
|
|
|
when "numeric" |
|
|
|
when "numeric" |
|
|
|
operator = condition[/[<>=]+/].to_sym |
|
|
|
operator = condition[/[<>=]+/].to_sym |
|
|
|