153 changed files with 2082 additions and 779 deletions
@ -1,3 +1,6 @@
|
||||
class BulkUploadError < ApplicationRecord |
||||
belongs_to :bulk_upload |
||||
|
||||
scope :order_by_cell, -> { order(Arel.sql("LPAD(cell, 10, '0')")) } |
||||
scope :order_by_col, -> { order(Arel.sql("LPAD(col, 10, '0')")) } |
||||
end |
||||
|
@ -1,16 +0,0 @@
|
||||
class Form::Lettings::Pages::UprnKnown < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "uprn_known" |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [ |
||||
Form::Lettings::Questions::UprnKnown.new(nil, nil, self), |
||||
] |
||||
end |
||||
|
||||
def routed_to?(log, _current_user = nil) |
||||
!log.is_supported_housing? |
||||
end |
||||
end |
@ -0,0 +1,21 @@
|
||||
class Form::Sales::Pages::BuyerLiveInValueCheck < Form::Sales::Pages::Person |
||||
def initialize(id, hsh, subsection, person_index:) |
||||
super |
||||
@depends_on = [ |
||||
{ |
||||
"buyer#{person_index}_livein_wrong_for_ownership_type?" => true, |
||||
}, |
||||
] |
||||
@title_text = { |
||||
"translation" => "soft_validations.buyer#{person_index}_livein_wrong_for_ownership_type.title_text", |
||||
"arguments" => [{ "key" => "ownership_scheme", "label" => false, "i18n_template" => "ownership_scheme" }], |
||||
} |
||||
@informative_text = {} |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [ |
||||
Form::Sales::Questions::BuyerLiveInValueCheck.new(nil, nil, self, person_index: @person_index), |
||||
] |
||||
end |
||||
end |
@ -0,0 +1,15 @@
|
||||
class Form::Sales::Pages::PercentageDiscountValueCheck < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@title_text = { |
||||
"translation" => "soft_validations.percentage_discount_value.title_text", |
||||
"arguments" => [{ "key" => "discount", "label" => true, "i18n_template" => "discount" }], |
||||
} |
||||
@informative_text = {} |
||||
@depends_on = [{ "percentage_discount_invalid?" => true }] |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [Form::Sales::Questions::PercentageDiscountValueCheck.new(nil, nil, self)] |
||||
end |
||||
end |
@ -1,12 +0,0 @@
|
||||
class Form::Sales::Pages::UprnKnown < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@id = "uprn_known" |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [ |
||||
Form::Sales::Questions::UprnKnown.new(nil, nil, self), |
||||
] |
||||
end |
||||
end |
@ -0,0 +1,24 @@
|
||||
class Form::Sales::Questions::BuyerLiveInValueCheck < ::Form::Question |
||||
def initialize(id, hsh, page, person_index:) |
||||
super(id, hsh, page) |
||||
@id = "buyer_livein_value_check" |
||||
@check_answer_label = "Buyer live in confirmation" |
||||
@type = "interruption_screen" |
||||
@answer_options = { |
||||
"0" => { "value" => "Yes" }, |
||||
"1" => { "value" => "No" }, |
||||
} |
||||
@hidden_in_check_answers = { |
||||
"depends_on" => [ |
||||
{ |
||||
"buyer_livein_value_check" => 0, |
||||
}, |
||||
{ |
||||
"buyer_livein_value_check" => 1, |
||||
}, |
||||
], |
||||
} |
||||
@check_answers_card_number = person_index |
||||
@header = "Are you sure this is correct?" |
||||
end |
||||
end |
@ -0,0 +1,23 @@
|
||||
class Form::Sales::Questions::PercentageDiscountValueCheck < ::Form::Question |
||||
def initialize(id, hsh, page) |
||||
super |
||||
@id = "percentage_discount_value_check" |
||||
@check_answer_label = "Percentage discount confirmation" |
||||
@header = "Are you sure this is correct?" |
||||
@type = "interruption_screen" |
||||
@answer_options = { |
||||
"0" => { "value" => "Yes" }, |
||||
"1" => { "value" => "No" }, |
||||
} |
||||
@hidden_in_check_answers = { |
||||
"depends_on" => [ |
||||
{ |
||||
"percentage_discount_value_check" => 0, |
||||
}, |
||||
{ |
||||
"percentage_discount_value_check" => 1, |
||||
}, |
||||
], |
||||
} |
||||
end |
||||
end |
@ -0,0 +1,48 @@
|
||||
<% content_for :before_content do %> |
||||
<% title = "Tell us if your organisation is merging" %> |
||||
<% content_for :title, title %> |
||||
|
||||
<%= govuk_back_link href: organisation_path %> |
||||
<% end %> |
||||
<h2 class="govuk-heading-l">Tell us if your organisation is merging</h2> |
||||
|
||||
<div class="govuk-grid-row"> |
||||
<div class="govuk-grid-column-two-thirds-from-desktop"> |
||||
<p class="govuk-body"> |
||||
Use this service to tell us if your organisation is merging with one or more other organisations. You can also use it to tell us about past merges that have not yet been reported to CORE. |
||||
</p> |
||||
|
||||
<h2 class="govuk-heading-m">Before you start</h2> |
||||
<p class="govuk-body">Regardless of the merge type, you’ll be asked for:</p> |
||||
<ul class="govuk-list govuk-list--bullet"> |
||||
<li>the organisations merging in CORE</li> |
||||
<li>the merge type: for example one organisation absorbing the rest, or them all creating a new organisation</li> |
||||
<li>to confirm or update the telephone number</li> |
||||
<li>the merge date</li> |
||||
<li>if user email addresses will change with this merge</li> |
||||
</ul> |
||||
|
||||
<h2 class="govuk-heading-m">If email addresses are changing</h2> |
||||
<%= govuk_inset_text(text: "Update all user email addresses on CORE as soon as they change, so that everyone can still access their CORE account. ") %> |
||||
<p class="govuk-body"> |
||||
Users must have access to their old email address, so they can confirm their new one. |
||||
</p> |
||||
|
||||
<h2 class="govuk-heading-m">If merging into a new organisation</h2> |
||||
<p class="govuk-body">You'll also be asked for the new organisation’s:</p> |
||||
<ul class="govuk-list govuk-list--bullet"> |
||||
<li>name</li> |
||||
<li>address</li> |
||||
<li>telephone number</li> |
||||
<li>housing provider type</li> |
||||
<li>Regulator of Social Housing registration number</li> |
||||
<li>held stock details</li> |
||||
</ul> |
||||
|
||||
<%= govuk_warning_text text: "You will not be able to submit your request without the above information. Do not start the form until you have obtained all of the information. " %> |
||||
<%= govuk_start_button( |
||||
text: "Start now", |
||||
href: "#", |
||||
) %> |
||||
</div> |
||||
</div> |
@ -0,0 +1,5 @@
|
||||
class AddPercentageDiscountValueCheck < ActiveRecord::Migration[7.0] |
||||
def change |
||||
add_column :sales_logs, :percentage_discount_value_check, :integer |
||||
end |
||||
end |
@ -0,0 +1,5 @@
|
||||
class AddBuyerLivinValueCheck < ActiveRecord::Migration[7.0] |
||||
def change |
||||
add_column :sales_logs, :buyer_livein_value_check, :integer |
||||
end |
||||
end |
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue