|
|
|
|
@ -13,6 +13,26 @@ module QuestionViewHelper
|
|
|
|
|
} |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
def answer_option_synonyms(resource) |
|
|
|
|
return unless resource.instance_of?(Scheme) |
|
|
|
|
|
|
|
|
|
resource.locations.map(&:postcode).join(",") |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
def answer_option_append(resource) |
|
|
|
|
return unless resource.instance_of?(Scheme) |
|
|
|
|
|
|
|
|
|
confirmed_locations_count = resource.locations.confirmed.size |
|
|
|
|
unconfirmed_locations_count = resource.locations.unconfirmed.size |
|
|
|
|
"#{confirmed_locations_count} completed #{'location'.pluralize(confirmed_locations_count)}, #{unconfirmed_locations_count} incomplete #{'location'.pluralize(unconfirmed_locations_count)}" |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
def answer_option_hint(resource) |
|
|
|
|
return unless resource.instance_of?(Scheme) |
|
|
|
|
|
|
|
|
|
[resource.primary_client_group, resource.secondary_client_group].filter(&:present?).join(", ") |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
private |
|
|
|
|
|
|
|
|
|
def label_size(page_header, conditional, question) |
|
|
|
|
|