* 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>
* Get all organisations in controller
* Display organisations data in the table
* Route to logs for specific organisation
* add tests
* update spec
* lint fixes
* set up failing test for organisation logs page
* fix failing test
* write test for organisations support user page
* Update a organisation page test and lint
* added pagination test with next and previous links and total count for support user
* test for pagination in organisations title
* Added "Organisations" to to organisations page title
* add pagination test for organisations page 2, remove second before block
* Add the remaining pagination tests
* Redirect when accessing organisation logs by non support user
* Test for displaying logs for specific organisation
* Add test for org name
* Add a failing log filter test for specific org
* Extract filter methods into a helper
* Allow logs filtering for specific org
* Fix test, support user was creating an extra org, remove orgs filter for specific org
* Remove redundant test, lint
* Reuse primary navigation component and add sub navigation for support users
* allow support users edit or and add sub navigation to about this org
* allow support users to access the edit org page
* only allow to edit existing editable fields
* display correct values in the organisations table
* allow support user to update org
* user table component for organisations table
* use guard clause for organisation logs page
* remove create a new lettings log from organisation logs
* Move case logs filter from helpers to modules
* lint erb
* yarn lint
* bring back if statement in logs controller
* update modules import
* let!
* test for links first in the org cotroller spec
* interpolate number of orgs
* conditionally render sub navigation
Co-authored-by: Kat <katrina@madetech.com>
Co-authored-by: Dushan Despotovic <dushan@madetech.com>
Co-authored-by: JG <moarpheus@gmail.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>
* Filter values correctly
* Remove filter value if hidden
* Return empty string rather than nil for accessible autocomplete
* Additional test for accessible automcomplete defaulting
* improved export - set start point for reference
* remove completed status from exports
* Added exception handling to export
* Improved tests, replaced rescue block with Sentry
Co-authored-by: Kat <katrina@madetech.com>
* Rename org filter
* Ensure filters work when ID is passed
* UI init
* Lint
* Fix filter nesting
* Reduce width
* Set checked status of filters correctly
* Test filter presence
* Add filter test
* Rubocop
* Tweak styles for autocomplete within filter
Co-authored-by: Paul Robert Lloyd <me+git@paulrobertlloyd.com>
* Hide inactive users and allow support users to view all users
* Enable support users to invite users to any organisation
* Add pagination to user views
* Use rake task to send onboarding emails
* Wrap host lookup so it's easily stubbable
* Rake task can be called outside the rails environment so need to pass host in
* Not part of the usual app flow so contain to rake task
* Including routes helper in a rake task is a rabbit hole
* Use ENV var rather than param for host
* Make tshortfall optional based on hidden tshortfall_known question
* Add test for optional
* Add test for JSON derived and dependent on false options
* Test routing
* Fix optionality
* Set hhmemb to totadult and tchild sum if hhmemb is not given
Co-authored-by: Ted <tedbooton@gmail.com>
Co-authored-by: Dushan <dushan@madetech.com>
* lint
* update method
* calculate hhmemb from details provided
Co-authored-by: Ted <tedbooton@gmail.com>
Co-authored-by: Dushan <dushan@madetech.com>