* Add in past end dates for testing
* Temporarily disable test marked to delete at year end
* Remove one off reinfer_local_authority task
* Update validator_spec
* Set 2024 date in form_handler_spec to be during crossover period as needed
* Use bulk_upload.year_combo for comparison in request tests to avoid year dependancy
* Update BU log creator specs for 2024
* Use year combo function in bulk upload mailer tests
* Refactor lettings validator_spec
* More fixes
* More work on bu validator specs - mostly sales
* Remove pre 2023 test
* More use of bulk_upload.year_combo in request tests
* Fix lint
* Tweak bulk upload error row component tests for year changes
* Further fixes
* Fix 2023 lettings row parser spec
* Sales log to csv fix
* Refactor BU processor tests
* Fix field number row identifier
* Fix linting
* More years in request spec
* fix
* Don't use db unnecessarily in financial validations spec
* Fix sale date changing 2024 -> 2023 test
* Add tests for bulk_upload.year_combo
* Update bu factory year specification
* Refactoring
* Linting
* Don't use helper in factory
* Remove new 2023 specific test
* Remove dummy end dates
* further fixes
* Fix date / crossover issues
* Try changing form end dates
* Revert "Try changing form end dates"
This reverts commit e027e29cf0.
* Make use of :ignore-validation-errors trait
* Try with end dates in past
* Revert "Try with end dates in past"
This reverts commit 6b87938d70.
---------
Co-authored-by: Rachael Booth <rachael.booth@softwire.com>
* Remove legacy user from user factory
* Build instead of creating in some model tests
* Do not create a new DPO for orgs created within user factories
* Add original setup doc
* Update documentation with updated factories
* Fix up DSA creations
* update factory completed traits using an after build hook so that trait does what it says regardless of start or sale date of log
* use completed trait rather than completed2024 trait from factories
skip validation on saving logs from previous years so that logs created too far in the past do not trigger validations
* remove sale and start dates from logs in tests where that should not be important
build rather than create to reduce db interactions
in order that the setup is complete, build the necessary user and organisation with ids
* fix a wide range of tests affected by the changes in log factories completed traits
* CLDC-3487: Clear previous_la_known when necessary for renewal logs
* CLDC-3487: Clear location when clearing scheme due to org change
* CLDC-3487: Use nil instead of 0
* Specify orgs on sh logs when needed for tests
* Fix flaky tests
* ensure in the update method that it is not possible to delete rent periods that are in use by that organisation
* lint
---------
Co-authored-by: Kat <katrina@kosiak.co.uk>
* write helper method to support having the correct rent period checkboxes checked
* update new and create in organisations controller and view to enable creation of relevant organisation rent periods
write tests for this
* small changes to models
* enable editing rent period in the UI
display change button on org details page
display rent periods question on edit page
* enable updating org rent periods
update logic in #update
related tests
* alter redirect after support user creates an organisation
* adjust various UI elements: ordering of rows, copy changes, label size and associated tests
* rework the #rent_period_labels method to return All under the correct conditions, rework tests related to that. + fix assorted tests that were either flakey or breaking due to addition of rent periods logic to create and update
* amend failing tests and resolve linting complaints
* changes following review
* disable checkboxes for rent periods if they are in use so that users are not able to make existing logs invalid
hint text added to the question to explain this
I have also added all rent periods to a hidden field to remove the need to fetch them again form the db in the update method
* update validation to reflect the fact that an org having no associated rent periods no longer means they accept all rent periods
update tests adding both cases and removing unnecessary additional db additions
* rake task to create rent period associations for orgs that have none
* revert mistaken copy changes in designs
* create rent periods in factories as default, with an option to skip. skip automatic creation in tests specifically related to rent periods
* stub api call for factory value, update csv tests and fixtures accordingly
* extract a good chunk of tests out of lettings_log_spec and into a dedicated derived fields spec file. in many cases refactor tests
* remove before(:context) and associated patterns.
use assign_attributes in various places for cleaner code
* escape . in regex for API call stubs to satisfy codeQL
remove destroy_all call at the start of a test that was dealing with leftover modesl in the test db
* further refactoring of various tests to reduce database interactions and improve speed
* remove outdated distinction between unitletas mappings from before 23/24
* remove tests that seem to be testing active record and/or ruby Date class
* write helper method to support having the correct rent period checkboxes checked
* update new and create in organisations controller and view to enable creation of relevant organisation rent periods
write tests for this
* small changes to models
* enable editing rent period in the UI
display change button on org details page
display rent periods question on edit page
* enable updating org rent periods
update logic in #update
related tests
* alter redirect after support user creates an organisation
* adjust various UI elements: ordering of rows, copy changes, label size and associated tests
* rework the #rent_period_labels method to return All under the correct conditions, rework tests related to that. + fix assorted tests that were either flakey or breaking due to addition of rent periods logic to create and update
* amend failing tests and resolve linting complaints
* changes following review
* disable checkboxes for rent periods if they are in use so that users are not able to make existing logs invalid
hint text added to the question to explain this
I have also added all rent periods to a hidden field to remove the need to fetch them again form the db in the update method
* update validation to reflect the fact that an org having no associated rent periods no longer means they accept all rent periods
update tests adding both cases and removing unnecessary additional db additions
* rake task to create rent period associations for orgs that have none
* revert mistaken copy changes in designs
* create rent periods in factories as default, with an option to skip. skip automatic creation in tests specifically related to rent periods
* stub api call for factory value, update csv tests and fixtures accordingly
* extract a good chunk of tests out of lettings_log_spec and into a dedicated derived fields spec file. in many cases refactor tests
* remove before(:context) and associated patterns.
use assign_attributes in various places for cleaner code
* escape . in regex for API call stubs to satisfy codeQL
remove destroy_all call at the start of a test that was dealing with leftover modesl in the test db
* further refactoring of various tests to reduce database interactions and improve speed
* remove outdated distinction between unitletas mappings from before 23/24
* remove tests that seem to be testing active record and/or ruby Date class
* create presenter class to hold all the db calls and data for showing the home page
plus tests, some changes to factoreis and helpers necessary
this should avoid an overly bloated controller method or calling the DB from a view helper
* view partial changes
to accommodate design changes, decouple box with counter and blue link boxes
since various boxes show or not or in a different order depending on whether the org logs sales and whether we are in the crossover period I have also made grid and row partials to improve readability on the index page.
* redesign the home page using the new presenter and partials, deliver the presenter object to the view from the controller
* adjust tests and factories and address api call stub
* remove view helpers that are no longer being used and remove outdated tests for home page
* amend presenter and associated calls from view, tests, to ensure support user always sees sales data
* write request specs for the homepage
* undo unnecessary change to factory
* make corrections following rebase conflicts
* various minor changes following tech review
* logs assigned to a provider should be vivisble to them in the homepage count rather than logs created by them
* resolve rebase confusion in csv fixture files
* Filter out empty options from selected filters
* Redirect to year filter if it is not selected
* Add remaining filter questions
* Display lettings filters CYA
* Add cancel, conditionally display send email
* Refactor
* Add removed tests
* Update method name
* Add sales logs filters
* Update tests
* Set label size on filter questions
* Refactor
* Deduplicate filter views
* Rename methods
* Authenticate pages
* Update filtering per organisation
* Update routing from CYA
* lint
* Refactor check_your_answers_filters_list
* Redirect if year is not given for sales csv
* Update formatted organisations methods
* Update missing and wrong copy
* Update cancel and back buttons
* CLDC-3442 Download logs csv per year (#2404)
* Specify year in lettings csv download service
* Specify year in sales csv download service
* Define non_question_fields per year
* Tidy up missing fields and tests
* Fix request tests
* Refactor
* Add missing param
* CLDC-3348 Update sales CSV for support (#2407)
* Update sales csv for support
* CLDC-3352 Update sales CSV address order (#2410)
* Update sales support csv address ordering
* Refactor
* CLDC-3367 Rename sales support CSV fields (#2413)
* Rename sales support CSV fields
* Update sales CSV user fields order (#2416)
* CLDC-2586 Rename scheme sensitive (#2405)
* Rename scheme sensitive in lettings csv
* Rename scheme sensitive in schemes csv
* CLDC-3347 Show soft validations in support CSVs only (#2406)
* Show soft validations in support csvs only
* CLDC-3352 Update lettings CSV address order (#2409)
* Update lettings support csv address ordering
* Refactor
* CLDC-3415/3421/3422 Add lettings CSV updates (#2415)
* Add first_time_property_let_as_social_housing to coordinators csv
* Update lettings CSV user fields order
* Remove new_old from lettings CSV
* Remove duplicate rent value check from CSV (#2423)
* Refactor CSV service (#2425)
* Extract and move lettings methods
* Extract and more sales methods
* Empty
* CLDC-3345 Rename created_by to assigned_to (#2372)
* Rename created_by to assigned_to
* Replace created_by with assigned_to
* Update created_by to assigned_to in exports, remove blank assigned to
* CLDC-3345 Add and set created_by fields (#2373)
* Add created_by
* Update existing created_by values
* Set created_by on single log
* Set created_by on BU
* Add created_by to exports
* feat: update since last merge
---------
Co-authored-by: natdeanlewissoftwire <nat.dean-lewis@softwire.com>
* Fix papertrail create version
---------
Co-authored-by: natdeanlewissoftwire <nat.dean-lewis@softwire.com>
* CLDC-2670: Improve navigation flow when revisiting questions from CYA page
* CLDC-2670: Fix failing test
* CLDC-2670: fix issue with wrong referrer behaviour on interrupt screens
* CLDC-2670: Fix build errors
* Update validation feature
* CLDC-2670: Do not show already-answered questions when answering new questions from CYA page
* CLDC-2670: Fix linter error and tests
* Fix incorrect URLs in feature test
* feat: fix typo
* feat: make skip links for new answers route to check_answers
* feat: make skip links for new answers route to check_answers
* feat: update tests
* feat: bug fix
* feat: test fix
* feat: skip unanswered questions for interruption screens
---------
Co-authored-by: natdeanlewissoftwire <nat.dean-lewis@softwire.com>
* Add delete confirmation page
* Add status to the user
* Allow deleting user
* Refactor sign_in user in tests
* Add delete user button and update policy
* Update user policy
* Do not display deleted users as an answer option
* Update user table and details
* Do not show deleted users
* Disable delete user on production
* Update test
* Update feature tests
* Remove old rake tasks
* Update some unit tests
* Update more tests
* More tests
* Fix failing sales household validation test
---------
Co-authored-by: Robert Sullivan <robert.sullivan@softwire.com>
* feat: use status tags to show user active status
* feat: add unconfirmed status
* feat: update tests
* refactor: erblinting
* feat: update tests
* refactor: lint
* Pluralise buyer in household characteristics/setup
* Pluralise buyer in sales information sections
* Pluralise buyer in savings
* Pluralise other buyers, update privacy notice test
* Pluralise buyer in validations and translations
* Route to pages when joint purchase is not answered
* Fix apostrophes
* Update translations
* More updates
* Set and clear duplicate log references
* Export duplicate_log_reference_id for lettings
* Export duplicate_log_reference_id for sales
* Export duplicate_log_reference_id in xml
* Update existing duplicate log references
* Add missing sales deduplication steps
* Set duplicate_set_id straight on logs
* Do not update updated_at to prevent export
* Increment duplicate_set_id
* Update duplicates when they change sets
* Remove duplicates when deleting logs
* Create DuplicateLogReference
* Set and clear duplicate log references
* Export duplicate_log_reference_id for lettings
* Export duplicate_log_reference_id for sales
* Export duplicate_log_reference_id in xml
* Update tests
* Update existing duplicate log references
* Rename a field
* Add missing sales deduplication steps
* Set duplicate_set_id straight on logs
* Do not update updated_at to prevent export
* Increment duplicate_set_id
* Update duplicates when they change sets
* Remove duplicates when deleting logs
* correctly update duplicate set IDs when answer is changed through normal form flow
* Empty commit
* feat: base lettings behaviour
* feat: formatting improvements
* Empty commit
* Empty commit
* Empty commit
* refactor: lint
* feat: more page styling
* feat: update tests
* refactor: lint
* feat: add requests spec
* refactor: simplify
* feat: add tests
* feat: copy change to reflect that the count in the header is not necessarily as large as the errors shown (it excludes duplicate errors on fields, and not_answered errors)
* feat: copy changes to sales as well
* feat: remove LegacyBulkUpload MVC
* feat: fix typo
* feat: update tests
* feat: mark additional not_answered sales q
* feat: update routing and only display warnign text when errors will be cleared
* feat: update copy and error rows
* refactor: lint
* feat: don't show soft validations in deletion report
* feat: update routing so deletion report is not shown once logs uploaded
* feat: update tests
* feat: make unique count track repeated errors across rows
* refactor: lint
* feat: add 24/25 forms, shrink tab header font size and tidy up routes.rb
* feat: update formatting so 4 tabs don't wrap on small screen sizes, but links still wrap in list view
* feat: shrink headers, make text the same and match underline width to tabs component
* feat: use updated paper forms and fix typo in sales bu template
* refactor: lint
* feat: update tests
* feat: update copy
* feat: update copy
* feat: update copy
* feat: update tests and underline css
* feat: update tests and underline css
* refactor: lint
* feat: update paper forms
* feat: update file routes
* feat: add blank homepage, update routing and tests
* feat: add welcome message and thoroughly test routing
* refactor: lint
* feat: update tests
* CLDC-3076: Make example dates consistent (#2107)
* CLDC-3076: Make example dates consistent
* Use example date even when some hint text provided already
* Temp remove some date restrictions
* Update to 2 line breaks
* Revert "Temp remove some date restrictions"
This reverts commit cd7f18f9f1.
* Fix lettings log accessor in date question (#2117)
* Fix lettings log accessor in date question
* Remove hardcoded date example from mrcdate question (#2118)
---------
Co-authored-by: Rachael Booth <Rachael.Booth@softwire.com>
* CLDC-3061 Add guidance page (#2121)
* Add guidance page
* Link to guidance from start page
* feat: test home/start paths explicitly
* CLDC-2253 Add collection resources (#2120)
* Update collection resources, add to homepage
* Add guidance link to an empty page
* Update headings
* Rebase fix
* Update title
* Update file names
* Add section break
* CLDC-2593 Add upcoming deadlines section (#2119)
* Add upcoming deadlines section
* Update the content to use the correct dates
* Update content
* lint
* typos
* CLDC-2252 Add homepage task section (#2115)
* feat: wip add lettings, sales and schemes sections with correct text, counts, links and colouring
* feat: add flex styling to match designs
* CLDC-3076: Make example dates consistent (#2107)
* CLDC-3076: Make example dates consistent
* Use example date even when some hint text provided already
* Temp remove some date restrictions
* Update to 2 line breaks
* Revert "Temp remove some date restrictions"
This reverts commit cd7f18f9f1.
* Fix lettings log accessor in date question (#2117)
* Fix lettings log accessor in date question
* Remove hardcoded date example from mrcdate question (#2118)
---------
Co-authored-by: Rachael Booth <Rachael.Booth@softwire.com>
* feat: update breakpoints for responsive layout changes
* lint: use hash lookup where possible
* lint: erblinting
* feat: improve formatting
* Reuse govuk grid
* Revert "Reuse govuk grid"
This reverts commit 8c71f5d9ed.
* feat: test home page data boxes
* refactor: lint
* refactor: lint
* feat: test link behaviour is correct in all user scenarios
* refactor: lint
* feat: update tests
* feat: combine task, resources, deadlines sections
---------
Co-authored-by: Rachael Booth <Rachael.Booth@softwire.com>
Co-authored-by: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com>
Co-authored-by: Kat <kosiak.katrina@gmail.com>
* CLDC-2255 Add homepage notifications (#2131)
* feat: add notification table
* feat: add notification banner, use unread gem for notification management
* feat: add notifications page and remove unread_notification.rb
* feat: add blank homepage, update routing and tests
* feat: add welcome message and thoroughly test routing
* refactor: lint
* feat: update tests
* CLDC-3061 Add guidance page (#2121)
* Add guidance page
* Link to guidance from start page
* feat: test home/start paths explicitly
* feat: add notification table
* feat: add notification banner, use unread gem for notification management
* feat: add notifications page and remove unread_notification.rb
* feat: default p tag around sanitized page content
* feat: add active scope
* feat: use newest active unread/unauthenticated notification and update start page
* feat: add tests of notification behaviour and routing and refactor
* refactor: lint
* feat: update Gemfile.lock
* feat: add timestamps to readmark table
* feat: update gemfile.lock
* refactor: lint
* feat: test notifications page doesn't show notifications and code simplification
* feat: move notification helper methods to notifications_helper.rb
---------
Co-authored-by: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com>
* feat: clear all no-status filters on in progress links
* CLDC-2590 Add about this service section (#2124)
* Add about core section
* Move about core to the correct spot on start page
* Update content
* Add some margins
---------
Co-authored-by: Rachael Booth <Rachael.Booth@softwire.com>
Co-authored-by: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com>
Co-authored-by: Kat <kosiak.katrina@gmail.com>