* create migration for new column
* create page class and add to household characteristics
* create question for buyer 2 nationality and associated test file
* fix failing test after added page
* rename method after code review
* add question number for the new question to allow CLDC-1864 to progress with fewer conflicts/complications
* remove question no longer needed and associated test file
* amend page and the other question in that page that determined whether the deleted question should be shown
update associated test files
* createa a migration to remove the column for the deleted question
* update test broken by changes
* fix test broken by changes
* create and run migration for new columns related to buyer two previous tenure
* a little refactoring for readability
* create new pages, questions, associated tests and a couple of boolean methods on sales log for depends_on readability
* add new pages to subsection and amend tests to reflect this change
* make new pages only visible for new collection year, rename filesamend tests
* some copy changes and alterations of readability after code review
* Update LAs for 23/24 sales questions
* Update LAs for 23/24 lettings questions
* Update LAs for 23/24 location
* Remove redundant assignments
* Update question files to use the local authorities from db
* Update locations to use local authorities from db
* Rebase changes
* Replace hardcoded date
* update copy to handle pluralisation in the case of joint purchase for previous ownership, with associated testing changes
* update copy to handle pluralisation in the case of joint purchase for staircasing, with associated testing changes
* update copy to handle pluralisation in the case of joint purchase for buyer previous, with associated testing changes
* make minor linting changes and update the evil test about number of pages
* potential variation on how to achieve pluralisation
* use built in rails methods of pluralising copy
* update options for shared ownership type for 23_24
various minor copy changes
reordering
one new option
update tests to reflect this change
* alter way of setting question options to reduce future tech debt
* add in hyphen to match with the paper form
* Display the correct hint text depending on joint purchase
* update validation for non joint purchase
* Add person 6 questions and refactor check_answers_card_title
* update hint text
* Reuse join purchase page
* alter copy conditionally for plurality depending on whether a purchase is a joint purchase
* correct linting oversight
* resolve rebase conflicts and alter annoying test to prevent future conflicts
* CLDC-853 Added hard validations for sales income2
* CLDC-853 Added soft validation for sales income2
* CLDC-853 Fix tests broken by new code
* CLDC-853 Add new tests for new page and refactor slightly
* CLDC-853 Fix linting errors
* CLDC-853 Rename migration and update schema version
* CLDC-853 Fix broken sales income2 test
* CLDC-853 Rename migration
* CLDC-853 Move income 2 to cya card 2 and commonise combined income validation
* CLDC-853 Actually use the validate_combined_income method
* combine duplicate methods after rebase, ensure hard validations are triggered on all relevant fields
* move validation on child income to financial validations to stop it being triggered on lettings logs, minor amendments to tests broken by changes
* revamp financial validations tests against income to reflect updates
* amend child income validation to reflect specifications and write tests to cover this validation
* correct linting errors and play a little code golf
* change copy for some validations, add sales log method and amend interruption screen helper to support this
* extract duplicate code to private method
* update buyer 1 and 2 income value check to be consistent
* remove ecstat from income checks, the only ecstat we care about is child which is dealt with elsewhere
* rename constant struct with same anme as existing variable
* amend tests to reflect the chagnes in validations and copy
* enable currency formatting of numbers for inserting into informative_text or title_text
* update evil test in form handler spec
* rebase and fix conflicts and tests
* change a variable name and correct minor rebase errors
* update interruption screen helper tests
* correct linting errors, minor test failure and typo
* add tests for new sales log method for formatting currency
* fix merge conflicts
---------
Co-authored-by: Arthur Campbell <arfa.camble@gmail.com>
* Update datails known numbering in the db
* Update check answers card headers
* Display same person pges for joint and non-joint purchase
* Only display person questions once
* Remove unused person class and methods
* Always display person known pages and update headers
* Fix depends on, show retirement validation for buyer 2
* test
* Add person 5 to test
* fix context description
* Display person known question for appropriate number of other household members
* tests
* update test
* Remove page id stubbing
* Remove redundant tests
* only put validation on the pages that are routed to
* Refactor tests
* feat: add 22/23 year validation
* feat: wip commit
* feat: update i18n
* feat: add one year gap exchange/completion validations
* tests: add tests for new validations
* test: add setup validations tests
* test: update factory to pass saledate validation
* feat: update seeds
* feat: update tests to reflect sales logs shouldn't exist in new service before 2022
* feat: merge with main, improve date behaviour
* refactor: cleanup
* feat: update tests
* feat: enforce saledate not after 22/23 collection year end
* feat: check date is valid
* feat: add hodate/saledate hard validation to saledate as well
* feat: add HandoverDate check to saledate question
* test: update
* db: update
* test: update
* feat: wip po updates
* feat: add soft_validation to setup
* feat: fix bug by making sale date soft validation optional
* feat: add tests
* test: update
* refactor: linting
* CLDC-1849 Add hint to discounted ownership purchase price
* Use PurchasePriceDiscountedOwnership in rtb page
* show question with updated hint to certain types of answers
* rubocop
* Only display shared ownership hint in some occations
* Display the correct error for privacy notice and display the partial guidance at the top by default
* Always display privacy notice question
* Disable the rest of the housing characteristics questions until privacynotice is answered
* fix tests
* remove duplicate field
* Display the household questions if the buyers were not interviewed
* Add monthly_charges_value_check field to sales
* Add monthly_charges_over_soft_max soft validation
* Add monthly_charges_value_check page and question
* Add monthly_charges_value_check pages to the relevant subsections
* Fix optional field name, add validation message
* test
* change percent to % so that suffix is consistent with other similar questions
* fix rebase conflicts
* add hard validation that percentage owned after a staircasing transaction cannot be less than the percentage bought in that transaction, with associated tests
* add compound validation to ensure that logs of type older person shared ownership may not have a stairbought value of greater than 75% \n associated tests included
* remove duplicate method and use existing version
* fix rebase conflicts
* ensure schema correct and test of page number correct
* fix form handler test after rebase
* fix tests and ensure schema correct after rebase
* Add old_persons_shared_ownership_value_check to sales table
* Move hard validation method to soft validation
* Add old persons shared ownership value check page and question
* Add pages to the household characteristics
* Add soft validation after ownership type
* update a test
* make old_persons_shared_ownership_value_check optional because it's in the setup section
* typo
* Add income error to ownership type and ecstat fields
* Add shared_ownership_deposit_value_check field
* Add shared_ownership_deposit_invalid? soft validation
* Add shared ownership deposit check pages and questions
* Add pages to the subsection and update validation message
* tests
* Update validation to only trigger if la is given
* Run the soft validation when mortgage isn't used or cash discount isn't given
* test
* Add min and max for age 1 validation
* Add retirement value check column to the sales table
* Add retirement value check question and page
* Add retirement value check pages to household characteristics
* Reuse soft validations for retirement in sales
* Update person_indexes
* Add old_persons_shared_ownership validation
* Display the retirement value check in correct places depending on the joinpur value
* Update page IDs
* It's always joint purchase if age 2 is displayed
* lint
* lint
* Add min and max to age2 + questions
* validate that under 16s are economic children
* Update factory
* Update test
* Update ecstat, relationship and age validation
* Enable multiple inferred check answers values
* lint and add new conditions to check answers for age1
* Rename method
* Refactor inferred answer value
* rebase update
* update inferred_check_answers_value after rebase
* Move the method to private
* Add a missing test
* rebase changes
* Add prefers not to say as the displayed value for all household members
* update [0] to .first
* replace [0] with .first
* Route to mortagage questions only if mortgage is used
* Fix tests for deposit derived var
* more routing
* Only display mortgage lender questions if mortgage is used
* Add postcode fields
* Add postcode page and questions
* Add postcode page to the property information subsection
* Only display local authority question if the la is not inferred
* Fix migration
* Move postcode validation
* Infer LA fields from postcode
* infer partial postcodes