* 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
* add synonyms, appended text and hint text to the autocomplete
* update test part 1
* refactor synonym, append and hint methods to take in resource
* Fix tests and lint
* Change min autocomplete character length to 1
* change test
* infer case_log values from schemes
* only display relevant property information questions
* Add unittype_sh column
* Display the correct number of completed sections
* fix schema and migration
* Fix test failing in CI
This test was failing due to some different between UTC and BST time as the
record from the DB comes back with a UTC timezone. Comparing the integer values
of both will ensure that both timestamps are identical and should fix the
issue in the CI where it thinks the values are different
* only run query for scheme locations size once
Co-authored-by: Dushan <dushan@madetech.com>
* extract TYPE_OF_UNIT_MAP
* lint
* Use find insted of select
Co-authored-by: Dushan Despotovic <dushan@madetech.com>
* added last step
* not finding postcode field
* testing being direct to add locations page after submitting support questions
* added route to locations controller
* location controller spec
* location controller
* added template for new
* next step in feature
* added postcode
* added name to locations
* removed total units from schemes
* moved total units to locations
* changed type of unit type in db
* using type of units
* add locations page is finished
* purged total units and added test for location create
* creating location
* testing creating location as data provider
* fixed factory
* refacotred update/create and added test creating location as a coord user
* testing returning back to create page if create another location is selected
* testing returning back to create page if create another location is selected - part 2
* thanks rubocop
* thanks rubocop
* testing back from new location
* returned tests back
* testing clickable locations link
* testing clickable locations link under correct context
* correctly looking table
* table with caption
* wip
* fixed failing exisiting tests
* fixed failing exisiting tests - part 2
* validating postcode case logs style
* validating postcode specs
* validating postcode specs debugger removed
* navigation when editing location
* spike creating new location after addition
* small refactoring
* added test to add another location from locations page
* added test to amend a location
* added test to amend a location - part 2
* testing location cell
* added wheelchair adaptions to the unit tyupe
* rebased
* testing postcode missing
* testing creating schem for a different org for coordinator
* testing new scheme for a different org for coordinator
* upcasing all postcodes before creation
* testing edge cases around postcodes and yes or no for another location
* create locations with support user
* details locations specs
* update locations specs
* rubocop
* checking raising error
* fixed failed test
* switched yes and no for wheelchairs
* routes refactoring
* fixed routing - WIP
* further chanegs
* feature tests passing
* correct page when errros
* redundant page
* moving viewing locations away from schemes controller
* new is fixed
* create fixed
* fixed locations specs
* fixed tab nav specs
* completed location specs
* lint
* 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>
* Add an organisation question for the support user (WIP)
Co-authored-by: baarkerlounger <baarkerlounger@users.noreply.github.com>
* All the things are green
* Add user question
* Restrict shown answer options based on already answered questions
* Derive managing org
* Guard against missing DB connection
* Remove empty file
* Only select the fields we actually need
* All is redundant
* Fix spec description
* Fix comments
Co-authored-by: Kat <katrina@madetech.com>
Co-authored-by: baarkerlounger <baarkerlounger@users.noreply.github.com>
* Make the needs type question available in non-prod environments
Co-authored-by: Ted-U <Ted-U@users.noreply.github.com>
* lint fixes
* fixes based on review
* add hint text
Co-authored-by: Ted-U <Ted-U@users.noreply.github.com>
* Refactor depends on in the form json to specify the object for the dependency
Co-authored-by: baarkerlounger <baarkerlounger@users.noreply.github.com>
* Remove org section
* Enable user based depends on
* Add question
* Question is derived
* Log debug message when values get auto cleared
* Enable answer options to be created from a model lookup
* Make organisation fields optional since they won't immediately have one when created by support users
* Add question to check answers page
* 22/23 fix
* Rubocop
* Spec check answers label lookup
* Only set managing organisation if not already set
* Bump deps
* Rescue lack of database connection for CI
Co-authored-by: Kat <katrina@madetech.com>
Co-authored-by: baarkerlounger <baarkerlounger@users.noreply.github.com>
* Added test file for supported housing schemes
* Added factory bot for supported housing schemes
* swapped managing agent to org for scheme
* created migration for schemes
* created model for scheme
* added migration to add foreign key to the schemes table
* missing spec and log spec for supported housing
* fixed failing specs
* added schemes migration
* next step feature
* added route
* added controller
* added index
* added all schemes
* correct test for scheme
* added view
* route alias for schemes
* spec for index schemes
* failing scheme controller spec
* added simple view, scheme seed and authentication
* spec for index schemes list
* rubocop - thanks
* better seed
* added Heading to org
* added feature flag to hide supported services on prod
* added feature flag testing nav items
* testing coordinator user can see the link to supported housing
* moved toggle to a different place
* moved toggle to PrimaryNavigationComponent
* testing not being signed in on support pages
* testing showing search bar
* added search bar
* testing subset of schemes for coordinator user
* rubocop
* failing test for title in page
* code to expose title
* pagination with tests without searching
* partial for schemes
* scoping out all but support and coord users
* searching schemes code and test
* searching via code and org tests
* searching by org name tests
* searching by org name code
* search_by tests
* search_by code
* search_by woops must search by service
* searching schemes feature
* tests for data coordinator user
* redirect for data coordinator user
* testing org schemes for coordiantor user
* schemes in org controller for coordiantor user
* refactored specs moved into orgs what belongs there
* view for org schemes
* rubocop
* accebility field
* accebility field on org page
* correct return when on org schemes
* passing search test on the orgs page
* highlight nav tab
* navs helper done
* rubocop
* fixed failing tests for support user
* correct view
* how did I manage to delete this file?
* checking you cant access schems unathorized
* moved test
* renamed service name
* correct title for sup user schemes org
* testing not being able to view any other orgs supported housing for coordinator user
* Trigger WF
* last fix
* aded has many to org for schemes
* rubocop
Co-authored-by: Ted <ted.booton@madetech.com>
* 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>
* Add search by name for users
Co-authored-by: baarkerlounger <baarkerlounger@users.noreply.github.com>
* Search is now non case sensitive
* Made search work for data co-ordinators
Co-authored-by: baarkerlounger <baarkerlounger@users.noreply.github.com>
* Refactored to scope
* Added search by email
Co-authored-by: baarkerlounger <baarkerlounger@users.noreply.github.com>
* WIP Commit - added test for if search term matches a name and an email address simultaneously. Also changed search result caption for organisations to display "Matches X of Y users"
* Rubocop
* Preload org
* Linting
* Refactor filtered_users into module
* Only adjust query param if searched
* Add data coordinator tests
* Add table caption spec
* Dupe attribute
* Refactor into Search ViewComponent
* Rubocop
* Unit test user scopes
Co-authored-by: Ted <ted.booton@madetech.com>
Co-authored-by: baarkerlounger <baarkerlounger@users.noreply.github.com>