* 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 fixed term tenancy validation
* refactor validate_fixed_term_tenancy
* add fixed_term_tenancy pattern to api docs and make it dynamically not required
* 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
* Change condition format in json
* Add test for multiple conditions
* Check multiple conditions
* nearly better
* check the condition for route without checcking the question type
* remove a comment and an unused variable
Co-authored-by: magicmilo <milobascombe@gmail.com>
* 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>
No errors need to be added if the net income is given as 0 but no frequency
is provided. It just needs to be made not required if the net income is
refused (given as 0) so that the record can still be added.
* 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>
* Validate API created case logs
* Validate record completion
* Set complete or in progress status based on field presence validation
* Make autogenerated fields a named constant
* Test the whole validation
* Add some hated code comments to explain some things
* Be stricter about the params we allow mass updates on
* 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>