* show summary when on error threshold
* remove bulk upload mailer template
- this template is no longer used
* setup errors do not consider threshold
- return approprate intro test depending if there are setup errors or
not
* add first page for bulk upload resume journey
* bulk upload resume handles upload again
* add confirm page to bulk upload resume journey
* replace placeholder count with correct value
* apply recommendation for bulk upload resume choice
* add how to fix bulk upload mailer
* integrate new bulk upload approve journey
* add missing bulk upload error mappings
* remove test
* prevent approve being called multiple times
* bulk upload creates invisible logs ahead of time
* work invisible logs into bulk upload flow
* sort errors so deterministic
* remove unused ensure
* remove expected_log_count and processed
- these fields are no longer used or needed
* introduce pending status
* swap visible for pending logs
* only show visible lettings logs
* hard code status filters
* remove unused model methods
* only show visible sales logs
* form controller ignores hidden logs
* locations and schemes only affect visible logs
* feat: add inset text and old template (actual link to come)
* feat: add old spec work from CLDC-1788 to avoid future conflicts, typo fix
* feat: add new files and update copy
* feat: add 23/24 spec files and update copy
* feat: specify rack version
* feat: specify rack version
* refactor: lint
* refactor: lint
* feat: fix failing tests
* db: update
* refactor: typos
* feat: update designs and add inset text
* feat: pass year to guidance page
* feat: merge with new behaviour on main
* Set housingneeds to yes if field 59 is 0
* Only display errors on selected housing needs
* Add errors to relevant fields when no housingneeds are selected with housingneeds options
* Add errors to correct fields when housingneeds don't know is selected
* Refactor validations
* Update 2023 housingneeds validations
* clear age2 if it's out of range
* Clear beds if over max
* Clear charges if there are carehome charges given
* Clear charges if scharge is under 0
* Clear tshortfall if it is not positive
* Clear referral if it's an invalid temporary accommodation
* Clear charges if pscharge is outside the range
* Clear charges if supcharg is outside the range
* Refactor clearing charges
* Clear charges is scharge is outside the range
* Clear location and scheme if location is inactive during the tenancy start date
* Remove care home charge if it's outside the range
* Refactor validation error information infor a hash
* Clear age out of range for all people
* Remove unused constant
* Update import logging messages
* Extract earnings validation and remove to_set from hash
* Remove to_delete
* Update logging
* Update bulk upload errors
* feat: add void date guidance partial
* feat: set guidance pos bottom for 22/23 log
* feat: add tests
* refactor: linting
* Update app/models/form/question.rb
Co-authored-by: Phil Lee <asmega@users.noreply.github.com>
* feat: smart quotes
* feat: respond to po comments
* feat: add voiddate/mrcdate validation to mrcdate too
* feat: add ten year validations to startdate too
* feat: fix tests
---------
Co-authored-by: Phil Lee <asmega@users.noreply.github.com>
* refactor questions from validator to row parser
* able to switch between bulk upload parsers
- depending on what year we are processing
* spec tooling to support bulk upload multi year
* row parser now has year in namespacing
* add static data for 2023 row parser
* add placeholder to log to csv for specs
* bulk upload aribtrary 23/34 column ordering works
* bulk upload supports 23/24 without headers
* bulk upload 23/24 supports BOM + invalid chars
* dupe tests
* port 23/24 attributes_for_log
* port 23/24 bulk upload validations
* force crossover period
* tweak max permitted columns
* able to return column for given field
* work out column for field for errors
* add field_4 as 23/24 setup field
* remove duplicate method
* map schemes and locations correctly
* handle arbitrary number of header rows
* add missing fields to bulk upload support
* bulk upload setup errors only for missing data
* bulk upload setup error for scheme
* bulk upload setup error for location
* ensure missing startdate is a setup error
* limit setup errors if errors already present
* bulk upload beter handles age validations
- limit the number of errors on a field. if the field already has an
existing error it does not add further errors to the field
- shim in extra validation for ages which take precedent over existing
log level validations which are lacking
* setup errors always added
- no longer observes if the grouping already has errors
- as we have fine grain control in this class of how errors should be
* fix missing pass through for renewal
* add placeholder tests for bulk upload mailer
* bulk upload fix setup errors email
- this plumbs in the condition so if any setup sections are incomplete we
send that partcular email and prevent the remaining flow
* tag bulk upload setup errors for downsteam use
* add category to bulk upload errors
* persist bulk upload error category
* populate bulk upload mailer with errors
* bulk upload considers housing needs fields
* bulk upload only permits one housing needs type
* add bulk upload validation
- no disabled needs cannot be selected in conjunction with a disabled need
* add bulk upload validation
- dont know disabled needs cannot be selected in conjunction with a disabled need
* add bulk upload validation
- no and don't know disabled access needs cannot be selected together
* bulk upload validate start date for given window
* use ActiveModel::Errors api correctly
- as opposed to calling methods manually
* refactor by combining lines
* bulk upload handles years with single digits
* remove duplicate bulk validations
- validation was being performed both at CSV level and log level causing
a duplicate validation to appear
* bulk upload valiation errors now store the message
- previouly this was storing just the error type which we do not have a
mechanism to pipe these back to user readable error messages
* refactor bulk upload with extract method
* add bulk upload mailer test
* bulk upload mails users to fix logs on website
* bulk uplad email change resume link
* refactor local variable name
* create logs iff the log itself is valid
* do not create logs if a setup section not complete
* bulk upload with 60% errors will not create logs
* extract magic number to constant
* add bulk upload absolute threshold error rate
* refactor with extract method
* fix bulk upload age data types
* bulk upload handles both with and without headers
- headers are from the spreadsheet template
- otherwise assume cell A1 is start of the dataset
* add class to create logs from bulk upload
* create logs when processing bulk uploads
* remove bulk_upload_id from csv output
* create bulk upload logs only if all valid
- this will be changed later to allow for partial logs
- and only to create logs when a threshold has been met
* add method to blank invalid non setup fields
* bulk upload log creation blanks invalid fields
* fix incorrect logic for bulk upload renewal
* fix linting
* bulk upload log creation fail logs to sentry
* fix bulk upload line ending parsing
* extract bulk uploading csv parsing to class
* use csv parser in log creator
* change handle line endings mechanism
- we now strip all windows line endings for unix based line endings
- this normalises things making it simpler