* Remove condition_effects_prefer_not_to_say field
* Change reason type
* Remove prefer not to say from illness
* add majorrepairs,propcode and infer postcode
* Update previous location and la
* Update majorrepairs, national and reasonpref
* Update housing benefits fields
* rename file
* Add previous postcode
* Move inferred postcode to model
* refactor infered poscode method
* Remove unneeded import
* update miration and some mappings
* Remove duplicate migration command
* Soft validation UI needs to be on both questions being validated
* Fix whether the box is checked or not
* All checkboxes are integers now
* Fix
* Use enums as well for consistency
* Use capybara matcher for less flakiness
* Click link already waits
* Add a retry to our fetch so tests are more resilient to intermittent network issues
Devise is a commonly used gem for user authentication and management. Using
rails generators and Devise allows us to get a lot of boilerplate code for
user authentication and management and means we don't have to revinvent the
wheel. Styling will need to be done for the necessary pages and there are
likely to be bits of generated code that can be deleted. This will act as
a starting point to be built up from using TDD.
* Working except for selenium checkbox issues
* Remove old debug message
* Make sure we only run the stimulus init once per page load
* Revert that
* Rubocop
* Use data targets rather than id lookup, so that coupling is explicit
* Use fetch
* Schema update
* No schema changes introduced here
* Add a request spec for the new controller
* Schema order did change
* map over forEach
* Update factory fields
* Int for booleans :(
* Fix spec fields
* Lazy create
* migration wip
* change field names to lowercase and fix the tests
* Change national and ethnic field types and map to correct enums
* change ecstat column types
* Change prevten field type
* Change homeless field type
* Change benefit cap field type
* Put db enums in one folder and add a few new field changes"
* change field type for housing needs
* Change illness field type
* display checkbox answers
* cbl, chr, cap
* Change tenancy and tenancylength field types
* Change landlord and rsnvac field types
* Change unittype_gn field type
* Reasonble preference displaying on check answers
* update more field types
* Fix typo in comumn name
* Change more types
* Test fixes
* Add adr
* fix some tests
* run migration
* Fix tests
Co-authored-by: Matthew Phelan <matthew.phelan@madetech.com>
* Init
* Add some tests
* Add failing spec
* Move soft validations into a module
* Update test
* Rubocop
* Scope are auto created by enums
* Rename folder to validations
* No instance variable
* Commit both lines
* Add error indication
* Make partial slightly more generic
* Fix back link
* Write failing test
* All specs currently passing. Can this be real?
* Check page should have an override question
* Fix back button for check answers pages
* Don't really need a wrapper method for the validations
* We're really validating a page here not a question
* Dup variable
* Bit of a nasty hack but maybe better than deriving back link?
* Set a no cache header instead of reloading
* Move a teeny bit of logic out of the controller
* Rubocop
* Extract method
* Add other_tenancy_type conditional field
* Extract private validdate_other_field_method
* Implement other tenancy type validation
* Add missing migration file and update API doc
* Add validate_net_income_uc_proportion validation/
* refactor validation method;
* Update net income options in doc
* rubocop
* refactor validate_net_income_uc_proportion and increase the persons checked to 8
* rename tenant economic status field
* API doc init
* Rename docs dir
* Try YAML
* Index page
* Chars
* Case Log
* Summaries
* Add to readme
* Add sandbox server
* Dry
* Add some 422 examples
* GET doesn't have a request body
* Accept header
* Add show method to JSON API and document not found response
* Set header default
* Add some field guidance
* Don't need a default value if we only have one enum
* 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>
* Add checked answers values as true if they are passed back as case log params from the form
* Allow changing/unticking saved checkbox values
* rubocop
* Save keys for checkboxes instead of labels
* Add conditional effects keys and table fields
* Add reasonable preference reason keys and table fields
* Redo the migrations
* Move method call around
* Update case_log params before checking them with page_params
* Reload case log rather than multiple lookups
* Refactor checkbox question selection
* Refactor out the need to get list of checkbox questions
* Spec merging of answers across different question types
* Update readme to include checkbox question data model assumptions
* Fix postcode duplication
Co-authored-by: baarkerlounger <db@slothlife.xyz>
* Make outstanding amount question conditional
* Make major repairs date conditional on major repairs having been done
* Add Other reason for leaving as a conditional question
* Make reason for reasonable preference conditional on reasonable preference being given
* Refactor conditional html attributes
* Pretty print config json
* Add numeric conditional
* Add the rest of the conditionals
* Rubocop
* Refactor how we add stimulus controller html attributes so that we can combine them
* Spec attrib merging
* Fix question counts for sections with conditional questions
* Some linting
* Spec question counting behaviour
* Linting
* Add some more readme explanation
* Rename controller helper
* Rename variables for clarity
* Form with model so that we can validate (hypothetically)
* Put turbo frame back
* Turbo can update form errors if submitting returns 422
* Refactor and fix specs
* String interpolation over concatenation