* Refactor guidance to allow both top and bottom guidance at the same time
* Update guidance content, add scheme changes page
* update test
* remove full stop
* Update content, add back button
* feat: wip commit add person details to sales log csv service
* feat: add comments
* feat: update regex to include agen_known fields
* feat: revert
* feat: reject age_known fields and map codes and values to age fields instead
* feat: add age1_known
* feat: combine age not known and details not known fields
* feat: update tests
* refactor: lint
* feat: update tests
* feat: update lettings tests
* feat: update question test
* Add availability to the merged org options
* Do not delete merged organisation relationships
* displays managing agents of merged organisation selected as owning org
* Add absorbing org dates, fix copy
* set managing org as owning org it is being absorbed by the users org
* CLDC-2439: min and max rent value check questions created
* CLDC-2439: Informative removed, check pages fixed.
* CLDC-2439: removed informative info tests and rent value check
* CLDC-2439: fixed informative missing test failure
* CLDC-2439: Text moved to en.yml
* CLDC-2439: tests added, copy moved to en.yml
* CLDC-2439: tests added, copy moved to en.yml
* CLDC-2439: content change for bulk upload errors WIP
* CLDC-2439: informative rendering change, content change, test updated
* CLDC-2439: failing test fix.
* CLDC-2439: display_informative_text test added for strings
* CLDC-2439: string as var in test
* CLDC-1507: rent explanation added to rent type question page.
* CLDC-1507: 'Rent Type' headed added above question
* CLDC-1507: test amended to include new header.
* CLDC-1507: guidance partial test added
* CLDC-1507: LSEP unicode character removed from definition
* feat: update max and add new spec
* feat: update previous years
* feat: combine identical offered questions
* feat: update tests
* feat: add test for property_number_of_times_relet
* Remove bulk_upload_lettings_logs flag
* Add spacing above actions in data sharing agreement
* Add banner
* Add model validation
* fix log component
* Fix factory
* Put validation behind feature flag
* start adapting to data protection confirmation
* Make tests more generic
* Add tests for display_organisation_attributes
* Use data_protection_confirmed? method
* Address code review
* rubocop
* Prevent access to bulk upload pages when DPC not signed
* Address PO review
* Remove soft validations from sales setup and make them mandatory
* Remove soft validations from lettings setup and make them mandatory
* Fix remaining tests
* Add card numbers to pregnancy checks
* feat: add max value check for buyer 1
* feat: add tests and refactor
* feat: add buyer 2 value check
* feat: combined income value check
* feat: add combined validation everywhere and add tests
* feat: add max value check for buyer 1
* feat: add tests and refactor
* feat: add buyer 2 value check
* feat: combined income value check
* feat: add combined validation everywhere and add tests
* db:update
* refactor: lint
* db: update
* feat: update copy for single validations
* feat: add correct answer card numbers
* feat: add tests
* feat: fix tests
* feat: correct uprn address routing not to show when uprn_confirmed is nil
* refactor: lint
* feat: update tests
* feat: make combined_income nil safe
* feat: merge with main
* test: update
* feat: update to new soft val designs
* feat: replace la with uprn, postoce_full, la in all interruption_screen_question_ids
* feat: update tests
* [CLDC-2202] Allow coordinators to set created_by
* Scope user selection when data coordinator
* Remove managing_for_other_user_enabled
* Move sales created_by page and question out of common
* Address comments
- only select required users
- remove not needed CYA checks
* feat: unrelated currency formatting
* Revert "feat: unrelated currency formatting"
This reverts commit 75bd3efbf8.
* feat: add soft val pages to property information section (not to setup)
* feat: update tests
* feat: update tests
* feat: add validation to setpu section
* refactor: lint
* test: update
* feat: set nil as default check answers card no
* feat: use : to define more explicitly
* feat: make optional as affects setup
* feat: update tests
* feat: put la in nil card with rest of uprn/address qs
* feat: route to uprn confirmation from check answers changes to uprn even though not an interruption screen
* feat: update tests
* feat: update tests
* refactor: lint
* feat: update tests
* feat: update tests
* feat: wip blank fields and dependent fields on upload tos ee if valid and can upload with missing info - this is not the exact ac on the ticket yet
* Revert "feat: wip blank fields and dependent fields on upload tos ee if valid and can upload with missing info - this is not the exact ac on the ticket yet"
This reverts commit 136e5f6f12.
* feat: fix uprn hidden in check answers
* feat: fix tests
* feat: fix tests
* rename variables in test file
* write tests for new validations
* validate that answers to numeric questions are given to the correct level of accuracy and in normal format with only digits
* add error messages for new validations
* add or alter step on numeric questions in sales, amend one test given step changes
* copy change
* remove validation that is specific to number format and fold that functionality into accuracy validation, rejig tests accordingly
* fix various tests
* remove reference to currency in validation message that concerns step only and doesn't check whether firled is currency related
* alter copy to avoid redundant repetition in validaiton message
* save changes made in rebase
* changes after PO review
two step values had been missed in previous work
in various places there were custom validations applied that duplicated the functionality of the generic min max validation that is applied to all numeric questions, in these situations sometimes the min and max on the question class was inconsistent with the limit that triggered validations
these have been corrected and made consistent
various tests were affected by this and have been amended accordingly
* remove tests introduced by mistake in rebase
* amend step value on earnings
* feat: update scheme status so incomplete unless has active locations
* feat: update scheme typeahead text
* feat: reject incomplete locations
* feat: show completed/incomplete locations and validate when completed == 0
* feat: improve copy
* feat: change active -> completed
* feat: update scheme typeahead text
* feat: reject incomplete locations
* feat: show completed/incomplete locations and validate when completed == 0
* feat: improve copy
* feat: change to confirmed to add clarification in code
* feat: update scheme typeahead text
* feat: reject incomplete locations
* feat: show completed/incomplete locations and validate when completed == 0
* feat: improve copy
* feat: update scheme typeahead text
* feat: reject incomplete locations
* feat: only confirm locations if complete (old) AND save button clicked (new)
* feat: add unconfirmed scope
* refactor: complete -> confirm
* feat: fix tests
* feat: update scheme typeahead text
* feat: reject incomplete locations
* feat: show completed/incomplete locations and validate when completed == 0
* feat: improve copy
* feat: update scheme typeahead text
* feat: reject incomplete locations
* feat: only confirm locations if complete (old) AND save button clicked (new)
* feat: add unconfirmed scope
* refactor: complete -> confirm
* feat: fix tests
* feat: fix more tests
* feat: fix more tests
* refactor: rubocop
* refactor: rubocop
* refactor: rubocop
* feat: add tests for incomplete schemes
* refactor: linting
* feat: test incomplete count too
* feat: test unconfirmed locations aren't options in location_id
* feat: test validation
* feat: test when scheme is confirmed
* feat: test when scheme is confirmed for support user
* feat: test when location is confirmed
* refactor: linting
* refactor: consistent use of factorybot or not within a file
* feat: confirm locations when complete even if save button not clicked, and update tests
* refactor: simplify
* refactor: simplify
* refactor: move location helper methods to helpers
* refactor: move scheme helper methods to helpers
* refactor: formatting
* refactor: po response
* refactor: review response
* Set uprn_known to 1 when setting UPRN
* Move fake to dev+test gemfile block
So that we can use factories in local
* Move UPRN known and UPRN questions to single UPRN page
* rename variables in test file
* write tests for new validations
* validate that answers to numeric questions are given to the correct level of accuracy and in normal format with only digits
* add error messages for new validations
* add or alter step on numeric questions in sales, amend one test given step changes
* copy change
* remove validation that is specific to number format and fold that functionality into accuracy validation, rejig tests accordingly
* fix various tests
* remove reference to currency in validation message that concerns step only and doesn't check whether firled is currency related
* alter copy to avoid redundant repetition in validaiton message
* save changes made in rebase
* changes after PO review
two step values had been missed in previous work
in various places there were custom validations applied that duplicated the functionality of the generic min max validation that is applied to all numeric questions, in these situations sometimes the min and max on the question class was inconsistent with the limit that triggered validations
these have been corrected and made consistent
various tests were affected by this and have been amended accordingly
* remove tests introduced by mistake in rebase
* Allow interruption screens to format money values
* Remove formatting from saleslog method
* Use money flag
* Use pre exhisting method to format values
* Update config/locales/en.yml
Co-authored-by: Arthur Campbell <51094020+arfacamble@users.noreply.github.com>
---------
Co-authored-by: Arthur Campbell <51094020+arfacamble@users.noreply.github.com>
* Fix possible bulk upload years
* Initialise 2021/22 form routes for tests
* Return test routes from form handler
* Fix some tests
* fix bulk upload tests
- change from mocks to actual code calls
* update years for bulk upload form
* Fix some uprn tests
* Set the scheme as available from previous year if the collection is in crossover
* Update location available_from
* Update location and scheme tests
* Refactor and comment out a scheme test
* Some uprn and export tests
* Fix lettings logs controller tests and comment out previous collection message test
* fix tests for new collection year
* fix bulk upload tests
for some reason tenancylength must not be given for validation to pass
* update bulk upload tests for new year
* More fixes
* Undo location changes
* Fix remaining uprn
* further new collection year test fixes
---------
Co-authored-by: Phil Lee <asmega@users.noreply.github.com>
* feat: add void date guidance partial
* feat: set guidance pos bottom for 22/23 log
* feat: add tests
* refactor: linting
* Update app/models/form/question.rb
Co-authored-by: Phil Lee <asmega@users.noreply.github.com>
* feat: smart quotes
* feat: respond to po comments
* feat: add voiddate/mrcdate validation to mrcdate too
* feat: add ten year validations to startdate too
* feat: fix tests
---------
Co-authored-by: Phil Lee <asmega@users.noreply.github.com>
* Add carehome charges value check field
* Add carehome charges soft validation to 23/24 forms
* Update care_home_charge_expected_not_provided?
* Add care_home_charges_value_check to 22/23
* Update csv
* Add care_home_charges_value_check to 21/22 form
* Update import to set value_chech to yes
* add some methods on lettings log and use them and already existing methods to make depends on human readbale for pages in property information subsection
* reformat answer options for neatness
* ensure that property information subsection is conditionally not shown under correct conditions
* amend method to find the path for the next question to answer so that if no questions in the next section are currently routed to, it goes to the section after that
* make amendments for failing test and linting
* remove unnecessary method
* remove unnecessary conditions from depends on, the displayed in tasklist method override is sufficient
* test the change to the method creating a link to the next subsection
* minor refactor to displayed_is_tasklist condition and changes in testing
* implement the fix on 22/23 form also
* write a test covering the fix
* removal not_renewal? method and tweak depends on for all pages using that method
* linty fluff begone
* correct some errors in tests after changes to factories
* minor testing amendments after rebase
* add hint text to several options on tenancy type, rename question class and a few others to make them pascal case and write test files for all changed questions
* update some depends on for readability and write test files for page classes
* change the condition to avoid conflicts with 2034 and cover that ticket in this one
* also add hints to other tenancy question
* ensure copy is changed for both questions relating to how many times a property has been offered
extract to en.yml so that both questions keep identical copy in the future
* minor typo caught in 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
* add a new option to sheltered accommodation question
rename page for readability
create test files for relevant page and question'
* correct lint error
* add new options to prevten question, rename question, create test files for both previous tenure questions
* reorder as per feedback from UX team
* correct minor linting issue
* create tests for pages
* add option to renewal question as well after discussion with Rachel