* add deactivation_date to locations
* Change conditional question controller to accommodate all models
* UI spike
* Update toggle-active views and render them correctly
* Display 2 errors
* Update errors
* Extract text to translation file
* Add collection start date
* Add out of range validation
* Update affected logs label
* lint
* Add status method
* update the displayed status tags
* Keep deactivation_date_type selected if an error occurs
* refactor deactivation_date_type to use default and other as options instead of 1 and 2
* refactor
* refactor
* update lettings logs
* Add reactivate ocation button and path
* Fix controller and update deactivate confirm page
* Don't actually update the logs data when deactivating a location
* lint and typos
* update a path
* update current_collection_start_date
* Remove unused scope
* feat: add renewal validation on rsnvac
* test: check sensible error seen when rsnvac is renewal and but letting is not a renewal
* test: change renewal validation check to fetch error message dynamically
* feat: lint code
* feat: write record.renewal.present?, not record.renewal
Co-authored-by: James Rose <james@jbpr.net>
Co-authored-by: James Rose <james@jbpr.net>
* feat: add 2022 rent range data, update rake task for population of this
* feat: change file format so ranges_rent_id is recognised
* feat: add updated error messages and casing
* tests: make tests pass
* feat: ensure there is a location_code in all locations and use this (and beds = 0) for supported housing rent validations
* feat: fix general needs validation behaviour
* feat: add local authorities enum to location.rb
* feat: ensure case when beds > 4 is accounted for
* feat: add error messages on property postcode page as well as la page
* feat: add error messages on scheme_id and location_id as well as la page
* feat: add error messages on scheme_id and location_id as well as la page
* feat: null coalescing and validations on changing las to one that invalidates rent in supported housing
* feat: nil protection
* refactor: linting
* refactor: combining duplicated logic
* tests: add hard validation tests split by needstype
* feat: update validations when beds > 4
* feat: update validations when beds > 4
* refactor: simplification, use preivous la method
* refactor: response to PR comments, fixing beds.negative validation
* feat: remove dynamic local auth name text from interruption screens - to be added back in later if this becomes a priority, would need some work on adding local auth name to log for supported housing logs not just leaving it in the location
* feat: add 2022 rent range data, update rake task for population of this
* feat: change file format so ranges_rent_id is recognised
* feat: add updated error messages and casing
* tests: make tests pass
* feat: add validation for voiddate and mrcdate when startdate changed after these have been added later
* test: add tests for new validations
* refactor: remove unnecessary parens
* feat: add la manual edit page
* feat: make autocomplete accesible and la readable
* feat: add correct skip and linking behaviour, also rename fallback page
* feat: add page not found and tidy la list
* feat: add redirection behaviour
* feat: add coping with nil add_another_location query string
* test: add postcodes mocks to return local authorities
* feat: validate local authority to not be nil or "Select an option"
* feat: persist add_another_location even on validation failure
* feat: remove url query parsing, put validation before values added to db
* refactor: spacing
* tests: add new tests for edit-local-authority
* tests: remove redundant bangs
* 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
* 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>
* 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
* testing location validity
* testing for invalid startdate
* testing for invalid startdate in controller
* redundant method
* redundant if
* added tests
* using blank
* using || insetad of &&
* 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
* added test to find link to create a new scheme
* added button to create a new scheme
* testing arriving to the new scheme form
* non exsiting link to controller new action
* SPIKEEEE
* first page complete
* posting to create
* refactored scheme to enums
* refactored new scheme page to use enums as well
* views
* SPIKE WIP
* SPIKE WIP
* SPIKE WIP
* drawing list of scheme details
* expanded on feature seeing more fields to fill in
* expanded on feature seeing more fields to fill in 2nd page
* refactored
* working back buttons
* working flash
* more change in wip
* default value for org
* working spike
* some spacing
* filling answers
* spike finished
* correct name for details
* testing fill in details
* removed gem and further tests
* Add has other client group field to schemes. Display it in the check answers. Fix tests and routing
* remove details view and path
Co-authored-by: baarkerlounger <baarkerlounger@users.noreply.github.com>
* WIP change update paths
* Implement changing answers (except the details one)
* Add details page back for editing scheme details
* added missing test for support questions and nested check answers under correct context
* checking the back functionality
* rubo and lint
* checking the back functionality for primary gourp
* checking the back functionality for confirm secondary
* checking the back functionality for secondary group
* checking the back functionality for support answers
* checking the back functionality for returning to check answers from details page
* checking the back functionality for returning to check answers from primary group page
* checking the back functionality for secondary group confirm yes
* checking the back functionality for secondary group confirm yes - fixed
* checking the back functionality for secondary group
* checking the back functionality for secondary group -fixed
* checking the back functionality for returning from support page
* Do not display secondary client group if the scheme doesn't have one
* Add details path to schemes controller update method
* Add more tests for back button
* Add tests for new controller method
* Add tests for creating schemes as data coordinator
* fixed schema
* added test for missing params when creating scheme
* create for support user with or withotu required param
* code to get controller render errors when required param is missing
* code to implement correct validation
* code to implement correct validation - part 2
* highlight missing field
* doing silly dance to get correct field highlighted on the error
* testing patch for schemes
* testing patch for schemes - correct path
* small refactoring
* testing primary client group update via regular path
* testing primary client group update via check answers page
* testing confirm secondary group update with YES NO and returning from check answers page
* testing updating secondary client group update and returning from check answers page
* testing support answers and returning from check answers page
* testing details and returning from check answers page
* weird path when no names supplied
* rubocop
* lost in rebasing
* started id to code refactoring
* model specs remastered
* fixed scheme controller specs
* further refactorings
* fixing feature schemes
* final touches
* removed code from db
* remaining code purged
* rubocop
* included check for owning org field
* checking for stock owning org selection
* added stock owning org
* added stock owning org on new page
* added stock owning org to details
* removed total units
* managing related schems properly via Org
* managing related schems properly via Org - rubocop
* small refactoring
* small refactoring - 2
* small refactoring - 3
* tests for owned_schemes and managed_schemes
* rubocop
* added tests for support user creating scheme
* rubocop -a
* tests for a primary-client-group
* tests for a secondary-client-group
* tests for a confirm-secondary-client-group
* tests for a check-answers
* tests for a details
* rubocop
* redundant action in controller
* Trigger WF
* switched to int for confirm
* flashing test
* flashing test for support user
* flashing test rubocop
Co-authored-by: Kat <katrina@madetech.com>
Co-authored-by: baarkerlounger <baarkerlounger@users.noreply.github.com>
* Major repairs question should be valid if void date question is
* Add task to reimport major repairs answers
* Correct error message string
* Add logging
* Spec logging
* update hard validation limits for pregnancy age, remove hard validation if there are no females at all
* Add soft validations for pregnancy
* make the error message consistent
* Only check the values for the members with details known in the household
* Show interruption screen when resident details are updated
* Route back to check answers after an interruption screen and back to previous page if no is selected on the interruption screen
Co-authored-by: baarkerlounger <baarkerlounger@users.noreply.github.com>
* update validation messages
* fix a test
* fix a typo
Co-authored-by: baarkerlounger <baarkerlounger@users.noreply.github.com>
* Confirmable
* Remove obsolete rake task
* Skip confirmation for inactive users
* Send beta onboarding template if migrated from Softwire
* Default controller
* Use correct link
* Redirect confirmation to set password
* Confirm account within 3 days
* Only redirect to set password if not previously set
* Rubocop
* Confirm factory bot users
* Set password condition
* Changing email requires reconfirming
* No need to explicitly trigger email, devise does that for us now
* Remove flash banner
* Mock notify
* Mock in the right spec
* Test redirect and text
* User is confirmable
* Rubocop
* Redirect to url so we don't bypass authenticity token
* Update content
* Add test for resend invite flow
* Update link to resend confirmation email
* Rename password reset resend confirmation partial
* Expired link error page
* Remove resend confirmation link
* Update seed
* Expory contact
* Time zone
Co-authored-by: Paul Robert Lloyd <me+git@paulrobertlloyd.com>