This renames the case_log to lettings_log as everything we've written so
far has been geared towards lettings of social housing so it makes sense to
have the name describe this. This is also a precursor to adding in stuff for
sales logs (whatever shape that takes)
Co-authored-by: James Rose <james@jbpr.net>
* wip
* add missing values to factory bot and lint
* remove irrelevand methods
* dont infer housingneeds
* typo
* update method name
* Remove housingneeds_present? method
* move set housing needs fields to case log variables file
* Only set all housing needs values to 1 if there are no housingneeds
* update json form fixture
* link
* update csv test
Co-authored-by: Dushan Despotovic <dushan@madetech.com>
* order csv attributes based on the form
* Move is inferred csv attributes next to the inferred fields
* Add is dpo, move scheme fields to back
* move checkbox answer options
* extract move_csv_attributes method
* choose year based on which case logs are downloaded
* typo
* Extract case log csv class
* Move csv class to services
* update schema
* Change property major repairs date validation from 2 years to 10
* add voiddate_date_in_soft_range? and major_repairs_date_in_soft_range? methods
* update error messages for hard validations
* Add property_major_repairs_value_check to the form
* add void_date_value_check and fix some namings
* Update value_check hidden in check answers to depend on whether the questions is answered
* Remove a schema key
* extract constants for number of days
* change error messages wording
* update schema and csv files
* remove irrelevant fields from csv based on the user
* display yes/no instead of true/false
* display organisation and user names instead of ids
* refactor tests
* Update remote schema.rb with migrations, main features for this ticket still incoming
* Add join table for organisation self-referential parent/child relationships
* Add join table for organisation self-referential parent/child relationships
* Remove organisation_la factory and add test for organisation_relationship child/parent association
* Update spec/models/organisation_spec.rb
Co-authored-by: James Rose <james@jbpr.net>
Co-authored-by: James Rose <james@jbpr.net>
* Stip whitespaces from names before saving organisation, scheme or a user
* Abstract strip whitespaces method and use it for locations too
* refactor
* lint
* Use a gem 🙃
* sort gems alphabetically
* Reset wchair when needstype changes from supported housing to not supported housing
Co-authored-by: James Rose <jamesrose@users.noreply.github.com>
* remove location_id if scheme needstype changes to general needs
* only hide postcode known question from check your answers if it's answered
Co-authored-by: James Rose <jamesrose@users.noreply.github.com>
* shows incomplete tag if the scheme is not confirmed
* displays a link to check answers page if the scheme is incomplete
* return schemes with no location when searching
* update tests
* lint
* spiked extra values for location la
* test
* extra test
* extra spacing
* renamed argument
* refactored per Dans suggestions
* redundant tests
* redundant method
* redundant method
* redundant method - part 3
* redundant method - part 4
* reset managing org for sheme
* only display schemes with managing org id
* only display relevant answers in show scheme page
* tests
* check arrangement type from saved scheme if incoming params for it is nil
* don't override managing org id if it's coming through as nil
* convert to use values that won't change for checks
* Revert "convert to use values that won't change for checks" because the value coming through from the params is the value and not a key
This reverts commit 50053ec0cf233e3a6c36db9af2528c354d3d60e7.
* Test
* check constant values
* Add test case for controller, check if the scheme is confirmed before displaying
* validate all the required scheme questions are answered
* fix ui
* fix test
* Add test, change error message wording
* Display error message next to the relevant field
* update context and query
* lint
Co-authored-by: Dushan Despotovic <dushan@madetech.com>
* failing test to display local authority
* passing tests - sadly with not allowed net connections
* added relevant tests and tweaked the webmock
* shorter output from api
* location_admin_district for location
* location_admin_district for location
* fixed tests
* Add search
* Add "Add location" button
* Add confirmed flag to schemes
* Show location tab is location is being added to an existing scheme
* Switch button text when scheme exists already
* Remove change links for confirmed schemes
* Fix spec after rebase
* added title showing search results and tests for it
Co-authored-by: JG <moarpheus@gmail.com>
* Fix data mapping for mantype
This was mapped to a column called support services provider which was an
integer, this now maps to the arrangement type column. This should be in
line with expectations for the import/export
* remove unused stuff
* lint fixes
* changes to comparison
* fix lambda checks in view
* fix export test
* Add mobility type question
* Remove wheelchair_adaptation, use mobility_type to infer wchair
* Add validatio to mobility type
* tests
* Rebase main
* CYA test
* extract selection methods into a helper
* Prevents location from being cleared when it has been changed alongside the scheme
* Handles visible IDs not being system unique
* Hides the location correctly
* validation error messages for scheme
* WIP for validations
* fixed redirects for a correct page
* expecting link to a new question
* added support_services_provider
* WIP for support_services_provider
* WIP for support_services_provider - works concenptually
* WIP passing feature tests
* WIP passing feature tests
* WIP validations
* passing tests and working functionality
* location validations
* fixed after rebasing
* fixed edit name
* fixed after rebasing
* tests for missing params
* tests for validations
* tests for validations locaion
* tests for validation of all params for scheme
* tests for location validations
* What is this type of scheme? - Order options alphabetically:
* Care Standards Act 2000? - Order options as follows, add missing hint text for third option
* further styling
* last UI changes
* lmoved back button logic to the view
* select options in the view
* missing validation for manaing org
* fixed check answers page
* wip
* small change
* fixed
* fixed check answers page ui
* fixed updating
* fixed tests
* fixed layout
* final touches
* rebase
* rubocop
* correct condition
* old test
* Add location startdate column to the db
* Display the schemes with active locations only when selecting a scheme for a case log
* When selecting a location for case log, only show active locations
* Add startdate to the form
* only display the number of active locations in the appended text
* Compare date instead of time
* Put location questions and hints into a translation file
* lint
* content change