436 changed files with 664 additions and 4108 deletions
@ -0,0 +1,110 @@
|
||||
en: |
||||
forms: |
||||
2023: |
||||
sales: |
||||
setup: |
||||
owning_organisation_id: |
||||
page_header: "" |
||||
check_answer_label: "Owning organisation" |
||||
hint_text: "" |
||||
question_text: "Which organisation owns this log?" |
||||
|
||||
managing_organisation_id: |
||||
page_header: "" |
||||
check_answer_label: "Reported by" |
||||
hint_text: "" |
||||
question_text: "Which organisation is reporting this sale?" |
||||
|
||||
assigned_to_id: |
||||
page_header: "" |
||||
check_answer_label: "Log owner" |
||||
hint_text: "" |
||||
question_text: "Which user are you creating this log for?" |
||||
|
||||
saledate: |
||||
page_header: "" |
||||
check_answer_label: "Sale completion date" |
||||
hint_text: "" |
||||
question_text: "What is the sale completion date?" |
||||
|
||||
purchid: |
||||
page_header: "" |
||||
check_answer_label: "Purchaser code" |
||||
hint_text: "This is how you usually refer to the purchaser on your own systems." |
||||
question_text: "What is the purchaser code?" |
||||
|
||||
ownershipsch: |
||||
page_header: "" |
||||
check_answer_label: "Purchase made under ownership scheme" |
||||
hint_text: "" |
||||
question_text: "Was this purchase made through an ownership scheme?" |
||||
|
||||
type: |
||||
shared_ownership: |
||||
page_header: "Type of shared ownership sale" |
||||
check_answer_label: "Type of shared ownership sale" |
||||
hint_text: "A shared ownership sale is when the purchaser buys up to 75% of the property value and pays rent to the Private Registered Provider (PRP) on the remaining portion" |
||||
question_text: "What is the type of shared ownership sale?" |
||||
discounted_ownership: |
||||
page_header: "Type of discounted ownership sale" |
||||
check_answer_label: "Type of discounted ownership sale" |
||||
hint_text: "" |
||||
question_text: "What is the type of discounted ownership sale?" |
||||
outright_ownership: |
||||
page_header: "Type of outright sale" |
||||
type: |
||||
check_answer_label: "Type of outright sale" |
||||
hint_text: "" |
||||
question_text: "What is the type of outright sale?" |
||||
othtype: |
||||
check_answer_label: "Type of other sale" |
||||
hint_text: "" |
||||
question_text: "What type of sale is it?" |
||||
|
||||
companybuy: |
||||
page_header: "" |
||||
check_answer_label: "Company buyer" |
||||
hint_text: "" |
||||
question_text: "Is the buyer a company?" |
||||
|
||||
buylivein: |
||||
page_header: "" |
||||
check_answer_label: "Buyers living in property" |
||||
hint_text: "" |
||||
question_text: "Will the buyers live in the property?" |
||||
|
||||
jointpur: |
||||
page_header: "" |
||||
check_answer_label: "Joint purchase" |
||||
hint_text: "" |
||||
question_text: "Is this a joint purchase?" |
||||
|
||||
jointmore: |
||||
page_header: "" |
||||
check_answer_label: "More than 2 joint buyers" |
||||
hint_text: "You should still try to answer all questions even if the buyers weren’t interviewed in person" |
||||
question_text: "Are there more than 2 joint buyers of this property?" |
||||
|
||||
noint: |
||||
joint_purchase: |
||||
page_header: "" |
||||
check_answer_label: "Buyers interviewed in person?" |
||||
hint_text: "You should still try to answer all questions even if the buyers weren’t interviewed in person" |
||||
question_text: "Were the buyers interviewed for any of the answers you will provide on this log?" |
||||
not_joint_purchase: |
||||
page_header: "" |
||||
check_answer_label: "Buyer interviewed in person?" |
||||
hint_text: "You should still try to answer all questions even if the buyer wasn’t interviewed in person" |
||||
question_text: "Was the buyer interviewed for any of the answers you will provide on this log?" |
||||
|
||||
privacynotice: |
||||
joint_purchase: |
||||
page_header: "" |
||||
check_answer_label: "Buyers have seen the privacy notice?" |
||||
hint_text: "" |
||||
question_text: "Declaration" |
||||
not_joint_purchase: |
||||
page_header: "" |
||||
check_answer_label: "Buyer has seen the privacy notice?" |
||||
hint_text: "" |
||||
question_text: "Declaration" |
||||
@ -0,0 +1,110 @@
|
||||
en: |
||||
forms: |
||||
2024: |
||||
sales: |
||||
setup: |
||||
owning_organisation_id: |
||||
page_header: "" |
||||
check_answer_label: "Owning organisation" |
||||
hint_text: "" |
||||
question_text: "Which organisation owns this log?" |
||||
|
||||
managing_organisation_id: |
||||
page_header: "" |
||||
check_answer_label: "Reported by" |
||||
hint_text: "" |
||||
question_text: "Which organisation is reporting this sale?" |
||||
|
||||
assigned_to_id: |
||||
page_header: "" |
||||
check_answer_label: "Log owner" |
||||
hint_text: "" |
||||
question_text: "Which user are you creating this log for?" |
||||
|
||||
saledate: |
||||
page_header: "" |
||||
check_answer_label: "Sale completion date" |
||||
hint_text: "" |
||||
question_text: "What is the sale completion date?" |
||||
|
||||
purchid: |
||||
page_header: "" |
||||
check_answer_label: "Purchaser code" |
||||
hint_text: "This is how you usually refer to the purchaser on your own systems." |
||||
question_text: "What is the purchaser code?" |
||||
|
||||
ownershipsch: |
||||
page_header: "" |
||||
check_answer_label: "Purchase made under ownership scheme" |
||||
hint_text: "" |
||||
question_text: "Was this purchase made through an ownership scheme?" |
||||
|
||||
type: |
||||
shared_ownership: |
||||
page_header: "Type of shared ownership sale" |
||||
check_answer_label: "Type of shared ownership sale" |
||||
hint_text: "When the purchaser buys an initial share of up to 75% of the property value and pays rent to the Private Registered Provider (PRP) on the remaining portion, or a subsequent staircasing transaction" |
||||
question_text: "What is the type of shared ownership sale?" |
||||
discounted_ownership: |
||||
page_header: "Type of discounted ownership sale" |
||||
check_answer_label: "Type of discounted ownership sale" |
||||
hint_text: "" |
||||
question_text: "What is the type of discounted ownership sale?" |
||||
outright_ownership: |
||||
page_header: "Type of outright sale" |
||||
type: |
||||
check_answer_label: "Type of outright sale" |
||||
hint_text: "" |
||||
question_text: "What is the type of outright sale?" |
||||
othtype: |
||||
check_answer_label: "Type of other sale" |
||||
hint_text: "" |
||||
question_text: "What type of sale is it?" |
||||
|
||||
companybuy: |
||||
page_header: "" |
||||
check_answer_label: "Company buyer" |
||||
hint_text: "" |
||||
question_text: "Is the buyer a company?" |
||||
|
||||
buylivein: |
||||
page_header: "" |
||||
check_answer_label: "Buyers living in property" |
||||
hint_text: "" |
||||
question_text: "Will any buyers live in the property?" |
||||
|
||||
jointpur: |
||||
page_header: "" |
||||
check_answer_label: "Joint purchase" |
||||
hint_text: "This is where two or more people are named as legal owners of the property after the purchase" |
||||
question_text: "Is this a joint purchase?" |
||||
|
||||
jointmore: |
||||
page_header: "" |
||||
check_answer_label: "More than 2 joint buyers" |
||||
hint_text: "" |
||||
question_text: "Are there more than 2 joint buyers of this property?" |
||||
|
||||
noint: |
||||
joint_purchase: |
||||
page_header: "" |
||||
check_answer_label: "Buyers interviewed in person?" |
||||
hint_text: "You should still try to answer all questions even if the buyers weren’t interviewed in person" |
||||
question_text: "Were the buyers interviewed for any of the answers you will provide on this log?" |
||||
not_joint_purchase: |
||||
page_header: "" |
||||
check_answer_label: "Buyer interviewed in person?" |
||||
hint_text: "You should still try to answer all questions even if the buyer wasn’t interviewed in person" |
||||
question_text: "Was the buyer interviewed for any of the answers you will provide on this log?" |
||||
|
||||
privacynotice: |
||||
joint_purchase: |
||||
page_header: "Ministry of Housing, Communities and Local Government privacy notice" |
||||
check_answer_label: "Buyers have seen the privacy notice?" |
||||
hint_text: "" |
||||
question_text: "Declaration" |
||||
not_joint_purchase: |
||||
page_header: "Ministry of Housing, Communities and Local Government privacy notice" |
||||
check_answer_label: "Buyer has seen the privacy notice?" |
||||
hint_text: "" |
||||
question_text: "Declaration" |
||||
@ -0,0 +1,25 @@
|
||||
en: |
||||
validations: |
||||
sales: |
||||
setup: |
||||
saledate: |
||||
not_within: |
||||
next_two_weeks: "Sale completion date must not be later than 14 days from today’s date." |
||||
must_be_within: |
||||
current_collection_year: |
||||
"Enter a date within the %{current_start_year_short}/%{current_end_year_short} collection year, which is between %{current_start_year_long} and %{current_end_year_long}." |
||||
previous_and_current_collection_year: |
||||
"Enter a date within the %{previous_start_year_short}/%{previous_end_year_short} or %{previous_end_year_short}/%{current_end_year_short} collection years, which is between %{previous_start_year_long} and %{current_end_year_long}." |
||||
invalid: |
||||
merged_organisations: |
||||
"Enter a date when the owning organisation was active. %{owning_organisation} became inactive on %{merge_date} and was replaced by %{absorbing_organisation}." |
||||
absorbing_organisations: |
||||
"Enter a date when the owning organisation was active. %{owning_organisation} became active on %{available_from}." |
||||
|
||||
owning_organisation: |
||||
inactive: |
||||
merged_organisation: |
||||
"The owning organisation must be active on the sale completion date. %{owning_organisation} became inactive on %{merge_date} and was replaced by %{absorbing_organisation}." |
||||
absorbing_organisation: |
||||
"The owning organisation must be active on the sale completion date. %{owning_organisation} became active on %{available_from}." |
||||
|
||||
@ -0,0 +1,37 @@
|
||||
require "rails_helper" |
||||
|
||||
RSpec.describe "OrganisationRelationships", type: :feature do |
||||
context "when viewing the stock owners page" do |
||||
let(:user) { create(:user) } |
||||
|
||||
before do |
||||
sign_in user |
||||
create(:organisation_relationship, parent_organisation: create(:organisation, name: "Zeta"), child_organisation: user.organisation) |
||||
create(:organisation_relationship, parent_organisation: create(:organisation, name: "Alpha"), child_organisation: user.organisation) |
||||
create(:organisation_relationship, parent_organisation: create(:organisation, name: "Gamma"), child_organisation: user.organisation) |
||||
create(:organisation_relationship, parent_organisation: create(:organisation, name: "ABACUS"), child_organisation: user.organisation) |
||||
visit("organisations/#{user.organisation.id}/stock-owners") |
||||
end |
||||
|
||||
it "displays stock owners in alphabetical order" do |
||||
expect(page).to have_content(/ABACUS.*Alpha.*Gamma.*Zeta/m) |
||||
end |
||||
end |
||||
|
||||
context "when viewing the managing agents page" do |
||||
let(:user) { create(:user) } |
||||
|
||||
before do |
||||
sign_in user |
||||
create(:organisation_relationship, parent_organisation: user.organisation, child_organisation: create(:organisation, name: "Zeta")) |
||||
create(:organisation_relationship, parent_organisation: user.organisation, child_organisation: create(:organisation, name: "Alpha")) |
||||
create(:organisation_relationship, parent_organisation: user.organisation, child_organisation: create(:organisation, name: "Gamma")) |
||||
create(:organisation_relationship, parent_organisation: user.organisation, child_organisation: create(:organisation, name: "ABACUS")) |
||||
visit("organisations/#{user.organisation.id}/managing-agents") |
||||
end |
||||
|
||||
it "displays stock owners in alphabetical order" do |
||||
expect(page).to have_content(/ABACUS.*Alpha.*Gamma.*Zeta/m) |
||||
end |
||||
end |
||||
end |
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue