Previous to this change, the `reservist` field mapped `0` to yes and `1` to no. This change adjusts the mapping from `1` to yes, `2` to no, and `3` to prefer not to say.
* wip
* Rename managing_agents column
* add managing relationship
* f
* feat: add my features branched off managing agents branch
* feat: update nav behaviour
* feat: simplify housing_providers view
* feat: fix pluralise to default to plural rather than singular
* feat: remove managing agent related code so can be merged directly
* tests: update tests and add new ones for housing_providers
* refactor: rubocop conciliation
* tests: fix failing navigation tests
* tests: one more plural test
* refactor: erb linting
* refactor: erb linting
* feat: right-align "Remove" text
* feat: update nokogiri to pass bundler-audit
* feat: grey out search button
* feat: remove section-break
Co-authored-by: Jack S <jacopo.scotti@softwire.com>
* feat: add boyer_company page and question (migration still to be committed)
* feat: add migration and updated schema
* feat: update tests (and add housingneeds_type to schema that was previously missing)
* tests: add tests for question and page
* refactor: spacing
* feat: update schema
* feat: add boyer_company page and question (migration still to be committed)
* feat: add migration and updated schema
* feat: update tests (and add housingneeds_type to schema that was previously missing)
* tests: add tests for question and page
* refactor: spacing
* feat: update test
* feat: add boyer_company page and question (migration still to be committed)
* feat: add migration and updated schema
* feat: update tests (and add housingneeds_type to schema that was previously missing)
* tests: add tests for question and page
* refactor: spacing
* feat: add boyer_company page and question (migration still to be committed)
* feat: add migration and updated schema
* feat: update tests (and add housingneeds_type to schema that was previously missing)
* tests: add tests for question and page
* refactor: spacing
* feat: add migration and updated schema
* feat: update tests (and add housingneeds_type to schema that was previously missing)
* feat: add migration and updated schema
* feat: update tests (and add housingneeds_type to schema that was previously missing)
* feat: add migration and updated schema
* feat: update tests (and add housingneeds_type to schema that was previously missing)
* test: update tests
* feat: add buyer 2-1 relationship question and page (migration and schema to come in next commit)
* feat: add buyer 2-1 migration and schema
* feat: update schema
* feat: add depends_on and tests
* feat: add hint text
* tests: add new tests
* refactor: lint appeasing
* Remove an unused ethnic_other column
* remove sale_completion_date from lettings logs
* Add collection start year
* Remove sale_or_letting column
* Rename rent_type to rent_type_detail in the export
* Format dates
* refactor
* Fix test
While migrating users from the previous service to the new one we discovered that email addresses are not unique in the previous service. This means that one user in the new service might relate to multiple users in the previous service.
This change:
- Adds a new LegacyUser model that can belong to a User. Each LegacyUser model has one old_user_id that corresponds to the user ID in the legacy service.
- Updates the user import service so that we create this association for new users
- Creates a Rake script to backfill the association for existing users
* Add abstract log class and sales log class
Created a parent log class for sales log and lettings log. Any bits common
to both sales and lettings can live in the parent class. As the sales log
functionality is built up any commonalities with lettings log can be extracted
into the parent log class. The sales log model is set up without a json form
and instead the form is defined in code - like the setup section of the lettings
log.
* update sales logs controller
* update lettings controller specs
* update filter method name
* update organisations controller
* use lettings method
* Add deleted tests back
* lint
Co-authored-by: Kat <katrina@madetech.com>
Co-authored-by: Kat <kosiak.katrina@gmail.com>
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>
* 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
* 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>
* 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>
* 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