* Change net income known question
* earnings and frequency on same page
* check answers changes and other fixes
* some fixes
* delete unnecessary test
* fix failing spec
* Refactor answer label
Co-authored-by: baarkerlounger <baarkerlounger@users.noreply.github.com>
* test and lint fixes
* Method args
* Fix specs
* Rubocop
* Incfreq doesn't have it's own check answers display
* Add suffix to actual form
* JSON linting
* Conditional suffix only applies to check answers
* Validate that earnings and incfreq must be provided together
* Rubocop
* Fix spec
* Fix page view specs
* form fixes
* update error messages
Co-authored-by: baarkerlounger <baarkerlounger@users.noreply.github.com>
Co-authored-by: baarkerlounger <db@slothlife.xyz>
* Count inferred check answers answer as an answered answer :)
and remove la unknown reason field
* rename the method and add a test for gdpr completed section
* remove commented code
* add button for moving to next incomplete section
* Add extra logic for cycling sections
* fix all failures
* add test for in progress case log to declaration redirection
* fix bug with infinite recursion
* update button text to save and return to log
* use govuk_link helpers
* lint fixes
* some basic extract method refactors
* refactor tests
* lint fixes
* redirect to check answers if next subsection in progress
* fix failing spec
* fix answered questions calculation
checkbox questions were not being counted appropriately so updated the test
for the method along with the method itself
* Fix subsection status method
* change to use question completed method
Co-authored-by: Kat <katrina@madetech.com>
* Add a non temp accommocation validation for vacancy reason
* Only show errors relevant to the page questions
* Add referral question/field
* Add validation for referrals and vacancy reasons
* change error message content
* Hackety hack hack
* Leave JS hooks until text conditionals are updated as well
* Fix JS errors and remove UJS
* Reload the GOV UK frontend JS
* Fix armed forces case
* Remove obsolete tests and config
* Temo fix for household members question
* Unit test
* Add helper unit test
* Correctly failing spec
* We still need stimulus to clear answers
* Fix styling issues
* Refactor style logic into helper
* Form fix
* Conditional check box questions are shown on a new page
* Update readme
* Fix date bug
* Clear conditional date fields if invalidated by top level answer
Co-authored-by: Stéphane Meny <smeny@users.noreply.github.com>
* Add hidden text to change links
This was missing, the hidden text users the check answer label so that the
two will be consistent with each other.
* update chsnge link test
* Update app/models/form/question.rb
Co-authored-by: Paul Robert Lloyd <paulrobertlloyd@users.noreply.github.com>
* Update app/models/form/question.rb
Co-authored-by: Paul Robert Lloyd <paulrobertlloyd@users.noreply.github.com>
* update change link test
* update answer links too
* add hidden text for answer links
* fix failing tests
* update answer link with hidden text creation is now less repetetive
Co-authored-by: Paul Robert Lloyd <paulrobertlloyd@users.noreply.github.com>
* make changes for 2021-2022 form
* add more changes to 2021-2022 form
* execute migration
* more form changes
* Add rent period question and check multiple condition sets for depends_on
cherry picked from CLDC-632-income-and-benefits-section branch
* update form json
* form and enum changes
* create new constants for enums
* Update config/forms/2021_2022.json
Co-authored-by: Paul Robert Lloyd <paulrobertlloyd@users.noreply.github.com>
* form alphabetising and lint fixes
* add divider
* Update app/models/constants/case_log.rb
Co-authored-by: Paul Robert Lloyd <paulrobertlloyd@users.noreply.github.com>
* Update config/forms/2021_2022.json
Co-authored-by: Paul Robert Lloyd <paulrobertlloyd@users.noreply.github.com>
Co-authored-by: Kat <katrina@madetech.com>
Co-authored-by: Paul Robert Lloyd <paulrobertlloyd@users.noreply.github.com>
* Update hb question options
* add has benefits field
* derive has_benefits
* update benefit question options
* Add nocharge field
* Add rent period question and check multiple condition sets for depends_on
* update rent period answer options
* Add carehome questions and move the remaining rent questions to income and benefits section
* Reset incfreq and incref and update rent routing based on periods
Add a validation test separated from the main case_log_spec
Create a new validator for the "Local Authority" section
Changes the postcode regexp to be case insensitive
* Hide total field by default
* Total charge is inferred
* We don't need to reload if we're fetching from DB anyway
* Rubocop
* Add prefixes and suffixes
* Don't count read-only questions for section status
* Add feature test for progressive enhancement
* Progressively enhance the progressive enhancement spec
* Add custom guidance partials
* Add a test for the partial being rendered
* Add some unit tests for this
* Rubocop
* Don't introduce heisenspecs
* Use component
* Add comment
* Update check values
* Make net_income_known enum
* Show inferred postcode
* Filter out the answers that were not inferred
* Refactor if statement
* Add a failing test for check answers page
* Do not show the postcode known question in check answers
* WIP - fix failing test
* Display inferred check answers value if the value is not set
* update test json
* Fix a check and method name
* Extract check for hiddent in check answers from displayed to the user
Co-authored-by: MadeTech Dushan <dushan@madetech.com>
* 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
* Add timeout for postcode lookup
* reset location fields when postode not known
* Reset partial postcodes after setting the main postcode field and add tests
* 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