* feat: add la manual edit page
* feat: make autocomplete accesible and la readable
* feat: add correct skip and linking behaviour, also rename fallback page
* feat: add page not found and tidy la list
* feat: add redirection behaviour
* feat: add coping with nil add_another_location query string
* test: add postcodes mocks to return local authorities
* feat: validate local authority to not be nil or "Select an option"
* feat: persist add_another_location even on validation failure
* feat: remove url query parsing, put validation before values added to db
* refactor: spacing
* tests: add new tests for edit-local-authority
* tests: remove redundant bangs
* Add shared ownership type question and page
* Add type column to the sales logs table
* Add ownership scheme field to db
Isolating this into a separate commit so it can be cherry picked for any
other sales logs work that's necessary.
* Fix tests
* fix a test
* Fix typo
* Set default time for form handler
Co-authored-by: Dushan Despotovic <dushan@madetech.com>
* Add previous, current and next forms to form handler
* Add current, previous and next sales forms to form handler
* Implement current_lettings_form, current_sales_form and store year and form type in form
* refactor lettings_forms
* Use current, previous and next forms in lettings log model
* Use current, previous and next forms in sales log model
* use current, previous and next forms in csv service
* Remove "startyear_endyear" forms from form handler
* Remove name from form initializer and add an optional start year
* refactor get_form
* update csv test, fix form initialize
* rebase fix
* Refactor form_name_from_start_year method out
* remove unused variable
* fix typo, add date tests
* rebase, fix tests
* add comment to before test block
* Change the FormHandler back to only contain the form objects
* extract name
* Add abstract log class and sales log class
Created a parent log class for sales log and lettings log. Any bits common
to both sales and lettings can live in the parent class. As the sales log
functionality is built up any commonalities with lettings log can be extracted
into the parent log class. The sales log model is set up without a json form
and instead the form is defined in code - like the setup section of the lettings
log.
* update sales logs controller
* update lettings controller specs
* update filter method name
* update organisations controller
* use lettings method
* Add deleted tests back
* lint
Co-authored-by: Kat <katrina@madetech.com>
Co-authored-by: Kat <kosiak.katrina@gmail.com>
* Add an organisation question for the support user (WIP)
Co-authored-by: baarkerlounger <baarkerlounger@users.noreply.github.com>
* All the things are green
* Add user question
* Restrict shown answer options based on already answered questions
* Derive managing org
* Guard against missing DB connection
* Remove empty file
* Only select the fields we actually need
* All is redundant
* Fix spec description
* Fix comments
Co-authored-by: Kat <katrina@madetech.com>
Co-authored-by: baarkerlounger <baarkerlounger@users.noreply.github.com>
* Set up failing test for new soft validation design
* remove unneeded js controller
* remove unneeded controller and spec
* rename net income validation override column
* spec form changes (to allow tests to run)
* validation spec changes
* replace all instances of override_net_income_validatiom
* passing first test
* Add to form and import styling
* remove unneeded code from interruption screen view
* Update test & code - failing last new expectation
* Display 2 previous question answers in the informative text
* extract displaying of the informative text into a helper
* Add tests for helper
* Remove some of the previous soft validations set up
* fix some failing specs
* Fix more tests
* lint
* Reset earnings question prefix and suffix to initial values instead of nil
* make it route backwards on a no
* test and linter fixes
* refactor next_page
* stryling
* more changes
* fix specs
* update real form
* design tweaks
* delete commented out tests
* content changes
* content changes
* changes to informative/hint text
* More robust styles for interuption panel, use smart quotes
* Rubocop
Co-authored-by: Kat <katrina@madetech.com>
Co-authored-by: Paul Robert Lloyd <me+git@paulrobertlloyd.com>
Co-authored-by: baarkerlounger <db@slothlife.xyz>
* Include accessible autoselect package
* Test type ahead functionality
* Add CSS
* Disabled null value
* Fix answer options so they match validations
* Disabled
* Only english LAs for current LA
* Rubocop
* Iterate over all forms
* Re-lookup page to ensure we have the definition for the right form
* Match form naming convention for spec and real
* Add test for case log form
* Infer la from postcode
* Fix other tests and lint
* Add routing based on inferred la
* reset la to inferred false
* Use postcodes io gem
* reset values if la cannot be inferred
* Fix tests
* Add next page path method with conditional routing
* Rename method
* Fix the tests and add files to .gitignore
* Make get_next_page_path a private method
* WIP test for total question count
* Change back button to use rails navigation
* Make total number of questions work with conditional routing and run rubocop
* Add tests for conditional question displaying
* Add conditional routing to the check answers page
* push 1 failure
* make total_questions step over the form like a user would and gather relevand questions
* Fix the tests
* fixed checks answers labels
* small refactors and rubocop
* remove unused code from get next page path
Co-authored-by: Kat <katrina@madetech.com>
Co-authored-by: magicmilo <milobascombe@gmail.com>
* use test_form.json in tests
* Pass in form to view from controller for check_answers
* reduce test json length for household section
* Further shorten the test json
* Remove extra radio questions from test json household section
* Trim test form and fix tests
* do some method extraction
* Extract creation of form into a formHandler
* rubocop
* redefine form model to use filepaths instead
* Check test env var in form handler
* remove singleton and make get_all_forms a private method
* refactor get_all_forms
Co-authored-by: Kat <katrina@madetech.com>