Browse Source

WIP

pull/2672/head
Rachael Booth 9 months ago
parent
commit
eeca40521f
  1. 5
      app/models/form/sales/questions/created_by_id.rb
  2. 5
      app/models/form/sales/questions/managing_organisation.rb
  3. 5
      app/models/form/sales/questions/owning_organisation_id.rb
  4. 21
      config/locales/forms/2024/sales/setup.en.yml

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

@ -4,8 +4,9 @@ class Form::Sales::Questions::CreatedById < ::Form::Question
def initialize(id, hsh, page)
super
@id = "assigned_to_id"
@check_answer_label = "Log owner"
@header = "Which user are you creating this log for?"
@check_answer_label = I18n.t("forms.#{form.start_date.year}.sales.setup.assigned_to_id.check_answer_label")
@header = I18n.t("forms.#{form.start_date.year}.sales.setup.assigned_to_id.question_text")
@hint = I18n.t("forms.#{form.start_date.year}.sales.setup.assigned_to_id.hint_text")
@derived = true
@type = "select"
end

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

@ -2,8 +2,9 @@ class Form::Sales::Questions::ManagingOrganisation < ::Form::Question
def initialize(id, hsh, page)
super
@id = "managing_organisation_id"
@check_answer_label = "Reported by"
@header = "Which organisation is reporting this sale?"
@check_answer_label = I18n.t("forms.#{form.start_date.year}.sales.setup.managing_organisation_id.check_answer_label")
@header = I18n.t("forms.#{form.start_date.year}.sales.setup.managing_organisation_id.question_text")
@hint = I18n.t("forms.#{form.start_date.year}.sales.setup.managing_organisation_id.hint_text")
@derived = true
@type = "select"
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]

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

@ -2,8 +2,9 @@ class Form::Sales::Questions::OwningOrganisationId < ::Form::Question
def initialize(id, hsh, page)
super
@id = "owning_organisation_id"
@check_answer_label = "Owning organisation"
@header = "Which organisation owns this log?"
@check_answer_label = I18n.t("forms.#{form.start_date.year}.sales.setup.owning_organisation_id.check_answer_label")
@header = I18n.t("forms.#{form.start_date.year}.sales.setup.owning_organisation_id.question_text")
@hint_text = I18n.t("forms.#{form.start_date.year}.sales.setup.owning_organisation_id.hint_text")
@derived = true
@type = "select"
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]

21
config/locales/forms/2024/sales/setup.en.yml

@ -0,0 +1,21 @@
en:
forms:
2024:
sales:
setup:
owning_organisation_id:
check_answer_label: "Owning organisation"
hint_text: ""
question_text: "Which organisation owns this log?"
managing_organisation_id:
check_answer_label: "Reported by"
hint_text: ""
question_text: "Which organisation is reporting this sale?"
assigned_to_id:
check_answer_label: "Log owner"
hint_text: ""
question_text: "Which user are you creating this log for?"
Loading…
Cancel
Save