Browse Source

feat: cherry pick interruption_screen_helper update from cdae8964c6

CLDC-1790-sales-validation-content-updates
natdeanlewissoftwire 2 years ago
parent
commit
7410ac79a6
  1. 4
      app/helpers/interruption_screen_helper.rb

4
app/helpers/interruption_screen_helper.rb

@ -7,6 +7,8 @@ module InterruptionScreenHelper
value = if argument["label"]
pre_casing_value = lettings_log.form.get_question(argument["key"], lettings_log).answer_label(lettings_log)
pre_casing_value.downcase
elsif argument["currency"]
["£", ActionController::Base.helpers.number_to_currency(lettings_log.public_send(argument["key"]), delimiter: ",", format: "%n")].join("")
else
lettings_log.public_send(argument["key"])
end
@ -30,6 +32,8 @@ module InterruptionScreenHelper
arguments.each do |argument|
value = if argument["label"]
lettings_log.form.get_question(argument["key"], lettings_log).answer_label(lettings_log).downcase
elsif argument["currency"]
["£", ActionController::Base.helpers.number_to_currency(lettings_log.public_send(argument["key"]), delimiter: ",", format: "%n")].join("")
else
lettings_log.public_send(argument["key"])
end

Loading…
Cancel
Save