Submit social housing lettings and sales data (CORE)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
2.0 KiB

<%= form_with model: @organisation_relationship, url: stock_owners_organisation_path, method: "post", local: true do |f| %>
Cldc 1662 add housing provider (#954) * wip * Rename managing_agents column * add managing relationship * f * feat: add my features branched off managing agents branch * feat: update nav behaviour * feat: simplify housing_providers view * feat: fix pluralise to default to plural rather than singular * feat: remove managing agent related code so can be merged directly * tests: update tests and add new ones for housing_providers * refactor: rubocop conciliation * tests: fix failing navigation tests * tests: one more plural test * refactor: erb linting * refactor: erb linting * feat: right-align "Remove" text * feat: update nokogiri to pass bundler-audit * feat: grey out search button * feat: remove section-break * feat: add housing provider page with details and button * feat: tidy up routing * feat: add wip housing provider behaviour without functioning search * feat: wip add housing provider functionality hard coded to add FooBar LTD as provider to DLUHC * feat: remove redundant code * feat: add data passing behaviour without accessible autocomplete * feat: use accessible autocomplete (not working) * feat: use accessible autocomplete (now working) * feat: wip commit error messages * feat: add banner always * feat: add conditional banner behaviour, back link and update logs titles * feat: add search icon to accessible autocomplete, make hint text aligned correctly * feat: use pluck not all * tests: add initial test * feat: refactor create logic * feat: add sub org title * feat: add correct no housing providers text * feat: add correct no housing providers text * tests: add tests for add housing provider page * feat: remove unnecessary line from controller * fet: simplify controller args * fet: update schema * feat: update schema * feat: remove create_managing_agent * test: add support user tests * test: add create_housing_provider tests * refactor: rubocop autocorrect * refactor: erblinting * test: fix tests * refactor: erblinting * feat: don't use !important tag Co-authored-by: Jack S <jacopo.scotti@softwire.com>
2 years ago
<% if current_user.support? %>
<%= render partial: "organisations/headings", locals: { main: @organisation.name, sub: nil } %>
<%= render SubNavigationComponent.new(items: secondary_items(request.path, @organisation.id)) %>
<h2 class="govuk-visually-hidden">Add Stock Owner</h2>
Cldc 1662 add housing provider (#954) * wip * Rename managing_agents column * add managing relationship * f * feat: add my features branched off managing agents branch * feat: update nav behaviour * feat: simplify housing_providers view * feat: fix pluralise to default to plural rather than singular * feat: remove managing agent related code so can be merged directly * tests: update tests and add new ones for housing_providers * refactor: rubocop conciliation * tests: fix failing navigation tests * tests: one more plural test * refactor: erb linting * refactor: erb linting * feat: right-align "Remove" text * feat: update nokogiri to pass bundler-audit * feat: grey out search button * feat: remove section-break * feat: add housing provider page with details and button * feat: tidy up routing * feat: add wip housing provider behaviour without functioning search * feat: wip add housing provider functionality hard coded to add FooBar LTD as provider to DLUHC * feat: remove redundant code * feat: add data passing behaviour without accessible autocomplete * feat: use accessible autocomplete (not working) * feat: use accessible autocomplete (now working) * feat: wip commit error messages * feat: add banner always * feat: add conditional banner behaviour, back link and update logs titles * feat: add search icon to accessible autocomplete, make hint text aligned correctly * feat: use pluck not all * tests: add initial test * feat: refactor create logic * feat: add sub org title * feat: add correct no housing providers text * feat: add correct no housing providers text * tests: add tests for add housing provider page * feat: remove unnecessary line from controller * fet: simplify controller args * fet: update schema * feat: update schema * feat: remove create_managing_agent * test: add support user tests * test: add create_housing_provider tests * refactor: rubocop autocorrect * refactor: erblinting * test: fix tests * refactor: erblinting * feat: don't use !important tag Co-authored-by: Jack S <jacopo.scotti@softwire.com>
2 years ago
<%= govuk_back_link(href: :back) %>
<%= render partial: "organisations/headings", locals: { main: "What is the name of this organisation's stock owner?", sub: nil } %>
<p class="govuk-body">Start typing to search for a stock owner</p>
Cldc 1662 add housing provider (#954) * wip * Rename managing_agents column * add managing relationship * f * feat: add my features branched off managing agents branch * feat: update nav behaviour * feat: simplify housing_providers view * feat: fix pluralise to default to plural rather than singular * feat: remove managing agent related code so can be merged directly * tests: update tests and add new ones for housing_providers * refactor: rubocop conciliation * tests: fix failing navigation tests * tests: one more plural test * refactor: erb linting * refactor: erb linting * feat: right-align "Remove" text * feat: update nokogiri to pass bundler-audit * feat: grey out search button * feat: remove section-break * feat: add housing provider page with details and button * feat: tidy up routing * feat: add wip housing provider behaviour without functioning search * feat: wip add housing provider functionality hard coded to add FooBar LTD as provider to DLUHC * feat: remove redundant code * feat: add data passing behaviour without accessible autocomplete * feat: use accessible autocomplete (not working) * feat: use accessible autocomplete (now working) * feat: wip commit error messages * feat: add banner always * feat: add conditional banner behaviour, back link and update logs titles * feat: add search icon to accessible autocomplete, make hint text aligned correctly * feat: use pluck not all * tests: add initial test * feat: refactor create logic * feat: add sub org title * feat: add correct no housing providers text * feat: add correct no housing providers text * tests: add tests for add housing provider page * feat: remove unnecessary line from controller * fet: simplify controller args * fet: update schema * feat: update schema * feat: remove create_managing_agent * test: add support user tests * test: add create_housing_provider tests * refactor: rubocop autocorrect * refactor: erblinting * test: fix tests * refactor: erblinting * feat: don't use !important tag Co-authored-by: Jack S <jacopo.scotti@softwire.com>
2 years ago
<% else %>
<% content_for :before_content do %>
<%= govuk_back_link(href: :back) %>
<% end %>
<%= render partial: "organisations/headings", locals: { main: "What is the name of your stock owner?", sub: nil } %>
<p class="govuk-body">Start typing to search for your stock owner</p>
Cldc 1662 add housing provider (#954) * wip * Rename managing_agents column * add managing relationship * f * feat: add my features branched off managing agents branch * feat: update nav behaviour * feat: simplify housing_providers view * feat: fix pluralise to default to plural rather than singular * feat: remove managing agent related code so can be merged directly * tests: update tests and add new ones for housing_providers * refactor: rubocop conciliation * tests: fix failing navigation tests * tests: one more plural test * refactor: erb linting * refactor: erb linting * feat: right-align "Remove" text * feat: update nokogiri to pass bundler-audit * feat: grey out search button * feat: remove section-break * feat: add housing provider page with details and button * feat: tidy up routing * feat: add wip housing provider behaviour without functioning search * feat: wip add housing provider functionality hard coded to add FooBar LTD as provider to DLUHC * feat: remove redundant code * feat: add data passing behaviour without accessible autocomplete * feat: use accessible autocomplete (not working) * feat: use accessible autocomplete (now working) * feat: wip commit error messages * feat: add banner always * feat: add conditional banner behaviour, back link and update logs titles * feat: add search icon to accessible autocomplete, make hint text aligned correctly * feat: use pluck not all * tests: add initial test * feat: refactor create logic * feat: add sub org title * feat: add correct no housing providers text * feat: add correct no housing providers text * tests: add tests for add housing provider page * feat: remove unnecessary line from controller * fet: simplify controller args * fet: update schema * feat: update schema * feat: remove create_managing_agent * test: add support user tests * test: add create_housing_provider tests * refactor: rubocop autocorrect * refactor: erblinting * test: fix tests * refactor: erblinting * feat: don't use !important tag Co-authored-by: Jack S <jacopo.scotti@softwire.com>
2 years ago
<% end %>
<% answer_options = { "" => "Select an option" } %>
<% @organisations.each do |organisation| %>
<% answer_options[organisation[0]] = organisation[1] %>
<% end %>
<%= render partial: "organisation_relationships/related_organisation_select_question", locals: {
field: :parent_organisation_id,
Cldc 1662 add housing provider (#954) * wip * Rename managing_agents column * add managing relationship * f * feat: add my features branched off managing agents branch * feat: update nav behaviour * feat: simplify housing_providers view * feat: fix pluralise to default to plural rather than singular * feat: remove managing agent related code so can be merged directly * tests: update tests and add new ones for housing_providers * refactor: rubocop conciliation * tests: fix failing navigation tests * tests: one more plural test * refactor: erb linting * refactor: erb linting * feat: right-align "Remove" text * feat: update nokogiri to pass bundler-audit * feat: grey out search button * feat: remove section-break * feat: add housing provider page with details and button * feat: tidy up routing * feat: add wip housing provider behaviour without functioning search * feat: wip add housing provider functionality hard coded to add FooBar LTD as provider to DLUHC * feat: remove redundant code * feat: add data passing behaviour without accessible autocomplete * feat: use accessible autocomplete (not working) * feat: use accessible autocomplete (now working) * feat: wip commit error messages * feat: add banner always * feat: add conditional banner behaviour, back link and update logs titles * feat: add search icon to accessible autocomplete, make hint text aligned correctly * feat: use pluck not all * tests: add initial test * feat: refactor create logic * feat: add sub org title * feat: add correct no housing providers text * feat: add correct no housing providers text * tests: add tests for add housing provider page * feat: remove unnecessary line from controller * fet: simplify controller args * fet: update schema * feat: update schema * feat: remove create_managing_agent * test: add support user tests * test: add create_housing_provider tests * refactor: rubocop autocorrect * refactor: erblinting * test: fix tests * refactor: erblinting * feat: don't use !important tag Co-authored-by: Jack S <jacopo.scotti@softwire.com>
2 years ago
question: Form::Question.new("", { "answer_options" => answer_options }, nil),
f:,
} %>
<div class="govuk-button-group govuk-!-margin-bottom-6">
<%= f.govuk_submit "Add" %>
<%= govuk_button_link_to("Cancel", stock_owners_organisation_path(@organisation), secondary: true) %>
</div>
<%= govuk_details(summary_text: "Can't find the stock owner you're looking for?") do %>
Cldc 1662 add housing provider (#954) * wip * Rename managing_agents column * add managing relationship * f * feat: add my features branched off managing agents branch * feat: update nav behaviour * feat: simplify housing_providers view * feat: fix pluralise to default to plural rather than singular * feat: remove managing agent related code so can be merged directly * tests: update tests and add new ones for housing_providers * refactor: rubocop conciliation * tests: fix failing navigation tests * tests: one more plural test * refactor: erb linting * refactor: erb linting * feat: right-align "Remove" text * feat: update nokogiri to pass bundler-audit * feat: grey out search button * feat: remove section-break * feat: add housing provider page with details and button * feat: tidy up routing * feat: add wip housing provider behaviour without functioning search * feat: wip add housing provider functionality hard coded to add FooBar LTD as provider to DLUHC * feat: remove redundant code * feat: add data passing behaviour without accessible autocomplete * feat: use accessible autocomplete (not working) * feat: use accessible autocomplete (now working) * feat: wip commit error messages * feat: add banner always * feat: add conditional banner behaviour, back link and update logs titles * feat: add search icon to accessible autocomplete, make hint text aligned correctly * feat: use pluck not all * tests: add initial test * feat: refactor create logic * feat: add sub org title * feat: add correct no housing providers text * feat: add correct no housing providers text * tests: add tests for add housing provider page * feat: remove unnecessary line from controller * fet: simplify controller args * fet: update schema * feat: update schema * feat: remove create_managing_agent * test: add support user tests * test: add create_housing_provider tests * refactor: rubocop autocorrect * refactor: erblinting * test: fix tests * refactor: erblinting * feat: don't use !important tag Co-authored-by: Jack S <jacopo.scotti@softwire.com>
2 years ago
<ul class="govuk-list govuk-list--bullet">
<li>Double check the spelling and try again</li>
<li>Type the first few letters to see the suggestions</li>
<li>If you still can't find it,
<%= govuk_link_to("contact the DLUHC service desk", GlobalConstants::HELPDESK_URL, rel: "noreferrer noopener", target: "_blank") %>
Cldc 1662 add housing provider (#954) * wip * Rename managing_agents column * add managing relationship * f * feat: add my features branched off managing agents branch * feat: update nav behaviour * feat: simplify housing_providers view * feat: fix pluralise to default to plural rather than singular * feat: remove managing agent related code so can be merged directly * tests: update tests and add new ones for housing_providers * refactor: rubocop conciliation * tests: fix failing navigation tests * tests: one more plural test * refactor: erb linting * refactor: erb linting * feat: right-align "Remove" text * feat: update nokogiri to pass bundler-audit * feat: grey out search button * feat: remove section-break * feat: add housing provider page with details and button * feat: tidy up routing * feat: add wip housing provider behaviour without functioning search * feat: wip add housing provider functionality hard coded to add FooBar LTD as provider to DLUHC * feat: remove redundant code * feat: add data passing behaviour without accessible autocomplete * feat: use accessible autocomplete (not working) * feat: use accessible autocomplete (now working) * feat: wip commit error messages * feat: add banner always * feat: add conditional banner behaviour, back link and update logs titles * feat: add search icon to accessible autocomplete, make hint text aligned correctly * feat: use pluck not all * tests: add initial test * feat: refactor create logic * feat: add sub org title * feat: add correct no housing providers text * feat: add correct no housing providers text * tests: add tests for add housing provider page * feat: remove unnecessary line from controller * fet: simplify controller args * fet: update schema * feat: update schema * feat: remove create_managing_agent * test: add support user tests * test: add create_housing_provider tests * refactor: rubocop autocorrect * refactor: erblinting * test: fix tests * refactor: erblinting * feat: don't use !important tag Co-authored-by: Jack S <jacopo.scotti@softwire.com>
2 years ago
</li>
</ul>
<% end %>
<% end %>